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
{cc,bintools}-wrapper, ghc, libgcc: Define wrapper env vars as full paths #44767
{cc,bintools}-wrapper, ghc, libgcc: Define wrapper env vars as full paths #44767
Conversation
export CC="${targetCC}/bin/${targetCC.targetPrefix}cc" | ||
export CXX="${targetCC}/bin/${targetCC.targetPrefix}cxx" | ||
export CC="$CC_FOR_TARGET" | ||
export CXX="$CXX_FOR_TARGET" | ||
# Use gold to work around https://sourceware.org/bugzilla/show_bug.cgi?id=16177 | ||
export LD="${targetCC.bintools}/bin/${targetCC.bintools.targetPrefix}ld${stdenv.lib.optionalString targetPlatform.isAarch32 ".gold"}" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why is this one not changed?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Because we are forcing gold to be used
Failure on x86_64-darwin (full log) Attempted: libgcc Partial log (click to expand)
|
Success on x86_64-linux (full log) Attempted: libgcc Partial log (click to expand)
|
Success on aarch64-linux (full log) Attempted: libgcc Partial log (click to expand)
|
@GrahamcOfBorg build stdenv |
Timed out, unknown build status on x86_64-darwin (full log) Attempted: stdenv Partial log (click to expand)
|
Success on x86_64-linux (full log) Attempted: stdenv Partial log (click to expand)
|
Success on aarch64-linux (full log) Attempted: stdenv Partial log (click to expand)
|
I cannot test on Darwin at the moment, but it seems unlikely that this would cause any problems. |
I see a disadvantage: some packages tend to save these variables somewhere in the outputs, so this PR blows runtime closures for those. Example where it results into a failure due to closure check: https://hydra.nixos.org/build/79797093 Most of these cases probably can be handled, e.g. put those files into |
Agh, nothing comes free. Thank you very much for catching, @vcunat. |
Several packages started failing with some libtool error that might be due to this – any ideas? https://hydra.nixos.org/build/79808675 |
|
No, my bad, I don't know a workaround. (I confused two packages together.) |
Some packages just can't handle them #44767. It was tempting to try to abstract this in some way, but I didn't do that ATM.
Well, this is in master now, but we would better fixup at least the most common closure offenders, e.g. python. EDIT: or
|
This appears to break windows builds too: https://hydra.nixos.org/build/79957713/ Error is:
|
…nv-var-path" This reverts commit 89efc27, reversing changes made to d0f1102. Fixes NixOS#44936
This reverts commit 38eea80.
This reverts commit 38eea80.
Motivation for this change
This makes builds more robust by having the env vars not rely on the PATH. That, for example, helps keep separate toolchains untangled even when on native builds neither are prefixed.
Things done
sandbox
innix.conf
on non-NixOS)nix-shell -p nox --run "nox-review wip"
./result/bin/
)nix path-info -S
before and after)CC @bgamari we talked about this once