You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I've been testing out pkgx recently to see if I can use it to replace usage of dnf or apt across different linux distros.
I've run into two separate issues when trying to use gcc on fedora and ubuntu.
Such that, compilation works when I dnf or apt install gcc, and does not when I pkgx install gcc
Is this something that I should report here or elsewhere?
It depends on what problem you're having. If it's a problem with the environment construction, then this is the correct repo. If it's a problem with the gnu.org/gcc formula, then pkgxdev/pantry.
It might specifically be an issue with the pkgx install scripts. If you instead use pkgx +gcc^{version} ... as your command line instead of using install, do you experience the same issues? That would point to a problem with the install methodology.
You could try running your makefile (or whatever) with CC='pkgx +gnu.org/gcc^14 gcc' or pkgx +gcc^14 +make make, as an example, to use pkgx to manage the full environment.
the build system couldn't find x86_64-linux-gnu-gcc
yes, we don't add the system-target binaries to the provides: key for gnu.org/gcc. this would be solved using pkgx +gnu.org/gcc, but because they aren't listed as a provided binary, no installation shim exists.
(1) `x86_64-linux-gnu-gcc` not found on Ubuntu — root cause confirmed. The `gnu.org/gcc` recipe doesn't install the Debian-style multi-arch triplet symlinks that autoconf / distutils / pip build backends probe for. PR #pending adds them.
(2) `stdlib.h: No such file or directory` on Fedora — separate problem: pkgx gcc relies on system glibc-devel for `/usr/include/stdlib.h`. On a minimal Fedora docker base without glibc-devel, that header isn't there, and pkgx doesn't currently ship a glibc bottle that would substitute.
Fixing (2) properly needs a `gnu.org/glibc` bottle in pantry + the gcc recipe wired to use its headers via `--sysroot` or `CPATH`. This is non-trivial (see #12968 — the glibc bottle work — and brewkit#348 / the `bklibcvenv` pattern), but it's the right path for a fully-isolated pkgx-only toolchain.
Workaround until that lands: install your distro's `glibc-devel` / `libc6-dev` package on the host (`dnf install glibc-devel` / `apt install libc6-dev`). Then pkgx gcc picks them up from `/usr/include`.
Activity
jhheider commentedon Oct 11, 2024
It depends on what problem you're having. If it's a problem with the environment construction, then this is the correct repo. If it's a problem with the
gnu.org/gccformula, thenpkgxdev/pantry.It might specifically be an issue with the
pkgx installscripts. If you instead usepkgx +gcc^{version} ...as your command line instead of usinginstall, do you experience the same issues? That would point to a problem with theinstallmethodology.You could try running your makefile (or whatever) with
CC='pkgx +gnu.org/gcc^14 gcc'orpkgx +gcc^14 +make make, as an example, to use pkgx to manage the full environment.PhilipDeegan commentedon Oct 11, 2024
The errors, were during compilation of python package during a pip install.
I think the ubuntu issue was, the build system couldn't find
x86_64-linux-gnu-gccand the fedora issue was a missing standard header
it's possible what you suggest might work, but I'm not sure compilation during pip install uses CC or CXX
mxcl commentedon Oct 11, 2024
This is probably a deeper problem with how we add the gcc headers to the env.
jhheider commentedon Oct 11, 2024
yes, we don't add the system-target binaries to the
provides:key forgnu.org/gcc. this would be solved usingpkgx +gnu.org/gcc, but because they aren't listed as a provided binary, no installation shim exists.PhilipDeegan commentedon Oct 12, 2024
you can see the fedora error here
the ubuntu issue was happening locally for me during a
docker build(but still during pip install internally)you should be able to reproduce this via
comment out this line
and add
if_install gcc -vheretannevaled commentedon May 29, 2026
Took a look — split the issue into two:
(1) `x86_64-linux-gnu-gcc` not found on Ubuntu — root cause confirmed. The `gnu.org/gcc` recipe doesn't install the Debian-style multi-arch triplet symlinks that autoconf / distutils / pip build backends probe for. PR #pending adds them.
(2) `stdlib.h: No such file or directory` on Fedora — separate problem: pkgx gcc relies on system glibc-devel for `/usr/include/stdlib.h`. On a minimal Fedora docker base without glibc-devel, that header isn't there, and pkgx doesn't currently ship a glibc bottle that would substitute.
Fixing (2) properly needs a `gnu.org/glibc` bottle in pantry + the gcc recipe wired to use its headers via `--sysroot` or `CPATH`. This is non-trivial (see #12968 — the glibc bottle work — and brewkit#348 / the `bklibcvenv` pattern), but it's the right path for a fully-isolated pkgx-only toolchain.
Workaround until that lands: install your distro's `glibc-devel` / `libc6-dev` package on the host (`dnf install glibc-devel` / `apt install libc6-dev`). Then pkgx gcc picks them up from `/usr/include`.
merge main: resolve gcc/package.yml conflict
fix(gcc): drop runtime.env CPATH/LIBRARY_PATH override (broke own build)
fix(gnu.org/gcc): wrapper drops host include path (Nix cc-wrapper style)
fix(gnu.org/gcc): add Debian multi-arch triplet symlinks (addresses #…
fix(gnu.org/gcc): add libc-wrapper for end-user pkgx gcc (pkgxdev#8423)
fix(gnu.org/gcc): wrapper drops host include path (Nix cc-wrapper style)
overrides: gcc gets a triplet on every arch, and no link without one (#…
jhheider commentedon Oct 19, 2026
Triplet symlinks landed in #13083. The Fedora header error needs system glibc-devel.