Hide dup3() and pipe2() from configure on macOS older than 27 - #2641
Merged
Merged
Conversation
The macOS 27 SDK declares both as available since macOS 27.0, and `AC_CHECK_FUNCS` detects them regardless of the deployment target, so Ruby built on macOS 26 with the Command Line Tools 27 calls weakly linked NULL symbols and crashes miniruby during the build. https://bugs.ruby-lang.org/issues/22311 #2640 Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
social4hyq
pushed a commit
to social4hyq/homebrew-core
that referenced
this pull request
Sep 20, 2026
ruby-build 20260916 Created-by: HarmonybrewBot Commit-by: HarmonybrewBot Merged-by: HarmonybrewBot Description: Created by `brew bump` --- Created with `brew bump-formula-pr`.<details> <summary>release notes</summary> <pre>## What's Changed * Set -x flag for release script to show commands being run by @eregon in rbenv/ruby-build#2639 * Hide dup3() and pipe2() from configure on macOS older than 27 by @hsbt in rbenv/ruby-build#2641 **Full Changelog**: https://github.com/rbenv/ruby-build/compare/v20260915...v20260916</pre> <p>View the full release notes at <a href="https://github.com/rbenv/ruby-build/releases/tag/v20260916">https://github.com/rbenv/ruby-build/releases/tag/v20260916</a>.</p> </details> <hr> See merge request: Harmonybrew/homebrew-core!20421
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
The macOS 27 SDK declares
dup3()andpipe2()as available since macOS 27.0.AC_CHECK_FUNCSlinks them without including the header, soHAVE_DUP3andHAVE_PIPE2get defined even when the deployment target is older, and the weakly linked symbols areNULLat runtime.minirubythen segfaults while generatingbuiltin_binary.rbbin, which breaks every released Ruby on macOS 26 with the Command Line Tools 27.Exporting
ac_cv_func_dup3=noandac_cv_func_pipe2=noon build hosts older than macOS 27 restores what the macOS 26 SDK produced.io.cis the only user of either function and neither is callable on macOS 26, so nothing is lost. Upstream added a runtime availability check in ruby/ruby@6bfde8d, but the already released tarballs stay broken.Verified by installing
4.0.7throughruby-buildwithsw_versreporting 26.6.2. The build completes, the installedconfig.hhas neither macro, andIO.pipe,IO#close_on_exec?andIO.popenall behave.Fixes #2640
https://bugs.ruby-lang.org/issues/22311
Generated with Claude Code