Skip to content

Ruby 4.0.7 compilation fails on macOS 26.6.2 #528

Open

Description

@mudge

Description

Attempting to compile Ruby 4.0.7 with ruby-install 0.10.2 on macOS 26.6.2 fails with the following output:

building libruby.a
partial linking /Users/mudge/src/ruby-4.0.7/target/release/libruby.a into /Users/mudge/src/ruby-4.0.7/target/release/libruby.o
linking miniruby
make: *** [builtin_binary.rbbin] Segmentation fault: 11
!!! Compiling ruby 4.0.7 failed!

Steps To Reproduce

Steps to reproduce the bug:

  1. $ ruby-install ruby 4.0.7

Expected Behavior

Ruby 4.0.7 should be compiled and installed.

Actual Behavior

building libruby.a
partial linking /Users/mudge/src/ruby-4.0.7/target/release/libruby.a into /Users/mudge/src/ruby-4.0.7/target/release/libruby.o
linking miniruby
make: *** [builtin_binary.rbbin] Segmentation fault: 11
!!! Compiling ruby 4.0.7 failed!

Environment

$ ruby-install --version
ruby-install: 0.10.1
$ uname -a
Darwin Pauls-MacBook-Pro.local 25.6.0 Darwin Kernel Version 25.6.0: Fri Jul 31 19:18:48 PDT 2026; root:xnu-12377.161.14~5/RELEASE_ARM64_T6020 arm64
$ cc --version
Apple clang version 21.0.0 (clang-2100.3.34.2)

Target: arm64-apple-darwin25.6.0
Thread model: posix
InstalledDir: /Library/Developer/CommandLineTools/usr/bin
$ openssl version
OpenSSL 3.6.4 25 Aug 2026 (Library: OpenSSL 3.6.4 25 Aug 2026)

See rbenv/ruby-build#2641 for the same issue and resolution with ruby-build, their workaround appears to be set the following:

export ac_cv_func_dup3=no ac_cv_func_pipe2=no

Activity

  1. mudge commented on Sep 17, 2026

    @mudge
    Author

    See also python/cpython#153711 for a similar issue.

  2. monfresh commented on Sep 18, 2026

    @monfresh

    What's missing from this bug report is that this only fails if you have v27 of the Apple command line tools and/or Xcode. This is not specific to macOS 26.6.2. For example, Ruby installation works fine on macOS 26.6.2 with CLT/Xcode 26.6

    Technically, this is an issue for Ruby to fix. If it were me, I would wait for Ruby to fix this, and in the meantime, revert back to CLT/Xcode 26.6 on my machine.

  3. tisba commented on Sep 21, 2026

    @tisba

    For reference, the Ruby bug is #22311, which has been backported but not released yet.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions