-
-
Notifications
You must be signed in to change notification settings - Fork 14.2k
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
missing commands: gcov, gcc-ar, gcc-ranlib and others #86272
Comments
You can get access to these through |
Thank you for your suggestion. I didn't know I can refer to unwrapped gcc as gcc.cc. I think now I can configure my environment correctly. Using gcc.cc instead of gcc fixes the problem with gcov program. gcov is installed correctly now. Unfortunately g++ form unwrapped gcc doesn't work (somewhat expectedly). Compiling a simple hello world program prints this linker error:
If I build system with both gcc.cc and gcc the same linker error remains. Quick googling showed a thing called package priority. I'll take a look at it. I think using priorities I can configure my system in a way both g++ and gcov work. In any case I believe the user experience can be improved here. As a user I believe the best name for the package is gcc and it should provide both wrapped gcc/g++ and gcov. |
After reading cc-wrapper/default.nix, I think perhaps something like this would fix my problem:
Could somebody more familiar with cc-wrapper, comment if this is a reasonable approach? |
ping |
I marked this as stale due to inactivity. → More info |
Still relevant |
I've encountered same issue while building docker image with nix. Still relevant. |
What to do if these are not available at all, i.e. GCC has been installed that way? |
Describe the bug
gcc/g++ are not the only commands that are produced by gcc package. There are others. gcov is useful when code coverage need to be computed. gcc-ar/gcc-ranlib are needed when link-time optimization is used.
Apparently newer versions of NixOS don't add these and others gcc commands to system-path/bin.
From what I can see the problem is caused by gcc-wrapper package as it wraps only cpp/gcc/g++ leaving others commands inaccessible.
To Reproduce
In shell running gcov prints "gcov: command not found". Same for other commands provided by gcc package.
Expected behavior
The expected result of running gcov is: "Usage: gcov [OPTION...] SOURCE|OBJ...". Same for other commands.
Metadata
$ shell -p nix-info --run "nix-info -m"
error: attribute 'system' missing, at (string):1:1
0
Linux 4.19.90, NixOS, 19.09.git.dc8a496 (Loris)
no
yes
nix-env (Nix) 2.3
"nixos-14.12.335.676e8d7"
"nixos-14.12.801.221101a"
/nix/var/nix/profiles/per-user/root/channels/nixos
The NixOS version I run is 19.09 based on commit 83c8fe6.
The text was updated successfully, but these errors were encountered: