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

cctools, darwin-bintuils: Don't always bring in headers #31754

Merged
merged 2 commits into from Nov 17, 2017

Conversation

Ericson2314
Copy link
Member

@Ericson2314 Ericson2314 commented Nov 16, 2017

Motivation for this change

Basically the goal is separation of concerns / mirroring GNU Binutils.

  • Give cctools a dev output for the headers

  • Darwin binutils don't try to include headers from GNU binutils as it doesn't produce any (that's now the libbfd derivation's responsibility). Also don't include any from cctools; just use the default "out" output not "dev.

The headers are included with Libsystem, which is where I'd guess anything that uses them would be finding them anyways.

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

@Ericson2314
Copy link
Member Author

@nixborg build

@Ericson2314 Ericson2314 added this to Needed for binutils-wrapper in Cross compilation Nov 16, 2017
@nixborg
Copy link

nixborg commented Nov 16, 2017

Jobset created at https://hydra.mayflower.de/jobset/nixos/pr-31754

@Ericson2314
Copy link
Member Author

@nixborg build

@nixborg
Copy link

nixborg commented Nov 16, 2017

Jobset created at https://hydra.mayflower.de/jobset/nixos/pr-31754

libbfd and libopcdes are separate derivations which now provide all
headers and libraries. Binutils should just provide executables.
 - Give cctools a dev output for the headers

 - Update Libsystem to grab the headers from that dev output

 - Don't include the headers in Darwin binutils, just as GNU Binutils no
   longer does.
@Ericson2314
Copy link
Member Author

@nixborg build

@nixborg
Copy link

nixborg commented Nov 16, 2017

Jobset created at https://hydra.mayflower.de/jobset/nixos/pr-31754

@Ericson2314
Copy link
Member Author

The Perl failure seems like a non-deterministic build parallelism issue? I nuked refs and diffed the logs, and didn't see anything interesting, just permutation of build steps. For some reason the succeeding build did

DYLD_LIBRARY_PATH=/private/var/folders/d4/0bw6hrcd1s5962bw7k_k7mjc0000gn/T/nix-build-perl-5.24.3.drv-0/perl-5.24.3 ./miniperl -Ilib make_ext.pl cpan/Getopt-Long/pm_to_blib  MAKE="make" LIBPERL_A=libperl.dylib

but the failing one did not before that was needed.

@Ericson2314
Copy link
Member Author

@nixborg build

@nixborg
Copy link

nixborg commented Nov 17, 2017

Jobset created at https://hydra.mayflower.de/jobset/nixos/pr-31754

@Ericson2314
Copy link
Member Author

oops, failed builds are cached of course, so that was pointless.

Copy link
Contributor

@orivej orivej left a comment

Choose a reason for hiding this comment

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

I do not known the Darwin build system, but I expect this to work.

@grahamc
Copy link
Member

grahamc commented Nov 17, 2017

@GrahamcOfBorg build git

@grahamc
Copy link
Member

grahamc commented Nov 17, 2017

^ for people who can use grahamcofborg, please don't do this :) I'm doing an experiment, intentionally torturing the borg service.

Copy link

@GrahamcOfBorg GrahamcOfBorg left a comment

Choose a reason for hiding this comment

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

Failure for system: x86_64-darwin

cannot build derivation ‘/nix/store/kji9x5vxhprb9mhv9haak94s0f85wq8r-configd-osx-10.8.5.drv’: 9 dependencies couldn't be built
cannot build derivation ‘/nix/store/ycaqx2iaihwz3k5xq3fqgkmik9ss8h8d-python-2.7.14.drv’: 15 dependencies couldn't be built
cannot build derivation ‘/nix/store/q88hb96wbkpk3fvcjf8mzf121gdll18c-asciidoc-8.6.9.drv’: 4 dependencies couldn't be built
cannot build derivation ‘/nix/store/pidlykxl6lag9s9b9rcxdlqph1vqxzq7-libxml2-2.9.5.drv’: 5 dependencies couldn't be built
cannot build derivation ‘/nix/store/d2r12sccmkh3c1fazqkvavrgllw6ij58-libxslt-1.1.29.drv’: 5 dependencies couldn't be built
cannot build derivation ‘/nix/store/g4i1gjmk24h45m97jnc2fly3q7gp93sa-xmlto-0.0.28.drv’: 9 dependencies couldn't be built
cannot build derivation ‘/nix/store/7yipdwd877g7pj71vxz9faylqix25b91-opensp-1.5.2.drv’: 6 dependencies couldn't be built
cannot build derivation ‘/nix/store/1rfq9r6k10xg70kajrahrrr93i13i26v-docbook2X-0.8.8.drv’: 15 dependencies couldn't be built
cannot build derivation ‘/nix/store/s6ivycd0gf71i3pxv9c31f1xkp88a3da-git-2.15.0.drv’: 32 dependencies couldn't be built
error: build of ‘/nix/store/s6ivycd0gf71i3pxv9c31f1xkp88a3da-git-2.15.0.drv’ failed

