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

misc pkgs: various cross fixes in preparation for darwin->linux for 18.09 #46858

Merged
merged 4 commits into from Sep 18, 2018

Conversation

Ericson2314
Copy link
Member

Motivation for this change

Backport of #46857.

Things done
  • Tested using sandboxing (nix.useSandbox on NixOS, or option sandbox in nix.conf on non-NixOS)
  • Built on platform(s)
    • NixOS
    • macOS
    • other Linux distributions
  • Tested via one or more NixOS test(s) if existing and applicable for the change (look inside nixos/tests)
  • Tested compilation of all pkgs that depend on this change using nix-shell -p nox --run "nox-review wip"
  • Tested execution of all binary files (usually in ./result/bin/)
  • Determined the impact on package closure size (by running nix path-info -S before and after)
  • Fits CONTRIBUTING.md.

@Ericson2314 Ericson2314 changed the title Darwin to linux prep misc pkgs: various cross fixes in preparation for darwin->linux for 18.09 Sep 18, 2018
@GrahamcOfBorg GrahamcOfBorg added 6.topic: darwin Running or building packages on Darwin 6.topic: stdenv Standard environment labels Sep 18, 2018
@@ -324,7 +326,8 @@ in

extraNativeBuildInputs = [ prevStage.patchelf prevStage.paxctl ] ++
# Many tarballs come with obsolete config.sub/config.guess that don't recognize aarch64.
lib.optional (!localSystem.isx86) prevStage.updateAutotoolsGnuConfigScriptsHook;
lib.optional (!localSystem.isx86 || localSystem.libc == "musl")
prevStage.updateAutotoolsGnuConfigScriptsHook;
Copy link
Member

Choose a reason for hiding this comment

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

I can't remember if I asked before but I was wondering if we could just do this on x86 as well? Just for consistency.

Copy link
Member Author

Choose a reason for hiding this comment

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

@matthewbauer I would always do it on all platforms, but that's a mass rebuild on hydra-cached platforms. I'm taking advantage of MUSL's tier-n+1 status to do this right on master :D.

@matthewbauer
Copy link
Member

IMO putting this in 18.09 is high risk little reward. Better to just shoot for 19.03 being the version that supports macOS -> Linux compilation. We have enough time to work out the kinks.

@Ericson2314
Copy link
Member Author

Ericson2314 commented Sep 18, 2018

What's the risk? Not too much is being changed, and none of it affects native builds.

@Ericson2314
Copy link
Member Author

Oh you mean the overall thing?

@matthewbauer
Copy link
Member

Yeah I guess if it's not a mass rebuild it's fine but otherwise it seems like there are always random issues with these kind of stdenv changes.

@GrahamcOfBorg
Copy link

Success on x86_64-linux (full log)

Attempted: gcc

Partial log (click to expand)

/nix/store/iw94llkj05wgaz268mlzvgx8jkbi1ss0-gcc-wrapper-7.3.0

@GrahamcOfBorg
Copy link

Success on aarch64-linux (full log)

Attempted: gcc

Partial log (click to expand)

/nix/store/pcrn3iq0i5s590mlp8v6m7jp1rn7h61r-gcc-wrapper-7.3.0

@GrahamcOfBorg
Copy link

Success on x86_64-darwin (full log)

Attempted: gcc

Partial log (click to expand)

/nix/store/jcq8f90rikrir6pmvjv48m4p2a89ss99-gcc-wrapper-7.3.0

…r assertions

This is needed to access attributes of derivations on platforms where
they cannot be built.
Want to make sure these are the same per host platform, without duplication.
Only the regular GCC is built with a libc dependency.
This isn't a MUSL thing, but just needed for cross compilation to x86.
No one had tried this when all cross compilation was to linux + glibc,
hence why no one noticed this until recently.
@GrahamcOfBorg
Copy link

Success on x86_64-linux (full log)

Attempted: gcc

Partial log (click to expand)

/nix/store/iw94llkj05wgaz268mlzvgx8jkbi1ss0-gcc-wrapper-7.3.0

@GrahamcOfBorg
Copy link

Success on x86_64-darwin (full log)

Attempted: gcc

Partial log (click to expand)

/nix/store/jcq8f90rikrir6pmvjv48m4p2a89ss99-gcc-wrapper-7.3.0

@GrahamcOfBorg
Copy link

Success on aarch64-linux (full log)

Attempted: gcc

Partial log (click to expand)

/nix/store/pcrn3iq0i5s590mlp8v6m7jp1rn7h61r-gcc-wrapper-7.3.0

@Ericson2314 Ericson2314 merged commit 5b053b4 into NixOS:release-18.09 Sep 18, 2018
@Ericson2314 Ericson2314 deleted the darwin-to-linux-prep branch September 18, 2018 20:52
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
6.topic: darwin Running or building packages on Darwin 6.topic: stdenv Standard environment 10.rebuild-darwin: 0 10.rebuild-linux: 0
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants