-
-
Notifications
You must be signed in to change notification settings - Fork 14.5k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Reference on xgcc-*-libgcc
package
#227981
Comments
Correct. That is not a bug. Glibc has required libgcc for over a decade by now; we simply weren't packaging it separately. |
I don't use systemd or NixOS, so maybe this makes no sense, but can't you just use |
Thanks for responding so quickly, @amjoseph-nixpkgs!
I guess I didn't convey what's the issue: I'm well aware that you added a dedicated package intentionally. I'm just not sure how I could get a reference to that package which is now part of almost any closure.
That would be totally acceptable to me, yes! However, that's not the correct package: $ nix why-depends github:nixos/nixpkgs/5f57c2e#hello github:nixos/nixpkgs/5f57c2e#stdenv.cc.cc.libgcc
'github:nixos/nixpkgs/5f57c2e#hello' does not depend on 'github:nixos/nixpkgs/5f57c2e#stdenv.cc.cc.libgcc'
$ nix build --print-out-paths --no-link github:nixos/nixpkgs/5f57c2e#stdenv.cc.cc.libgcc
/nix/store/5vw1jps97aj3r76rkj7jmq8wijssipji-gcc-12.2.0-libgcc The required dependency is $ nix path-info -r $(nix build --print-out-paths --no-link github:nixos/nixpkgs/5f57c2e#hello) | grep "libgcc"
/nix/store/inc9pp65rs7nxi3pv0mm35kj4arp9v67-xgcc-12.2.0-libgcc
$ nix why-depends github:nixos/nixpkgs/5f57c2e#hello /nix/store/inc9pp65rs7nxi3pv0mm35kj4arp9v67-xgcc-12.2.0-libgcc
/nix/store/jfyz86p3fgpadwxc16gzvwar6sh42gvw-hello-2.12.1
└───/nix/store/qgfa76mgh1m1376npkwbmlsdwycl96k1-glibc-2.35-224
└───/nix/store/inc9pp65rs7nxi3pv0mm35kj4arp9v67-xgcc-12.2.0-libgcc |
Are you looking for: |
That was easy: $ nix why-depends github:nixos/nixpkgs/5f57c2e#hello github:nixos/nixpkgs/5f57c2e#glibc.libgcc
/nix/store/jfyz86p3fgpadwxc16gzvwar6sh42gvw-hello-2.12.1
└───/nix/store/qgfa76mgh1m1376npkwbmlsdwycl96k1-glibc-2.35-224
└───/nix/store/inc9pp65rs7nxi3pv0mm35kj4arp9v67-xgcc-12.2.0-libgcc Thanks a lot @wegank 🙏🏻 |
Ah, try
|
Issue description
Since #209870, every package which depends on
glibc
has a dependency onxgcc-*-libgcc
:nix path-info -r $(nix build --print-out-paths --no-link github:nixos/nixpkgs/5f57c2e#hello)
As far as I can tell, there's no attribute which exposes the derivation.
For some of our systemd services running in a chroot jail, we use explicit confinement. Think
systemd.services.<name>.confinement.packages
but for the entire unit. Consider the following example systemd service which runshello
in a chroot jail before #209870:Is there any way I can get a reference on
xgcc-*-libgcc
to add the package toBindReadOnlyPaths=
?stdenv.cc.cc.libgcc
is a dependency I'd expect but, quite frankly, I don't understand the bootstrapping of GCC well enough.cc @amjoseph-nixpkgs who authored #209870.
The text was updated successfully, but these errors were encountered: