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

Conversation

angerman
Copy link
Contributor

@angerman 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
Copy link
Contributor Author

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

/cc @Ericson2314 @matthewbauer

@Ericson2314
Copy link
Member

@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";
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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

@angerman
Copy link
Contributor Author

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
Development

Successfully merging this pull request may close these issues.

None yet

4 participants