From 2a34bcaa1023c5f0b41774d8153b9625a4233c04 Mon Sep 17 00:00:00 2001 From: Matt Valentine-House Date: Thu, 2 Mar 2023 11:51:53 +0000 Subject: Update VPATH for socket, & dependencies The socket extensions rubysocket.h pulls in the "private" include/gc.h, which now depends on vm_core.h. vm_core.h pulls in id.h when tool/update-deps generates the dependencies for the makefiles, it generates the line for id.h to be based on VPATH, which is configured in the extconf.rb for each of the extensions. By default VPATH does not include the actual source directory of the current Ruby so the dependency fails to resolve and linking fails. We need to append the topdir and top_srcdir to VPATH to have the dependancy picked up correctly (and I believe we need both of these to cope with in-tree and out-of-tree builds). I copied this from the approach taken in https://github.com/ruby/ruby/blob/master/ext/objspace/extconf.rb#L3 --- ext/socket/extconf.rb | 2 ++ 1 file changed, 2 insertions(+) (limited to 'ext/socket/extconf.rb') diff --git a/ext/socket/extconf.rb b/ext/socket/extconf.rb index 4ca0983c68..93bd850c34 100644 --- a/ext/socket/extconf.rb +++ b/ext/socket/extconf.rb @@ -699,5 +699,7 @@ SRC "not needed" end end + + $VPATH << '$(topdir)' << '$(top_srcdir)' create_makefile("socket") end -- cgit v1.2.1