-
-
Notifications
You must be signed in to change notification settings - Fork 12.7k
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
Installing any gcc version also installs version 10 and defaults to the latter #127249
Comments
@lebel-louisjacob its actually worse than that, its happening for any gcc version. Can you amend your issue title? [manny@nixc3small:~]$ for v in 48 49 6 7 8 9 10 11; do echo want gcc$v; nix-shell -p gcc$v --run "gcc -v |& grep 'gcc version'; which gcc"; done
want gcc48
gcc version 10.3.0 (GCC)
/nix/store/x0xd1vp2w7n38g0hzflzy8p6hyl0dwic-gcc-wrapper-10.3.0/bin/gcc
want gcc49
gcc version 10.3.0 (GCC)
/nix/store/x0xd1vp2w7n38g0hzflzy8p6hyl0dwic-gcc-wrapper-10.3.0/bin/gcc
want gcc6
gcc version 10.3.0 (GCC)
/nix/store/x0xd1vp2w7n38g0hzflzy8p6hyl0dwic-gcc-wrapper-10.3.0/bin/gcc
want gcc7
gcc version 10.3.0 (GCC)
/nix/store/x0xd1vp2w7n38g0hzflzy8p6hyl0dwic-gcc-wrapper-10.3.0/bin/gcc
want gcc8
gcc version 10.3.0 (GCC)
/nix/store/x0xd1vp2w7n38g0hzflzy8p6hyl0dwic-gcc-wrapper-10.3.0/bin/gcc
want gcc9
gcc version 10.3.0 (GCC)
/nix/store/x0xd1vp2w7n38g0hzflzy8p6hyl0dwic-gcc-wrapper-10.3.0/bin/gcc
want gcc10
gcc version 10.3.0 (GCC)
/nix/store/x0xd1vp2w7n38g0hzflzy8p6hyl0dwic-gcc-wrapper-10.3.0/bin/gcc
want gcc11
gcc version 10.3.0 (GCC)
/nix/store/x0xd1vp2w7n38g0hzflzy8p6hyl0dwic-gcc-wrapper-10.3.0/bin/gcc |
I've just started a bisect run, I'm starting on 0b83126 as my good. |
The git bisect came back with af80265 as the bad commit:
|
which looking at the commit doesn't seem to make sense. So tried gcc8 instead of gcc9 and am seeing the same behavior! [02:11:21]-[~/cloned/NixOS/nixpkgs]─[manny@nixc3small]>
git checkout 0b8312660aaa34cc87bdf5e3776bcaf4c5ba3c59
HEAD is now at 0b8312660aa gcc10: fix building darwin->linux cross compiler
[02:11:37]-[~/cloned/NixOS/nixpkgs]─[manny@nixc3small]>
nix-shell -I nixpkgs=. -p gcc8 --run 'gcc -v|& grep version'
gcc version 9.3.0 (GCC) |
Going further back to when gcc7 came into the tree shows the expected behavior. Bisecting from there. |
Bisecting once again got me to:
it seems building gcc is broken during these commits so git bisect can't figure out the exact commit. Looking at the commit diffs: I'll try to get gcc building again during those commits to see if I can track down the actual commit. |
I'm going to try and get @Ericson2314 's attention here |
* Need to use gcc10 instead of gcc11 because of an outstanding bug that prevents from using any other version. That means the .so file is not correctly linked. We use gcc10 instead of using an older nixpkgs pin because we would lack other dependencies otherwise Ref: NixOS/nixpkgs#127249 * Refactor nix derivations and add readme info
I think this is a common user error due to the way nix-shell works. I don't know a way to do what you want on the command-line, but you can use a shell.nix:
|
Derp. Thanks! |
Hey @r-burns thanks for this info, makes sense 🤦 . I wonder if theres an easy enough way to treat the |
Not helpful if you need to use |
nice, and as of June 24 we can do |
I marked this as stale due to inactivity. → More info |
what is |
It took me one copy-paste in the search bar to find the info. At least the post reminded me to unsubscribe from here I guess |
@gagbo it just leads to another similar question: what is There's exactly one match in the official nixpkgs manual (https://nixos.org/manual/nixpkgs/stable/) that doesn't shed a light on that question either. |
Describe the bug
I tried to launch a shell using the gcc11 package, but
gcc -v
yields "10.3.0" instead of "11.1.0"To Reproduce
Steps to reproduce the behavior:
nix-shell -p gcc11
gcc -v
and recognise something's offExpected behavior
I would expect the version of gcc to be 11.1.0
Actual behavior
The version of gcc being selected is 10.3.0.
Screenshots
Additional context
Both gcc 11.1.0 and 10.3.0 get installed, and both are in
$PATH
, but 10.3.0 is the first listed in there:Manually removing
gcc-10.3.0/bin
from$PATH
is my current workaround, which isn't really user-friendly.Notify maintainers
@alyssais
Metadata
Maintainer information:
The text was updated successfully, but these errors were encountered: