Project

General

Profile

Actions

Bug #22003

closed

.bundle extensions not built when doing out-of-source build

Bug #22003: .bundle extensions not built when doing out-of-source build

Added by Kulikjak (Jakub Kulik) 1 day ago. Updated about 11 hours ago.

Status:
Closed
Assignee:
-
Target version:
-
ruby -v:
ruby 4.0.2 (2026-03-17 revision d3da9fec82) +PRISM [amd64-solaris2.11]
[ruby-core:125276]

Description

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).

Actions

Also available in: PDF Atom