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) about 23 hours ago. Updated about 7 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).

Updated by nobu (Nobuyoshi Nakada) about 17 hours ago Actions #1

  • Status changed from Open to Closed

Applied in changeset git|c4b3630f5ec500b0d8699cffe214ada3161d0de8.


[Bug #22003] Refactor template/configure-ext.mk.tmpl

  • Select extension library directories by globbing extconf.rb.
  • Exclude extensions for test before uniquifing bundled gems.
  • Use Dir.glob base option to remove prefixed srcdir.

Updated by nobu (Nobuyoshi Nakada) about 7 hours ago Actions #2

  • Backport changed from 3.3: UNKNOWN, 3.4: UNKNOWN, 4.0: UNKNOWN to 3.3: DONTNEED, 3.4: REQUIRED, 4.0: REQUIRED
Actions

Also available in: PDF Atom