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

Basic Darwin->Darwin cross support #25047

Closed
wants to merge 8 commits into from

Conversation

Ericson2314
Copy link
Member

@Ericson2314 Ericson2314 commented Apr 20, 2017

Motivation for this change

First batch of cleaned-up up history from #24983 (comment)

Should not change any native hashes, but may break some Haskell cross compiling --- I hope that's OK otherwise there's just going to be too much to merge at once.

Depends on #25044 for testing on darwin.

Things done
  • Tested using sandboxing
    (nix.useSandbox on NixOS,
    or option build-use-sandbox in nix.conf
    on non-NixOS)
  • Built on platform(s)
    • NixOS
    • macOS
    • Linux
  • 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/)
  • Fits CONTRIBUTING.md.

@mention-bot
Copy link

@Ericson2314, thanks for your PR! By analyzing the history of the files in this pull request, we identified @edolstra, @bgamari, @aszlig, @LnL7 and @copumpkin to be potential reviewers.

@Ericson2314 Ericson2314 added the 6.topic: cross-compilation Building packages on a different sort platform than than they will be run on label Apr 20, 2017
@matthewbauer
Copy link
Member

This looks like it's a mass-rebuild? Definitely should go into staging first then.

@Ericson2314
Copy link
Member Author

Only for cross. Native hashes are unchanged. It would be prettier of it were a mass rebuild :).

@copumpkin
Copy link
Member

It would be helpful, if you can't split this up further, if you summarized what you changed and why. It's pretty hard to review 1200+ lines of diff changing all sorts of core behavior in difficult-to-follow ways.

@copumpkin
Copy link
Member

Or if there's a high-level description of why and the new design, that would also help. A giant mass of code changing core stdenv stuff is hard though 😄

@Ericson2314
Copy link
Member Author

Ericson2314 commented Apr 20, 2017

I'll split off the first few lib changes. Those are easy cause they don't change any hashes. In the rest, turns out I am getting a native rebuild which is very odd. I'll beef up commit messages etc while fixing that. Sorry for the jumble, but I wrote all these changes very hastily to begin with 😁.

@Ericson2314 Ericson2314 force-pushed the cross-foundation branch 2 times, most recently from 583e5cb to edd68ad Compare April 21, 2017 21:28
@Ericson2314 Ericson2314 mentioned this pull request Apr 21, 2017
7 tasks
@Ericson2314
Copy link
Member Author

Ericson2314 commented Apr 21, 2017

Split out #25099, which is merged. edit merged.

@Ericson2314 Ericson2314 force-pushed the cross-foundation branch 3 times, most recently from 2bd38bd to 733b9cd Compare April 24, 2017 16:58
@Ericson2314
Copy link
Member Author

Split out tiny cleanup #25186 which also doesn't change any hashes.

@Ericson2314
Copy link
Member Author

Ericson2314 commented Apr 24, 2017

Split out #25194, which redefines stdenv.cross and replaces a few gcc-related uses invalidated by the new definition. edit merged.

@Ericson2314 Ericson2314 force-pushed the cross-foundation branch 4 times, most recently from e9247e6 to 32bf1b8 Compare April 25, 2017 19:39
@Ericson2314
Copy link
Member Author

http://hydra.nixos.org/jobset/nixpkgs/pr-25047 for regression test.

@Ericson2314 Ericson2314 force-pushed the cross-foundation branch 2 times, most recently from 9955cb7 to d8405ad Compare April 25, 2017 21:34
@matthewbauer
Copy link
Member

So how do you test on Darwin? I've tried:

$ nix-build pkgs/top-level/release-cross.nix -A rpi.unzip
these derivations will be built:
  /nix/store/v8a9ibjxnwk275a5ly7a6fyv7ma3swdm-unzip-6.0-armv6l-unknown-linux-gnueabi.drv
building path(s) ‘/nix/store/vf1vjls11ss078wa27h8hkmpkm2z2b9n-unzip-6.0-armv6l-unknown-linux-gnueabi’
error: a ‘x86_64-linux’ is required to build ‘/nix/store/v8a9ibjxnwk275a5ly7a6fyv7ma3swdm-unzip-6.0-armv6l-unknown-linux-gnueabi.drv’, but I am a ‘x86_64-darwin’

@Ericson2314
Copy link
Member Author

Ericson2314 commented Apr 26, 2017

@matthewbauer Uh I was using this in conjunction with @shlevy's impure iOS stuff on darwin. As I found when I added the last commit adding some darwin tests, more work will be needed to test end-to-end purely :(. I'll get to that, though.

If you want, try building buildPackages.binutils on darwin and linking by hand or something.

@Ericson2314
Copy link
Member Author

Ericson2314 commented Apr 26, 2017

After slaving away to make it hash-preserving I peeled off #25227 with...the first commit.

It's a lot of work to make something hash preserving, but whenever I go for it I inevitably find a real bug.

edit merged.

@Ericson2314 Ericson2314 mentioned this pull request Apr 26, 2017
@Ericson2314 Ericson2314 force-pushed the cross-foundation branch 2 times, most recently from 2fa5785 to bed4256 Compare May 30, 2017 17:47
@Ericson2314 Ericson2314 requested a review from dezgeg June 6, 2017 17:33
@Ericson2314 Ericson2314 force-pushed the cross-foundation branch 2 times, most recently from 5c6948c to 53d390c Compare June 12, 2017 19:00
@Ericson2314 Ericson2314 changed the title Cross compilation on linux and darwin misc changes "foundation" Basic Darwin->Darwin cross support Jun 13, 2017
@Ericson2314 Ericson2314 force-pushed the cross-foundation branch 5 times, most recently from 2b76a7f to aab307d Compare June 20, 2017 23:34
@Ericson2314 Ericson2314 mentioned this pull request Jun 24, 2017
13 tasks
@Ericson2314 Ericson2314 added this to Perhaps not priority for 17.09 in Cross compilation Oct 30, 2017
@mmahut
Copy link
Member

mmahut commented Aug 1, 2019

Any update on this pull request?

@mmahut
Copy link
Member

mmahut commented Aug 19, 2019

Closing due to lack of activity, feel free to reopen this if needed.

@mmahut mmahut closed this Aug 19, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
2.status: work-in-progress 6.topic: cross-compilation Building packages on a different sort platform than than they will be run on
Projects
No open projects
Cross compilation
Perhaps not priority for 18.03
Development

Successfully merging this pull request may close these issues.

None yet

5 participants