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
rpm: add openmp when building with clang #97630
Conversation
This is my first attempt to contribute to Nix. I'm unsure if pulling in llvmPackages like that is the correct thing, and am generally open to feedback. :) |
The default compiler on linux is gcc, on darwin it's clang.
It's no massive sin, it's just in this case instead of making this conditional on Or if a darwin person tries to build it with gcc, I guess... |
Also, welcome! |
The Darwin build has been broken with a missing header file "omp.h"; llvmPackages.openmp provides it. Including this library is only necessary when clang is used.
Ah, yes. That would explain it. It might also explain a few other failures I saw when looking through the Darwin build failures that looked like syntax errors. I bet they only compile with gcc.
And, yeah, that then seems the reasonable answer. Thanks! I've made the change locally and am rebuilding it to verify; I'll push an update shortly. |
4766c7c
to
b8e0f0c
Compare
You'll probably find that it won't rebuild because it will evaluate down to exactly the same thing. |
Yeah, I had to rm the result and garbage collect to force it to rebuild. Thanks for the advice and the merge! |
In such cases, you don't generally need to bother with a rebuild. In weird cases where you do (maybe debugging a randomly unreliable build?) you can use |
Ah, cool. I thought that might be the case but wanted to be certain I wasn't breaking anything. |
The Darwin build has been broken with a missing header file "omp.h";
llvmPackages.openmp provides it.
I'm unsure why this isn't necessary on Linux.
Motivation for this change
This fixes a broken build on Darwin, as part of ZHF for 20.09.
ZHF: #97479
Things done
sandbox
innix.conf
on non-NixOS linux)nix-shell -p nixpkgs-review --run "nixpkgs-review wip"
./result/bin/
)nix path-info -S
before and after)