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

rabbitmq_server: Don't use getconf optimization on non-Linux systems #40738

Closed
wants to merge 1 commit into from

Conversation

jwiegley
Copy link
Contributor

@jwiegley jwiegley commented May 18, 2018

This makes it impossible to build rabbitmq_server on Darwin, for example.

Motivation for this change

Without it, I cannot build rabbitmq_server on macOS.

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.

This makes it impossible to build rabbitmq_server on Darwin, for example.
@GrahamcOfBorg
Copy link

Success on x86_64-linux (full log)

Attempted: rabbitmq_server

Partial log (click to expand)

these paths will be fetched (47.39 MiB download, 266.89 MiB unpacked):
  /nix/store/k1r5nkv5yysfv9wfxyfnx8imhj4ry4zz-rabbitmq-server-3.6.15
  /nix/store/mhglf5gvl0c2i0s5i6k5gqnrwvikzgml-erlang-19.3.6.6
  /nix/store/wbbpha8d9bgbpccikl748f9qx2rv22gf-getconf
copying path '/nix/store/mhglf5gvl0c2i0s5i6k5gqnrwvikzgml-erlang-19.3.6.6' from 'https://cache.nixos.org'...
copying path '/nix/store/wbbpha8d9bgbpccikl748f9qx2rv22gf-getconf' from 'https://cache.nixos.org'...
copying path '/nix/store/k1r5nkv5yysfv9wfxyfnx8imhj4ry4zz-rabbitmq-server-3.6.15' from 'https://cache.nixos.org'...
/nix/store/k1r5nkv5yysfv9wfxyfnx8imhj4ry4zz-rabbitmq-server-3.6.15

@GrahamcOfBorg
Copy link

Success on aarch64-linux (full log)

Attempted: rabbitmq_server

Partial log (click to expand)

shrinking RPATHs of ELF executables and libraries in /nix/store/37pd4zyw88x1cwipywgh4cmyqnzy7r65-rabbitmq-server-3.6.15-man
gzipping man pages under /nix/store/37pd4zyw88x1cwipywgh4cmyqnzy7r65-rabbitmq-server-3.6.15-man/share/man/
strip is /nix/store/jk6j4lh9v5mvjdbdc35sj0zffhhf6s56-binutils-2.30/bin/strip
patching script interpreter paths in /nix/store/37pd4zyw88x1cwipywgh4cmyqnzy7r65-rabbitmq-server-3.6.15-man
checking for references to /build in /nix/store/37pd4zyw88x1cwipywgh4cmyqnzy7r65-rabbitmq-server-3.6.15-man...
shrinking RPATHs of ELF executables and libraries in /nix/store/y5hyclpb2n2ycxwnph4h344pvyc460l8-rabbitmq-server-3.6.15-doc
strip is /nix/store/jk6j4lh9v5mvjdbdc35sj0zffhhf6s56-binutils-2.30/bin/strip
patching script interpreter paths in /nix/store/y5hyclpb2n2ycxwnph4h344pvyc460l8-rabbitmq-server-3.6.15-doc
checking for references to /build in /nix/store/y5hyclpb2n2ycxwnph4h344pvyc460l8-rabbitmq-server-3.6.15-doc...
/nix/store/b1h40hwxj49d9ljz928bqvhyf5pnsq4y-rabbitmq-server-3.6.15

@Profpatsch
Copy link
Member

Profpatsch commented May 18, 2018

Looks feasible; however I think the more sensible change is renaming stdenv.lib.getBin stdenv.cc.libc to stdenv.lib.getBin getconf (which is defined in all-packages) and changing getconfs implementation so it references the correct getconf path on Darwin.

@jwiegley
Copy link
Contributor Author

@Profpatsch I'm not 100% clear on what you're proposing, can you show the changes needed?

@Profpatsch
Copy link
Member

Here’s the first part of the necessary patch: master...Profpatsch:rabbitmq-getconf-darwin

Can you look up which package your getconf binary comes from?

@matthewbauer
Copy link
Member

Is it okay to hold off on this? In staging, we have a getconf provided by unix-tools.nix:

https://github.com/NixOS/nixpkgs/blob/staging/pkgs/top-level/unix-tools.nix#L50-L54

It should be a drop-in replacement, not needing the "small" hacks. unixtools.* should just be single binaries - no runCommand needed.

@Profpatsch
Copy link
Member

unixtools.* should just be single binaries - no runCommand needed.

Oh right, I forgot about that. @Ericson2314, do those tools work well with the cross system? That is, can we use the getconf from there? Maybe point the getconf in all-packages to that as well?

@Ericson2314
Copy link
Member

Yes. @matthewbauer's unixtools looks wonderful to me.

@jwiegley
Copy link
Contributor Author

Great, then I'm going to close this pull request in the hopes of better things to come.

@jwiegley jwiegley closed this May 20, 2018
@jwiegley jwiegley deleted the getconf branch May 20, 2018 00:21
@Profpatsch
Copy link
Member

Yeah, on staging it’s already implemented, and rabbitmq fixed to the single-binary getconf.

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

5 participants