Skip to content
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

Fix GCC cross compilation #91089

Closed
wants to merge 1 commit into from
Closed

Fix GCC cross compilation #91089

wants to merge 1 commit into from

Conversation

@angerman
Copy link
Contributor

angerman commented Jun 19, 2020

When cross compiling ghc, we end up with the sanitizer libraries in $lib,
however they still refer to (in their rpaths in the so's). Thus we
have a cycle $lib -> $out -> $lib, and nix will complain. I'm not sure
why they multi-output logic doesn't patchelf the rpaths, but it apparently
doesn't.

When cross compiling ghc, we end up with the sanitizer libraries in ,
however they still refer to  (in their rpaths in the so's).  Thus we
have a cycle  ->  -> , and nix will complain.  I'm not sure
why they multi-output logic doesn't patchelf the rpaths, but it apparently
doesnt.
@angerman angerman requested a review from matthewbauer as a code owner Jun 19, 2020
@angerman
Copy link
Contributor Author

angerman commented Jun 19, 2020

This is a hack, I'd be happy to be informed about a better solution.

/cc @Ericson2314 @matthewbauer

@Ericson2314
Copy link
Member

Ericson2314 commented Jun 19, 2020

@angerman informs me this is mac -> linux cross compilation in particular.

@parthy
Copy link
Contributor

parthy commented Jun 19, 2020

Sounds like what is being discussed in #88213.

@@ -88,7 +88,7 @@ stdenv.mkDerivation ({

inherit patches;

outputs = [ "out" "man" "info" ] ++ stdenv.lib.optional (!langJit) "lib";
outputs = [ "out" "man" "info" ] ++ stdenv.lib.optional (!langJit && targetPlatform == hostPlatform) "lib";

This comment has been minimized.

Copy link
@matthewbauer

matthewbauer Jun 19, 2020

Member

we definitely want the lib output in cross so that our cross closures don't accidentally pull in the compiler

This comment has been minimized.

Copy link
@angerman

angerman Jun 20, 2020

Author Contributor

I’m not questioning that. This is just what breaks it right now.

@angerman
Copy link
Contributor Author

angerman commented Jun 20, 2020

Indeed looks like this is a duplicate of #88213

@angerman angerman closed this Jun 20, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Linked issues

Successfully merging this pull request may close these issues.

None yet

4 participants
You can’t perform that action at this time.