Issue #22003 has been reported by Kulikjak (Jakub Kulik). ---------------------------------------- Bug #22003: .bundle extensions not built when doing out-of-source build https://bugs.ruby-lang.org/issues/22003 * Author: Kulikjak (Jakub Kulik) * Status: Open * ruby -v: ruby 4.0.2 (2026-03-17 revision d3da9fec82) +PRISM [amd64-solaris2.11] * Backport: 3.3: UNKNOWN, 3.4: UNKNOWN, 4.0: UNKNOWN ---------------------------------------- Hi, I encountered a pretty edge case extension build bug. When building Ruby out-of-source and executing the configure script with a full path in a workspace that contains "test" in its name, it fails to build all the extensions in the `.bundle/gems` directory. It can be easily reporoduced with the following: ```
pwd /builds/testing/components/ruby/ruby-40 mkdir build cd build /builds/testing/components/ruby/ruby-40/ruby-4.0.2/configure ... /usr/gnu/bin/make -j 20 ... <the stuff in the .bundle directory is not built>
When doing it this way, the `srcdir` variable in the Makefile will be an absolute path, which is then used in `ext/configure-ext.mk` target and in `configure-ext.mk.tmpl` `Dir.glob` call, where the following line:
% next if extconf.any?{|f| f.include?(".bundle/gems") && f.include?("test") } ``` makes it omit all the extensions in the ".bundle/gems" directory. The problem is not there when I use a relative path (`../ruby-4.0.2/configure`) or when building directly in `ruby-4.0.2` (because the `srcdir` is relative in those cases). -- https://bugs.ruby-lang.org/