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

Darwin stdenv tweaks #43040

Merged
merged 5 commits into from Jul 5, 2018

Conversation

matthewbauer
Copy link
Member

Motivation for this change

Also some miscellaneous tweaks.

This was broken & apparently unused.
It’s not a good idea to rely on apple’s sdk for such a core library in
Nixpkgs. I have made a patch to libuv to make these frameworks
optional. There is also a pull request here:

libuv/libuv#1909
I want these tests to run because libuv is very important to lots of
things in Nixpkgs. I have a very large list of tests to disable for
now just to be on the safe side. For the record this is definitely a
libuv issue - their tests should be robust - but this is a safety
precaution for now.
@GrahamcOfBorg
Copy link

Success on x86_64-linux (full log)

Attempted: libuv

The following builds were skipped because they don't evaluate on x86_64-linux: darwin.security_tool

Partial log (click to expand)

 /nix/store/l816bx8lgm0jwb7hzbc105h0fv097zry-coreutils-8.29/bin/install -c -m 644 include/uv/errno.h include/uv/threadpool.h include/uv/version.h include/uv/unix.h include/uv/linux.h '/nix/store/1vjis6fd0n2v6l03w6nc4lllqd1qwb6s-libuv-1.21.0/include/uv'
make[1]: Leaving directory '/build/source'
post-installation fixup
shrinking RPATHs of ELF executables and libraries in /nix/store/1vjis6fd0n2v6l03w6nc4lllqd1qwb6s-libuv-1.21.0
shrinking /nix/store/1vjis6fd0n2v6l03w6nc4lllqd1qwb6s-libuv-1.21.0/lib/libuv.so.1.0.0
strip is /nix/store/90vmpr41dzsx350k5argycaf693hnl1l-binutils-2.30/bin/strip
stripping (with command strip and flags -S) in /nix/store/1vjis6fd0n2v6l03w6nc4lllqd1qwb6s-libuv-1.21.0/lib
patching script interpreter paths in /nix/store/1vjis6fd0n2v6l03w6nc4lllqd1qwb6s-libuv-1.21.0
checking for references to /build in /nix/store/1vjis6fd0n2v6l03w6nc4lllqd1qwb6s-libuv-1.21.0...
/nix/store/1vjis6fd0n2v6l03w6nc4lllqd1qwb6s-libuv-1.21.0

@GrahamcOfBorg
Copy link

Failure on aarch64-linux (full log)

Attempted: libuv

The following builds were skipped because they don't evaluate on aarch64-linux: darwin.security_tool

Partial log (click to expand)

FAIL: test/run-tests
======================================================
1 of 1 test failed
Please report to https://github.com/libuv/libuv/issues
======================================================
make[1]: *** [Makefile:4847: check-TESTS] Error 1
make[1]: Leaving directory '/build/source'
make: *** [Makefile:5107: check-am] Error 2
builder for '/nix/store/v1b4kqsrx7zhsizd03ghshgry1zkcz8w-libuv-1.21.0.drv' failed with exit code 2
error: build of '/nix/store/v1b4kqsrx7zhsizd03ghshgry1zkcz8w-libuv-1.21.0.drv' failed

tdRegexp = lib.concatStringsSep "\\|" toDisable;
in lib.optionalString doCheck ''
sed '/${tdRegexp}/d' -i test/test-list.h
'';

nativeBuildInputs = [ automake autoconf libtool pkgconfig ];
buildInputs = stdenv.lib.optionals stdenv.isDarwin [ ApplicationServices CoreServices ];
Copy link
Member

Choose a reason for hiding this comment

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

👍

# For now the tests are just breaking large swaths of the nixpkgs binary cache for Darwin,
# and I'd rather have everything else work at all than have stronger assurance here.
doCheck = !stdenv.isDarwin;
doCheck = true;
Copy link
Member

Choose a reason for hiding this comment

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

I'd also prefer to run them, but dealing with the intermittent failures on hydra is really painful particularly for staging. Let's keep an eye on it, let's hope we can get rid of them like this.

Copy link
Member Author

Choose a reason for hiding this comment

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

Yes - it's very weird that it fails so frequently. FWIW it's not just libuv that has issues on macOS with network failures. Could it be a kernel thing? Or maybe it's just no one else runs automated tests on macOS.

