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

nix-index: fix darwin build #49708

Merged
merged 1 commit into from Nov 19, 2018
Merged

Conversation

periklis
Copy link
Contributor

@periklis periklis commented Nov 3, 2018

Motivation for this change

cc @Mic92 & @bennofs

Things done
  • Tested using sandboxing (nix.useSandbox on NixOS, or option 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/)
  • Determined the impact on package closure size (by running nix path-info -S before and after)
  • Fits CONTRIBUTING.md.

@Mic92
Copy link
Member

Mic92 commented Nov 3, 2018

Can you provide the current failure build log? I have seen this now for many macOS rust packages.
Maybe we can fix this fundamentally.

@periklis
Copy link
Contributor Author

periklis commented Nov 4, 2018

building '/nix/store/sfyvn7gppa0hhw4w393isma2x9nibg6g-nix-index-0.1.2.drv'...
builder for '/nix/store/sfyvn7gppa0hhw4w393isma2x9nibg6g-nix-index-0.1.2.drv' failed with exit code 101; last 10 log li
nes:
      src/package.rs - package::StorePath::hash (line 214)
      src/package.rs - package::StorePath::name (line 198)
      src/package.rs - package::StorePath::origin (line 264)
      src/package.rs - package::StorePath::store_dir (line 232)
      src/util.rs - util::future_result (line 46)
      src/workset.rs - workset (line 16)

  test result: FAILED. 0 passed; 7 failed; 0 ignored; 0 measured; 0 filtered out

  error: test failed, to rerun pass '--doc'

@Mic92
Copy link
Member

Mic92 commented Nov 4, 2018

Is this the full log? I think the interesting part is above the message.

@Mic92
Copy link
Member

Mic92 commented Nov 4, 2018

@GrahamcOfBorg build nix-index

@GrahamcOfBorg
Copy link

Success on x86_64-darwin (full log)

Attempted: nix-index

Partial log (click to expand)

   Compiling hyper v0.11.27
   Compiling nix-index v0.1.2 (/private/tmp/nix-build-nix-index-0.1.2.drv-0/source)
    Finished release [optimized + debuginfo] target(s) in 5m 10s
installing
post-installation fixup
strip is /nix/store/g5r4apl0za012ffs6ladinwa5w0m1l3k-cctools-binutils-darwin/bin/strip
stripping (with command strip and flags -S) in /nix/store/ac7xycs1asc25zdx41s4jzldcccj0688-nix-index-0.1.2/bin
patching script interpreter paths in /nix/store/ac7xycs1asc25zdx41s4jzldcccj0688-nix-index-0.1.2
/nix/store/ac7xycs1asc25zdx41s4jzldcccj0688-nix-index-0.1.2/etc/profile.d/command-not-found.sh: interpreter directive changed from "/bin/sh" to "/nix/store/n9hba031gjky8hpjgx9fnlaxhidyzxbz-bash-4.4-p23/bin/sh"
/nix/store/ac7xycs1asc25zdx41s4jzldcccj0688-nix-index-0.1.2

@GrahamcOfBorg
Copy link

Success on x86_64-linux (full log)

Attempted: nix-index

Partial log (click to expand)

post-installation fixup
shrinking RPATHs of ELF executables and libraries in /nix/store/igvrkk5qvxwmjbq1nggmlq988y5cd9v7-nix-index-0.1.2
shrinking /nix/store/igvrkk5qvxwmjbq1nggmlq988y5cd9v7-nix-index-0.1.2/bin/nix-index
shrinking /nix/store/igvrkk5qvxwmjbq1nggmlq988y5cd9v7-nix-index-0.1.2/bin/nix-locate
strip is /nix/store/vcc4svb8gy29g4pam2zja6llkbcwsyiq-binutils-2.30/bin/strip
stripping (with command strip and flags -S) in /nix/store/igvrkk5qvxwmjbq1nggmlq988y5cd9v7-nix-index-0.1.2/bin
patching script interpreter paths in /nix/store/igvrkk5qvxwmjbq1nggmlq988y5cd9v7-nix-index-0.1.2
/nix/store/igvrkk5qvxwmjbq1nggmlq988y5cd9v7-nix-index-0.1.2/etc/profile.d/command-not-found.sh: interpreter directive changed from "/bin/sh" to "/nix/store/r47p5pzx52m3n34vdgqpk5rvqgm0m24m-bash-4.4-p23/bin/sh"
checking for references to /build in /nix/store/igvrkk5qvxwmjbq1nggmlq988y5cd9v7-nix-index-0.1.2...
/nix/store/igvrkk5qvxwmjbq1nggmlq988y5cd9v7-nix-index-0.1.2

@periklis
Copy link
Contributor Author

periklis commented Nov 4, 2018

@GrahamcOfBorg
Copy link

Success on aarch64-linux (full log)

Attempted: nix-index

Partial log (click to expand)