Copy link

@GrahamcOfBorg GrahamcOfBorg left a comment

Choose a reason for hiding this comment

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

Success for system: x86_64-linux

/nix/store/gj9jqm1znmn8m4s7702j9cscahasgjmw-git-2.15.0/share/git/contrib/convert-grafts-to-replace-refs.sh: interpreter directive changed from "/bin/sh" to "/nix/store/4a2z857wf3n3za5jgid7bl456y1nxprg-bash-4.4-p12/bin/sh"
/nix/store/gj9jqm1znmn8m4s7702j9cscahasgjmw-git-2.15.0/share/git/contrib/git-resurrect.sh: interpreter directive changed from "/bin/sh" to "/nix/store/4a2z857wf3n3za5jgid7bl456y1nxprg-bash-4.4-p12/bin/sh"
/nix/store/gj9jqm1znmn8m4s7702j9cscahasgjmw-git-2.15.0/share/git/contrib/git-shell-commands/list: interpreter directive changed from "/bin/sh" to "/nix/store/4a2z857wf3n3za5jgid7bl456y1nxprg-bash-4.4-p12/bin/sh"
/nix/store/gj9jqm1znmn8m4s7702j9cscahasgjmw-git-2.15.0/share/git/contrib/git-shell-commands/help: interpreter directive changed from "/bin/sh" to "/nix/store/4a2z857wf3n3za5jgid7bl456y1nxprg-bash-4.4-p12/bin/sh"
/nix/store/gj9jqm1znmn8m4s7702j9cscahasgjmw-git-2.15.0/share/git/contrib/credential/netrc/test.pl: interpreter directive changed from "/usr/bin/perl" to "/nix/store/b64097cqjfvj5caj7jmhd5c4yhbjdvl0-perl-5.24.3/bin/perl"
/nix/store/gj9jqm1znmn8m4s7702j9cscahasgjmw-git-2.15.0/share/git/contrib/credential/netrc/git-credential-netrc: interpreter directive changed from "/usr/bin/perl" to "/nix/store/b64097cqjfvj5caj7jmhd5c4yhbjdvl0-perl-5.24.3/bin/perl"
/nix/store/gj9jqm1znmn8m4s7702j9cscahasgjmw-git-2.15.0/libexec/git-core/git-subtree: interpreter directive changed from "/bin/sh" to "/nix/store/4a2z857wf3n3za5jgid7bl456y1nxprg-bash-4.4-p12/bin/sh"
/nix/store/gj9jqm1znmn8m4s7702j9cscahasgjmw-git-2.15.0/libexec/git-core/git-gui--askpass: interpreter directive changed from "/bin/sh" to "/nix/store/4a2z857wf3n3za5jgid7bl456y1nxprg-bash-4.4-p12/bin/sh"
checking for references to /tmp/nix-build-git-2.15.0.drv-0 in /nix/store/gj9jqm1znmn8m4s7702j9cscahasgjmw-git-2.15.0...
/nix/store/gj9jqm1znmn8m4s7702j9cscahasgjmw-git-2.15.0

@Ericson2314 Ericson2314 merged commit ccb93ae into NixOS:staging Nov 17, 2017
@Ericson2314 Ericson2314 deleted the simplify-darwin-binutils branch November 17, 2017 20:31
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
No open projects
Cross compilation
Needed for binutils-wrapper
Development

Successfully merging this pull request may close these issues.

None yet

5 participants