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 Darwin stdenv to work on 10.13 (backport to 17.03) #27630

Merged
merged 1 commit into from Jul 27, 2017

Conversation

copumpkin
Copy link
Member

The main changes are in libSystem, which lost the coretls component in 10.13 and some hardening changes that quietly crash any program that uses %n in a non-constant format string, so we've needed to patch a lot of programs that use gnulib.

This was tested fairly significantly before the cherry-pick but I haven't done much or solicited much testing for this version against 17.03. Testing welcome!

(cherry picked from commit 0419452)

Motivation for this change

Nix (the tool) builds against 17.03 so if we want to get a Nix build and installer that works on 10.13 and that isn't built and hosted by me, we need to get this change backported to 17.03 😄

Things done

Please check what applies. Note that these are not hard requirements but mereley serve as information for reviewers.

  • 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 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/)
  • Fits CONTRIBUTING.md.

The main changes are in libSystem, which lost the coretls component in 10.13
and some hardening changes that quietly crash any program that uses %n in
a non-constant format string, so we've needed to patch a lot of programs that
use gnulib.

(cherry picked from commit 0419452)
@domenkozar
Copy link
Member

I suggest we merge this, wait for Nix maintenance branch to build and test before next Nix release.

Copy link
Member

@grahamc grahamc left a comment

Choose a reason for hiding this comment

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

lgtm but as I noted in chat, I don't feel very qualified to review it :D

@copumpkin
Copy link
Member Author

This is probably safe to merge now that most of trunk has built.

@LnL7
Copy link
Member

LnL7 commented Jul 26, 2017

We might also have to backport the bootstrap fix.

@copumpkin
Copy link
Member Author

Good point. That seems like a separate PR though

@LnL7
Copy link
Member

LnL7 commented Jul 26, 2017

Yeah, that's fine.

@copumpkin copumpkin merged commit 0213a18 into NixOS:release-17.03 Jul 27, 2017
@edolstra
Copy link
Member

This causes a build failure on older OS X:

dyld: Library not loaded: /usr/lib/system/libsystem_symptoms.dylib
  Referenced from: /nix/store/49g980lqdsy92rji8bw3qlj7qk24a82f-bootstrap-tools/lib/libSystem.B.dylib
  Reason: image not found
builder for ‘/nix/store/bk6wy42ylr58cahz0kcv9zxxcz1vmx7l-libresolv-osx-10.11.6.drv’ failed due to signal 5 (Trace/BPT trap: 5)

@LnL7
Copy link
Member

LnL7 commented Jul 28, 2017

I think that's fixed by the bootstrap tools I was referring to #27645

@vcunat
Copy link
Member

vcunat commented Jul 31, 2017

Note that this has been a disaster on Hydra, due to libc++abi failing to build: https://hydra.nixos.org/eval/1378816

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

6 participants