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
perl: Work around cross-compilation issue with gcc 7 #35529
Conversation
nativeBuildInputs = [ buildPackages.stdenv.cc ]; | ||
# Hacky! But not sure how else we can access a native-targeted gcc6 | ||
# https://github.com/arsv/perl-cross/issues/60 | ||
nativeBuildInputs = [ buildPackages.buildPackages.gcc6 ]; |
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.
@Ericson2314 can we do better than this?
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.
depsBuildBuild = [ buildPackages.stdenv.cc ];
I think, though I'm still not sure in cross stuff.
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.
This is at least what we do in (some) other cases when a build needs to compile stuff to use it during the build already.
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.
@vcunat That's what was here, but I specifically need gcc6
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.
I didn't see depsBuildBuild
here.
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.
Ah, right, it was nativeBuildInputs. But even putting in depsBuildBuild, simple buildPackages.gcc6
gives me a cross-compiler, I need the double buildPackages
(which seems wrong).
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.
That's surprising to me. It might be a bug in the implementation, docs, or my understanding...
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.
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.
OK #35543 should now explain everything, but the short answer is this should be
depsBuildBuild = [ gcc6 ];
which, after elaborating the effect of callPackage
splicing, is equivalentl to
depsBuildBuild = [ buildPackages.buildPackages.gcc6 ];
Success on x86_64-linux (full log) Partial log (click to expand)
|
Success on aarch64-linux (full log) Partial log (click to expand)
|
Success on x86_64-darwin (full log) Partial log (click to expand)
|
FWIW I can confirm the segfault behavior occurred on aarch64-musl as well (with gcc7) and that this fix resolved the problem. Thanks! |
No description provided.