Copy link
Member Author

Choose a reason for hiding this comment

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

I wish we could just drop libuv from cmake altogether - but apparently cmake doesn't support that for some weird reason.

@@ -0,0 +1,176 @@
From 6d03644817fb263489dc9fdf550bf1fac274fd8f Mon Sep 17 00:00:00 2001
Copy link
Member

Choose a reason for hiding this comment

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

I'd fatchpatch this.

@GrahamcOfBorg
Copy link

Failure on x86_64-darwin (full log)

Attempted: darwin.security_tool, libuv

Partial log (click to expand)

cannot build derivation '/nix/store/hhvr1x2ilm2i2j3q1pag88z3csm44v0z-libsecurity_mds-osx-10.7.5.drv': 16 dependencies couldn't be built
cannot build derivation '/nix/store/zyhyl20f67l3g062yb9xhkcypw7r2lkm-libsecurity_pkcs12-osx-10.7.5.drv': 13 dependencies couldn't be built
cannot build derivation '/nix/store/ar3pmrxf6i0xd7pr0x1j96i0f06a76dd-libsecurity_sd_cspdl-osx-10.7.5.drv': 15 dependencies couldn't be built
cannot build derivation '/nix/store/cgxcliwq2a7a4sa2cfis9d95fl692l17-libsecurity_keychain-osx-10.7.5.drv': 21 dependencies couldn't be built
cannot build derivation '/nix/store/zq2gag9xmz5vwd5jv7f4dirfhr56il2g-libsecurity_apple_cspdl-osx-10.7.5.drv': 16 dependencies couldn't be built
cannot build derivation '/nix/store/fv3ddr9zkkmwjq79b7s8w32ppjzjimg3-libsecurity_apple_file_dl-osx-10.7.5.drv': 17 dependencies couldn't be built
cannot build derivation '/nix/store/cbiciadgqn2xgiaa8jf54ldigar6ydcr-libsecurity_apple_x509_cl-osx-10.7.5.drv': 18 dependencies couldn't be built
cannot build derivation '/nix/store/pb2n09s9syvcn9b9cs4qkdgxw6j49826-libsecurity_apple_x509_tp-osx-10.7.5.drv': 19 dependencies couldn't be built
cannot build derivation '/nix/store/6a0kbf9xacm2m0cnhdpmvpv6dl978s8d-SecurityTool-55115.drv': 31 dependencies couldn't be built
�[31;1merror:�[0m build of '/nix/store/6a0kbf9xacm2m0cnhdpmvpv6dl978s8d-SecurityTool-55115.drv', '/nix/store/gwv6x24z9kz6g76gyrilv1cb05ml2pxm-libuv-1.21.0.drv' failed

@periklis
Copy link
Contributor

periklis commented Jul 5, 2018

@matthewbauer any number of this reduction to get an impression?

@matthewbauer matthewbauer requested a review from peti as a code owner July 5, 2018 16:19
@matthewbauer matthewbauer force-pushed the darwin-closure-reductions branch 3 times, most recently from 8b53aa0 to 30347ef Compare July 5, 2018 18:28
@matthewbauer matthewbauer changed the title More Darwin closure reductions Darwin stdenv tweaks Jul 5, 2018
@matthewbauer matthewbauer removed the request for review from peti July 5, 2018 18:31
@matthewbauer matthewbauer merged commit f513d58 into NixOS:staging Jul 5, 2018
@matthewbauer
Copy link
Member Author

@periklis Sorry my title was a little misleading - these aren't reducing anything currently just preventing the SDK from getting in some places where it shouldn't be.

@GrahamcOfBorg
Copy link

Success on x86_64-linux (full log)

Attempted: libuv

The following builds were skipped because they don't evaluate on x86_64-linux: darwin.security_tool

Partial log (click to expand)


b) For `nix-env`, `nix-build`, `nix-shell` or any other Nix command you can add
  { allowUnsupportedSystem = true; }
to ~/.config/nixpkgs/config.nix.


these paths will be fetched (0.08 MiB download, 0.29 MiB unpacked):
  /nix/store/51dyby08yrm0kfbhw6lrlxzn35l3m3fa-libuv-1.21.0
copying path '/nix/store/51dyby08yrm0kfbhw6lrlxzn35l3m3fa-libuv-1.21.0' from 'https://cache.nixos.org'...
/nix/store/51dyby08yrm0kfbhw6lrlxzn35l3m3fa-libuv-1.21.0

@GrahamcOfBorg
Copy link

Success on aarch64-linux (full log)

Attempted: libuv

The following builds were skipped because they don't evaluate on aarch64-linux: darwin.security_tool

Partial log (click to expand)

 /nix/store/lqnf05qdjshwijs9dr3klzk31y4qkj2g-coreutils-8.29/bin/install -c -m 644 include/uv/errno.h include/uv/threadpool.h include/uv/version.h include/uv/unix.h include/uv/linux.h '/nix/store/82piicdlx5lgxibhqs2djd2awv3iq7wy-libuv-1.21.0/include/uv'
make[1]: Leaving directory '/build/source'
post-installation fixup
shrinking RPATHs of ELF executables and libraries in /nix/store/82piicdlx5lgxibhqs2djd2awv3iq7wy-libuv-1.21.0
shrinking /nix/store/82piicdlx5lgxibhqs2djd2awv3iq7wy-libuv-1.21.0/lib/libuv.so.1.0.0
strip is /nix/store/7iyn7gn33i7xxjgmwf25k20246y6nd9d-binutils-2.30/bin/strip
stripping (with command strip and flags -S) in /nix/store/82piicdlx5lgxibhqs2djd2awv3iq7wy-libuv-1.21.0/lib
patching script interpreter paths in /nix/store/82piicdlx5lgxibhqs2djd2awv3iq7wy-libuv-1.21.0
checking for references to /build in /nix/store/82piicdlx5lgxibhqs2djd2awv3iq7wy-libuv-1.21.0...
/nix/store/82piicdlx5lgxibhqs2djd2awv3iq7wy-libuv-1.21.0

@GrahamcOfBorg
Copy link

Failure on x86_64-darwin (full log)

Attempted: darwin.security_tool, libuv

Partial log (click to expand)

cannot build derivation '/nix/store/c7n1fwjrpc7f173zq913kcn4z4q3njij-libsecurity_mds-osx-10.7.5.drv': 16 dependencies couldn't be built
cannot build derivation '/nix/store/q8yv10l39pfxiqchlmmir8q93hwivg8r-libsecurity_pkcs12-osx-10.7.5.drv': 13 dependencies couldn't be built
cannot build derivation '/nix/store/liqh1ic9i5prp70n6q8n9i9dsfjdi87l-libsecurity_sd_cspdl-osx-10.7.5.drv': 15 dependencies couldn't be built
cannot build derivation '/nix/store/cyrm315jn63ysij4gprlz1i8r3g8rsdx-libsecurity_keychain-osx-10.7.5.drv': 21 dependencies couldn't be built
cannot build derivation '/nix/store/3addwhbaqd87ywwc296jzyjbpm8d81dv-libsecurity_apple_cspdl-osx-10.7.5.drv': 16 dependencies couldn't be built
cannot build derivation '/nix/store/5lgljsfsk4gjfdmixfl4793ik0jp613f-libsecurity_apple_file_dl-osx-10.7.5.drv': 17 dependencies couldn't be built
cannot build derivation '/nix/store/f603mdaw1plr38gwdc09r092ny4sw3rc-libsecurity_apple_x509_cl-osx-10.7.5.drv': 18 dependencies couldn't be built
cannot build derivation '/nix/store/ll52lglqa7x7f03hfg6iscca1zckslnv-libsecurity_apple_x509_tp-osx-10.7.5.drv': 19 dependencies couldn't be built
cannot build derivation '/nix/store/7vpng93xm4w63wq9xr71is93q44mc1vz-SecurityTool-55115.drv': 31 dependencies couldn't be built
�[31;1merror:�[0m build of '/nix/store/7vpng93xm4w63wq9xr71is93q44mc1vz-SecurityTool-55115.drv', '/nix/store/chfpdisz4xj6glsqwzkk6fmnhhrj0ld1-libuv-1.21.0.drv' failed

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

5 participants