fix(gnu.org/gcc): wire libc + linux-headers (closes #8423)#13084
Closed
tannevaled wants to merge 2 commits into
Closed
fix(gnu.org/gcc): wire libc + linux-headers (closes #8423)#13084tannevaled wants to merge 2 commits into
tannevaled wants to merge 2 commits into
Conversation
Adds gnu.org/glibc + kernel.org/linux-headers as Linux runtime deps, and runtime.env CPATH/LIBRARY_PATH so end-user `pkgx gcc test.c` resolves stdlib.h, crt*.o, libc.so.6 from the pkgx-integrated bottle — without needing distro glibc-devel / libc6-dev (fixes Fedora repro in pkgxdev#8423). Pairs with pkgxdev#13083 (multi-arch triplet symlinks) to fully close pkgxdev#8423. Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
The runtime.env CPATH/LIBRARY_PATH leaked into gcc's own build (because
gcc bootstrap-depends on gcc), replacing brewkit's composed CPATH with
just glibc's include dir — and configure then couldn't find gmp.h:
checking for the correct version of gmp.h... no
configure: error: Building GCC requires GMP 4.2+, MPFR 3.1.0+ and MPC 0.8.0+.
The Linux glibc + linux-headers deps remain (they help downstream
packages link against the pkgx-integrated libc). The end-user CPATH
problem from pkgxdev#8423 needs a non-self-referential mechanism (configure
flag like --with-native-system-header-dir, or a wrapper script).
Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
Contributor
Author
|
Closing — adding gnu.org/glibc as a build dep caused gcc's own fixincludes link to fail with |
This was referenced May 29, 2026
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.
Summary
gnu.org/glibc+kernel.org/linux-headersas Linux runtime deps forgnu.org/gcc.runtime.envCPATH/LIBRARY_PATHpointing at the bottled glibc, so end-userpkgx gcc test.cresolvesstdlib.h,crt*.o, andlibc.so.6from the pkgx-integrated bottle.glibc-devel/libc6-dev(fixes the Fedora repro in Inconsistencies with dnf/apt install gcc #8423).Implements the pkgx-integrated approach: resolve from-source toolchain problems with versions bundled in pkgx rather than depending on host packages.
Test plan
glibc-devel,pkgx gcc test.c -o testsucceedspkgx gcc -print-search-dirsshows the bottled glibc lib pathdarwinbuilds unchanged🤖 Generated with Claude Code