post-installation fixup
shrinking RPATHs of ELF executables and libraries in /nix/store/w4xb72ivawsvas139dr7h8h04qnwm0sz-nix-index-0.1.2
shrinking /nix/store/w4xb72ivawsvas139dr7h8h04qnwm0sz-nix-index-0.1.2/bin/nix-locate
shrinking /nix/store/w4xb72ivawsvas139dr7h8h04qnwm0sz-nix-index-0.1.2/bin/nix-index
strip is /nix/store/p9akxn2sfy4wkhqdqa3li97pc6jaz3r1-binutils-2.30/bin/strip
stripping (with command strip and flags -S) in /nix/store/w4xb72ivawsvas139dr7h8h04qnwm0sz-nix-index-0.1.2/bin
patching script interpreter paths in /nix/store/w4xb72ivawsvas139dr7h8h04qnwm0sz-nix-index-0.1.2
/nix/store/w4xb72ivawsvas139dr7h8h04qnwm0sz-nix-index-0.1.2/etc/profile.d/command-not-found.sh: interpreter directive changed from "/bin/sh" to "/nix/store/dsyc1z7ck08ga7l0b1jcxx35wj69qcii-bash-4.4-p23/bin/sh"
checking for references to /build in /nix/store/w4xb72ivawsvas139dr7h8h04qnwm0sz-nix-index-0.1.2...
/nix/store/w4xb72ivawsvas139dr7h8h04qnwm0sz-nix-index-0.1.2

@Mic92
Copy link
Member

Mic92 commented Nov 4, 2018

So apparently the bundled llvm version also loads symbols from the external llvm version?
This seems wrong to me.

danieldk added a commit to danieldk/nixpkgs that referenced this pull request Nov 6, 2018
Since Rust 1.30 (?) some Rust crates do not build, see e.g. NixOS#49693 and NixOS#49708
and fail with:

dyld: Symbol not found: __ZTIN4llvm2cl18GenericOptionValueE

So far, the common pattern seems to be that the linking fails in doctests. This
change is a temporary workaround that disables doctests for Rust crates on
Darwin. This avoids the need to patch individual derivations and still runs
library tests.
@danieldk danieldk mentioned this pull request Nov 6, 2018
9 tasks
@LnL7
Copy link
Member

LnL7 commented Nov 19, 2018

@GrahamcOfBorg build nix-index

@GrahamcOfBorg
Copy link

Success on aarch64-linux (full log)

Attempted: nix-index

Partial log (click to expand)

these paths will be fetched (1.55 MiB download, 6.79 MiB unpacked):
  /nix/store/299bcy5rp0qg8q5iihbbfj7rlahc739l-nix-index-0.1.2
copying path '/nix/store/299bcy5rp0qg8q5iihbbfj7rlahc739l-nix-index-0.1.2' from 'https://cache.nixos.org'...
/nix/store/299bcy5rp0qg8q5iihbbfj7rlahc739l-nix-index-0.1.2

@GrahamcOfBorg
Copy link

Success on x86_64-linux (full log)

Attempted: nix-index

Partial log (click to expand)

these paths will be fetched (1.81 MiB download, 7.69 MiB unpacked):
  /nix/store/rzsazacxnj78fiwm15v804ykpkpm4dyp-nix-index-0.1.2
copying path '/nix/store/rzsazacxnj78fiwm15v804ykpkpm4dyp-nix-index-0.1.2' from 'https://cache.nixos.org'...
/nix/store/rzsazacxnj78fiwm15v804ykpkpm4dyp-nix-index-0.1.2

@GrahamcOfBorg
Copy link

Success on x86_64-darwin (full log)

Attempted: nix-index

Partial log (click to expand)

   Compiling hyper v0.11.27
   Compiling nix-index v0.1.2 (/private/tmp/nix-build-nix-index-0.1.2.drv-0/source)
    Finished release [optimized + debuginfo] target(s) in 5m 04s
installing
post-installation fixup
strip is /nix/store/g5r4apl0za012ffs6ladinwa5w0m1l3k-cctools-binutils-darwin/bin/strip
stripping (with command strip and flags -S) in /nix/store/8c102vqjk6bzibbs10r4ahali0arpwvz-nix-index-0.1.2/bin
patching script interpreter paths in /nix/store/8c102vqjk6bzibbs10r4ahali0arpwvz-nix-index-0.1.2
/nix/store/8c102vqjk6bzibbs10r4ahali0arpwvz-nix-index-0.1.2/etc/profile.d/command-not-found.sh: interpreter directive changed from "/bin/sh" to "/nix/store/n9hba031gjky8hpjgx9fnlaxhidyzxbz-bash-4.4-p23/bin/sh"
/nix/store/8c102vqjk6bzibbs10r4ahali0arpwvz-nix-index-0.1.2

Copy link
Member

@LnL7 LnL7 left a comment

Choose a reason for hiding this comment

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

Lets put this in master and revert on staging, it might be a while before #49557 gets merged back.

@LnL7 LnL7 merged commit 13074b5 into NixOS:master Nov 19, 2018
@symphorien symphorien mentioned this pull request Jan 20, 2019
10 tasks
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

4 participants