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

glibc, openssl: unbreak cross eval (with minor caveats) #79738

Merged
merged 1 commit into from Feb 10, 2020

Conversation

vcunat
Copy link
Member

@vcunat vcunat commented Feb 10, 2020

It's certainly better to have those two caveats than not evaluate.
Both seem rather niche. Unfortunately I failed to find a better way.
I started testing builds of several cross variants; all seem OK.

Fixes #79610 (with minor caveats)

It's certainly better to have those two caveats than not evaluate.
Both seem rather niche.  Unfortunately I failed to find a better way.
I started testing builds of several cross variants; all seem OK.
@vcunat vcunat added this to the 20.03 milestone Feb 10, 2020
@vcunat vcunat added 0.kind: bug 0.kind: regression Something that worked before working no longer 6.topic: cross-compilation Building packages on a different sort platform than than they will be run on labels Feb 10, 2020
@vcunat
Copy link
Member Author

vcunat commented Feb 10, 2020

Tested building bash on some cross examples that came into my mind:

nix build -f . bash --arg crossSystem '(import ./lib).systems.examples.armv7l-hf-multiplatform'
nix build -f . bash --arg crossSystem '(import ./lib).systems.examples.aarch64-multiplatform'
nix build -f . bash --arg crossSystem '(import ./lib).systems.examples.musl64'

@Ericson2314
Copy link
Member

Is the separateDebugInfo completely separate?

@vcunat
Copy link
Member Author

vcunat commented Feb 10, 2020

It's separate in the sense of being put into a separate derivation output, openssl.debug in this case.

Copy link
Member

@FRidh FRidh left a comment

Choose a reason for hiding this comment

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

Tested cross eval

separateDebugInfo = !(stdenv.hostPlatform.useLLVM or false) && stdenv.cc.isGNU;
separateDebugInfo = !(stdenv.hostPlatform.useLLVM or false)
&& stdenv.hostPlatform == stdenv.buildPlatform # unable to fix infinite recursion on stdenv.cc
&& stdenv.cc.isGNU;
Copy link
Member

Choose a reason for hiding this comment

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

the fix is good, but it sounds like we need to tweak llvm to work with separate-debug-info.sh, since I bet that everything is broken, not just openssl.

Copy link
Member Author

Choose a reason for hiding this comment

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

Right, that certainly seems preferable, but I have no idea about difficulty of that :-)

vcunat added a commit that referenced this pull request Feb 10, 2020
@vcunat vcunat merged commit c203848 into NixOS:master Feb 10, 2020
@vcunat vcunat deleted the p/glibc-2.30-cross branch February 10, 2020 18:23
@vcunat
Copy link
Member Author

vcunat commented Feb 10, 2020

I merged relatively fast to avoid additional cherry-pick after 20.03 branch-off. We can improve later if there's an idea how.

vcunat added a commit to vcunat/nixpkgs that referenced this pull request Feb 14, 2020
Thanks to python3Minimal.  This reverts part of c203848 NixOS#79738.
worldofpeace pushed a commit that referenced this pull request Feb 15, 2020
Thanks to python3Minimal.  This reverts part of c203848 #79738.

(cherry picked from commit 5a8000d)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
0.kind: bug 0.kind: regression Something that worked before working no longer 1.severity: blocker 6.topic: cross-compilation Building packages on a different sort platform than than they will be run on 10.rebuild-darwin: 0 10.rebuild-linux: 0
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Cross-compilation is broken since glibc 2.30 got merged
4 participants