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

opam: propagate curl and unzip dependencies #39619

Merged
merged 1 commit into from Apr 27, 2018

Conversation

Ekleog
Copy link
Member

@Ekleog Ekleog commented Apr 27, 2018

These are required for opam init to succeed.

Closes #14466
Cc @henrytill

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.

@GrahamcOfBorg
Copy link

Success on x86_64-linux (full log)

Attempted: opam

Partial log (click to expand)

post-installation fixup
shrinking RPATHs of ELF executables and libraries in /nix/store/zv583567jaa4yvbpgz44chcc0vwyc5bi-opam-1.2.2
shrinking /nix/store/zv583567jaa4yvbpgz44chcc0vwyc5bi-opam-1.2.2/bin/.opam-wrapped
shrinking /nix/store/zv583567jaa4yvbpgz44chcc0vwyc5bi-opam-1.2.2/bin/opam-admin
shrinking /nix/store/zv583567jaa4yvbpgz44chcc0vwyc5bi-opam-1.2.2/bin/opam-installer
strip is /nix/store/j75dgadrff2d1fyc4fczmcgqkid2imdx-binutils-2.30/bin/strip
stripping (with command strip and flags -S) in /nix/store/zv583567jaa4yvbpgz44chcc0vwyc5bi-opam-1.2.2/bin
patching script interpreter paths in /nix/store/zv583567jaa4yvbpgz44chcc0vwyc5bi-opam-1.2.2
checking for references to /build in /nix/store/zv583567jaa4yvbpgz44chcc0vwyc5bi-opam-1.2.2...
/nix/store/zv583567jaa4yvbpgz44chcc0vwyc5bi-opam-1.2.2

Copy link
Member

@henrytill henrytill left a comment

Choose a reason for hiding this comment

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

LGTM

@GrahamcOfBorg
Copy link

Failure on aarch64-linux (full log)

Attempted: opam

Partial log (click to expand)

make[3]: *** [../Makefile:74: unix.cmxs] Error 2
make[3]: Leaving directory '/build/ocaml-4.05.0/otherlibs/unix'
make[2]: *** [Makefile:1055: otherlibrariesopt] Error 2
make[2]: Leaving directory '/build/ocaml-4.05.0'
make[1]: *** [Makefile:465: opt.opt] Error 2
make[1]: Leaving directory '/build/ocaml-4.05.0'
make: *** [Makefile:531: world.opt] Error 2
builder for '/nix/store/ajqgdzi3mmwacpk8mzfja0ivpxhdxwsh-ocaml-4.05.0.drv' failed with exit code 2
cannot build derivation '/nix/store/fb42s25byxqjrmnfyc67qd2gl6zwj78l-opam-1.2.2.drv': 1 dependencies couldn't be built
�[31;1merror:�[0m build of '/nix/store/fb42s25byxqjrmnfyc67qd2gl6zwj78l-opam-1.2.2.drv' failed

@Ekleog
Copy link
Member Author

Ekleog commented Apr 27, 2018

The ofborg build failure is due to the ocaml dependency not building, so I think we can safely say it's unrelated to this PR.

@@ -47,7 +47,8 @@ in stdenv.mkDerivation rec {
name = "opam-${version}";
version = "1.2.2";

buildInputs = [ unzip curl ncurses ocaml makeWrapper];
buildInputs = [ ncurses ocaml makeWrapper ];
propagatedBuildInputs = [ unzip curl ];
Copy link
Member

Choose a reason for hiding this comment

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

propagatedBuildInputs are only meant for build dependencies and they work by accident in nix-shell too. Use --suffix PATH : ${curl}/bin for makeWrapper below instead.

Copy link
Member Author

Choose a reason for hiding this comment

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

Oh? I thought it was for things that had to also be in PATH. Re-readyng the nixpkgs manual it looks like I've missed quite a lot of cross-related changes. Anyway, fixed, thanks!

These are required for `opam init` to succeed.

Closes NixOS#14466
Cc @henrytill
@Ekleog
Copy link
Member Author

Ekleog commented Apr 27, 2018

For the ocaml build failure on aarch64, I guess it is due to ocaml/ocaml#1330 that was fixed in 4.06, so there isn't much to do right now (apart from bumping to what package ocaml points? I don't know what is the policy about that)

@GrahamcOfBorg
Copy link

Success on x86_64-linux (full log)

Attempted: opam

Partial log (click to expand)

post-installation fixup
shrinking RPATHs of ELF executables and libraries in /nix/store/86fw4jzi9hv9a3wj6d9mf62q1da1500i-opam-1.2.2
shrinking /nix/store/86fw4jzi9hv9a3wj6d9mf62q1da1500i-opam-1.2.2/bin/opam-admin
shrinking /nix/store/86fw4jzi9hv9a3wj6d9mf62q1da1500i-opam-1.2.2/bin/opam-installer
shrinking /nix/store/86fw4jzi9hv9a3wj6d9mf62q1da1500i-opam-1.2.2/bin/.opam-wrapped
strip is /nix/store/j75dgadrff2d1fyc4fczmcgqkid2imdx-binutils-2.30/bin/strip
stripping (with command strip and flags -S) in /nix/store/86fw4jzi9hv9a3wj6d9mf62q1da1500i-opam-1.2.2/bin
patching script interpreter paths in /nix/store/86fw4jzi9hv9a3wj6d9mf62q1da1500i-opam-1.2.2
checking for references to /build in /nix/store/86fw4jzi9hv9a3wj6d9mf62q1da1500i-opam-1.2.2...
/nix/store/86fw4jzi9hv9a3wj6d9mf62q1da1500i-opam-1.2.2

@GrahamcOfBorg
Copy link

Failure on aarch64-linux (full log)

Attempted: opam

Partial log (click to expand)

make[3]: *** [../Makefile:74: unix.cmxs] Error 2
make[3]: Leaving directory '/build/ocaml-4.05.0/otherlibs/unix'
make[2]: *** [Makefile:1055: otherlibrariesopt] Error 2
make[2]: Leaving directory '/build/ocaml-4.05.0'
make[1]: *** [Makefile:465: opt.opt] Error 2
make[1]: Leaving directory '/build/ocaml-4.05.0'
make: *** [Makefile:531: world.opt] Error 2
builder for '/nix/store/ajqgdzi3mmwacpk8mzfja0ivpxhdxwsh-ocaml-4.05.0.drv' failed with exit code 2
cannot build derivation '/nix/store/mmpvgf7qdirfbkcadbw27vrr537xmyc6-opam-1.2.2.drv': 1 dependencies couldn't be built
�[31;1merror:�[0m build of '/nix/store/mmpvgf7qdirfbkcadbw27vrr537xmyc6-opam-1.2.2.drv' failed

@Mic92
Copy link
Member

Mic92 commented Apr 27, 2018

@Ekleog usually higher is better. But I am not sure what this would mean for ocaml. It could be that some projects wants older ocaml versions and need to be pinned to that.
@vbgl might have better insights what needs to be done.

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

4 participants