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

llvmPackages_{38,39}: musl compat, minor cleanup #42452

Merged
merged 14 commits into from Jun 23, 2018

Conversation

dtzWill
Copy link
Member

@dtzWill dtzWill commented Jun 23, 2018

"cleanup" is really few instances of moving cmake to nativeBuildInput.

Patches are all the ones already used for LLVM 4, which this moves
a level up so they can share the same files.

Generally seems good, although libc++ doesn't seem to work due to not
having fixes that made it into later releases.

  • 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.

@@ -81,6 +85,14 @@ in stdenv.mkDerivation rec {
++ stdenv.lib.optionals ( isDarwin) [
"-DLLVM_ENABLE_LIBCXX=ON"
"-DCAN_TARGET_i386=false"
] ++ stdenv.lib.optionals stdenv.hostPlatform.isMusl [
"-DLLVM_HOST_TRIPLE=${stdenv.hostPlatform.config}"
Copy link
Member

Choose a reason for hiding this comment

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

Can we handle these without the condition? I guess that could break things but I would much prefer to have these 3 flags be unconditional.

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 would too -- but previously was asked to keep them musl-only for now so I was following along here. How about I make a new PR doing this across LLVM versions containing this?

Copy link
Member

Choose a reason for hiding this comment

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

Okay that's definitely fine to make it musl-only. I just want to minimize conditionals in Nixpkgs as much as possible.

Copy link
Member

Choose a reason for hiding this comment

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

I assume since the nativeBuildInput stuff is done in here, doing that too wouldn't make it a mass rebuild, right? I'd ping whoever asked before, either in this PR, or a 3rd master PR (not the 4 5 6 one).

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'll make a new PR if that's alright with you-- rather keep unrelated things separate even if it looks like we have 3 PR's on that subject now but oh well :).

Copy link
Member Author

Choose a reason for hiding this comment

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

(since that PR will conflict with this one if not based on top, I'll wait to put that together until this is merged since I think there's little controversial/risky here, esp in comparison :))

@GrahamcOfBorg
Copy link

Failure on x86_64-darwin (full log)

Attempted: clang_38, clang_39, llvm_38, llvm_39, llvm_4

Partial log (click to expand)

  CMakeLists.txt:48 (project)


-- Configuring incomplete, errors occurred!
See also "/tmp/nix-build-llvm-3.9.1.drv-0/llvm/build/CMakeFiles/CMakeOutput.log".
See also "/tmp/nix-build-llvm-3.9.1.drv-0/llvm/build/CMakeFiles/CMakeError.log".
builder for '/nix/store/mflqk43986xdn3c21dcsn9wx26b6c5qz-llvm-3.9.1.drv' failed with exit code 1
cannot build derivation '/nix/store/917kzx7zd4xm3jxih6rgx313zwlv61qj-clang-3.9.1.drv': 1 dependencies couldn't be built
cannot build derivation '/nix/store/bb5zj3949pxgz9z7m1x3vpsvz3d6slw2-clang-wrapper-3.9.1.drv': 2 dependencies couldn't be built
�[31;1merror:�[0m build of '/nix/store/bb5zj3949pxgz9z7m1x3vpsvz3d6slw2-clang-wrapper-3.9.1.drv', '/nix/store/dqqfyg36dbbskd1y4j1nsmcpw3m8x8ci-llvm-3.8.1.drv', '/nix/store/l5w5i276lacivkdhngh55jyqndg8m0hs-clang-wrapper-3.8.1.drv', '/nix/store/mflqk43986xdn3c21dcsn9wx26b6c5qz-llvm-3.9.1.drv' failed

@GrahamcOfBorg
Copy link

Success on x86_64-linux (full log)

Attempted: clang_38, clang_39, llvm_38, llvm_39, llvm_4

Partial log (click to expand)

installing
post-installation fixup
shrinking RPATHs of ELF executables and libraries in /nix/store/znayzw0hsmdr5qgds9z8ggdwvfafdbb3-clang-wrapper-3.8.1
patching script interpreter paths in /nix/store/znayzw0hsmdr5qgds9z8ggdwvfafdbb3-clang-wrapper-3.8.1
checking for references to /build in /nix/store/znayzw0hsmdr5qgds9z8ggdwvfafdbb3-clang-wrapper-3.8.1...
/nix/store/znayzw0hsmdr5qgds9z8ggdwvfafdbb3-clang-wrapper-3.8.1
/nix/store/nzsfsbnn6ilyxfprq587pqncw7r53m4q-clang-wrapper-3.9.1
/nix/store/ijnfv6wrrpzmj8fffxdn0ff6rhsh5qdr-llvm-3.8.1
/nix/store/gf59y603jpc05rmyr9vg5wm8fi4aibdz-llvm-3.9.1
/nix/store/a83nrj2ra2aj4pvc2551v4cdscwxphv8-llvm-4.0.1

dtzWill added a commit to dtzWill/nixpkgs that referenced this pull request Jun 23, 2018
Previously we only set these when using musl.

See NixOS#42452 (comment)

Same should be done for changes in NixOS#42452,
I'll add a follow-up commit doing so in the PR containing this
or wherever makes sense-- depending on how review/merging of that goes.

Sending similar changes for LLVM 4 to master, as suggested.
@GrahamcOfBorg
Copy link

Success on aarch64-linux (full log)

Attempted: clang_38, clang_39, llvm_38, llvm_39, llvm_4

Partial log (click to expand)

installing
post-installation fixup
shrinking RPATHs of ELF executables and libraries in /nix/store/60h1rjl5hnc4qvglqzi9w60qjpzx9cy2-clang-wrapper-3.8.1
patching script interpreter paths in /nix/store/60h1rjl5hnc4qvglqzi9w60qjpzx9cy2-clang-wrapper-3.8.1
checking for references to /build in /nix/store/60h1rjl5hnc4qvglqzi9w60qjpzx9cy2-clang-wrapper-3.8.1...
/nix/store/60h1rjl5hnc4qvglqzi9w60qjpzx9cy2-clang-wrapper-3.8.1
/nix/store/29dwqfhv32fks3c9vkfsl2vg9z45l02y-clang-wrapper-3.9.1
/nix/store/wg7nlng6mvfy5i106gya0cv7ll2qrlkz-llvm-3.8.1
/nix/store/gk0wykxybbbp16b1aryb1zacs17ccv7c-llvm-3.9.1
/nix/store/1bl08xv1i79mlzwp16n3a5lyhy8pica3-llvm-4.0.1

@dtzWill
Copy link
Member Author

dtzWill commented Jun 23, 2018

Darwin failure looks transient-- builder overloaded with processes apparently:


    /nix/store/qk4fdnzkr8r0gihgyps7x07cpyffvkmy-cctools-binutils-darwin-wrapper/nix-support/add-flags.sh: fork: retry: Resource temporarily unavailable
    /nix/store/qk4fdnzkr8r0gihgyps7x07cpyffvkmy-cctools-binutils-darwin-wrapper/nix-support/add-flags.sh: fork: retry: Resource temporarily unavailable
    /nix/store/qk4fdnzkr8r0gihgyps7x07cpyffvkmy-cctools-binutils-darwin-wrapper/nix-support/add-flags.sh: fork: retry: Resource temporarily unavailable
    /nix/store/qk4fdnzkr8r0gihgyps7x07cpyffvkmy-cctools-binutils-darwin-wrapper/nix-support/add-flags.sh: fork: retry: Resource temporarily unavailable
    /nix/store/qk4fdnzkr8r0gihgyps7x07cpyffvkmy-cctools-binutils-darwin-wrapper/nix-support/add-flags.sh: fork: Resource temporarily unavailable

@dtzWill
Copy link
Member Author

dtzWill commented Jun 23, 2018

Rebuild script says these are the jobs that will be rebuilt: (I wanted to get clearer idea of the 11-100 darwin tag):

Estimating rebuild amount by counting changed Hydra jobs.
     25 x86_64-darwin
     17 x86_64-linux

atom-beta.x86_64-linux                                                        /nix/store/0ppz8m30cffbqlcwr806ax51f00zsg5b-atom-beta-1.28.0-beta3
atom.x86_64-linux                                                             /nix/store/6xkw6svhqsvqfqr8wfbz8i18wy42i7lr-atom-1.27.2
clang_38.x86_64-darwin                                                        info=/nix/store/rxqz485j6hdkcq96nb4gpachwmkb3d9m-clang-wrapper-3.8.1-info;man=/nix/store/vygx2gjzs3wakqj1jyw51j75l9abd9aa-clang-wrapper-3.8.1-man;/nix/store/vxw003ns8lk1f08argabc84znvpl4yf7-clang-wrapper-3.8.1
clang_38.x86_64-linux                                                         info=/nix/store/ijgmsr9sfr3l10gsyvh4k7c3167f3n2w-clang-wrapper-3.8.1-info;man=/nix/store/rrg0zahrvmqlksdndqm1r7anp5cc4xsj-clang-wrapper-3.8.1-man;/nix/store/znayzw0hsmdr5qgds9z8ggdwvfafdbb3-clang-wrapper-3.8.1
clang_39.x86_64-darwin                                                        info=/nix/store/1ad6rzxyf8vfijxqqsva83fa7hxqhi6h-clang-wrapper-3.9.1-info;man=/nix/store/vmf2xsqag1v7w1yial66mi6ff60b42qg-clang-wrapper-3.9.1-man;/nix/store/q8iw5l010kzds6qfb0agq77j5bk5lq8x-clang-wrapper-3.9.1
gitAndTools.git-annex-metadata-gui.x86_64-linux                               /nix/store/1wd3jfgzxz004wkpjk5gr35b4c8zsfnr-git-annex-metadata-gui-0.2.0
gwyddion.x86_64-linux                                                         /nix/store/wcvlgr8nry3pc33b8gmkb774crvy4kp7-gwyddion-18.09.git.ce8d73e11f9
haskellPackages.GlomeVec.x86_64-darwin                                        doc=/nix/store/4vbmz3zgl186rz9jn0927v7bywanhdk0-GlomeVec-0.2-doc;/nix/store/7dpswprr57lva1v2dldx6z4hqjs1wsfn-GlomeVec-0.2
haskellPackages.spaceprobe.x86_64-darwin                                      doc=/nix/store/nwhldsn7r4xrqc562a65r14b68a7xsc2-spaceprobe-0.3.0-doc;/nix/store/605dgrxj4riapba6cxvhacxdcbck6ygn-spaceprobe-0.3.0
highlight.x86_64-darwin                                                       /nix/store/hln7c5rm8im482c87jjrnqkrg1j4wv7h-highlight-3.43
irods-icommands.x86_64-linux                                                  /nix/store/c5byyw06mknx76zfir566kzj6gpmjjrr-irods-icommands-4.2.2
irods.x86_64-linux                                                            /nix/store/94n1hfp4v0rzrbwwhbs0a4c7d0a6g94x-irods-4.2.2
julia.x86_64-darwin                                                           /nix/store/6r83ngqip10m27vd5y7i34836g99cnym-julia-0.6.2
julia_05.x86_64-darwin                                                        /nix/store/l7qcik01ghk34p5hnz74325b4r66hd9l-julia-0.5.2
julia_06.x86_64-darwin                                                        /nix/store/6r83ngqip10m27vd5y7i34836g99cnym-julia-0.6.2
kdevelop.x86_64-linux                                                         /nix/store/bzcribink830s9nfv9m7mq88czg7vmya-kdevelop-5.1.2
libbap.x86_64-darwin                                                          /nix/store/ykv8xk4vk80hcxrp5b2dgwa0i1mymlpq-libbap-master-2018-03-01
libmodsecurity.x86_64-darwin                                                  /nix/store/wvvm81d997r4v1fg3lkrspbwfyyd9ixb-libmodsecurity-3.0.0
llvm_38.x86_64-darwin                                                         /nix/store/kspr9mxl6lgkwv1brzbwxm6wih2vl7by-llvm-3.8.1
llvm_39.x86_64-darwin                                                         lib=/nix/store/291nj8v7q99yf9x5sshms5ypb0l4lgv5-llvm-3.9.1-lib;/nix/store/0dl94isqxs1v5216njppkavpi2ff0jpc-llvm-3.9.1
openmw-tes3mp.x86_64-linux                                                    /nix/store/pw1scdb314xxbnjqhzjnf712ppb8zpfw-tes3mp-0.6.0
osquery.x86_64-linux                                                          /nix/store/i5r9s3yq9fikggviaqvx6156giv7mgja-osquery-3.2.8
plm.x86_64-darwin                                                             /nix/store/r5gc03z4w9dmk5gzi9s04pdzwb3fp3vm-plm-2-5
pony-stable.x86_64-darwin                                                     /nix/store/c8zl07jfyws0cczi98lhzndhwswqbpby-pony-stable-0.1.3
ponyc.x86_64-darwin                                                           /nix/store/81w64z73xfpzmr771b21chr4km1adxgj-ponyc-0.23.0
python27Packages.bap.x86_64-darwin                                            /nix/store/i599vlw4mhjqff0lfxk98gdix5d2zmna-python2.7-bap-1.3.1
python27Packages.jupyterlab_launcher.x86_64-darwin                            /nix/store/p2vfwpc6pyfnfmnsypjmz3345pa4gf8g-python2.7-jupyterlab_launcher-0.11.0
python27Packages.jupyterlab_launcher.x86_64-linux                             /nix/store/4v2vjhhv3knv0i56l3x13wrng81c73fh-python2.7-jupyterlab_launcher-0.11.0
python36Packages.bap.x86_64-darwin                                            /nix/store/gdbl3nvlvnv279knr42v9k7z8nnvp191-python3.6-bap-1.3.1
python36Packages.git-annex-adapter.x86_64-darwin                              /nix/store/rrvxbdyfaf81d8vkyg86l3gjfhd4plbz-python3.6-git-annex-adapter-0.2.0
python36Packages.git-annex-adapter.x86_64-linux                               /nix/store/jw4gjxnw4hvfrjkb9nf131gifg7vw5lk-python3.6-git-annex-adapter-0.2.0
python36Packages.jupyterlab.x86_64-darwin                                     /nix/store/pm43v2g0ynfnrmw49n1rmvh85dxf226k-python3.6-jupyterlab-0.32.1
python36Packages.jupyterlab.x86_64-linux                                      /nix/store/ciadabq2d6hv5psw20xhr48l8sl9jv4f-python3.6-jupyterlab-0.32.1
python36Packages.jupyterlab_launcher.x86_64-darwin                            /nix/store/66kwr12m0dhki5y4kvjns0i2slldmpkb-python3.6-jupyterlab_launcher-0.11.0
python36Packages.jupyterlab_launcher.x86_64-linux                             /nix/store/fr6nrry06vaiini2pz4li3l7971fvlgl-python3.6-jupyterlab_launcher-0.11.0
ripser.x86_64-linux                                                           /nix/store/69w1sg1f2z9p95a7gzs7b1q0p2b1bbyj-ripser-18.09.git.ce8d73e11f9
terra.x86_64-linux                                                            bin=/nix/store/00722iikn8ki3hbrlffnlgdcn3bl290q-terra-git-2016-06-09-bin;dev=/nix/store/57cn7iap8im9n54apyqg1s6bl97mcj68-terra-git-2016-06-09-dev;/nix/store/iaaf2fy6af4lh05x8d7yd51ckxc1djgv-terra-git-2016-06-09;static=/nix/store/j152sp2nim1an2zq4lz6121wlmlwispr-terra-git-2016-06-09-static
tests.cc-wrapper-clang-39.x86_64-darwin                                       /nix/store/xsmdfv9d397nsbd823m2r7sd778rml0c-cc-wrapper-test
tests.cc-wrapper-libcxx-39.x86_64-darwin                                      /nix/store/xsmdfv9d397nsbd823m2r7sd778rml0c-cc-wrapper-test
tests.cc-wrapper-libcxx-39.x86_64-linux                                       /nix/store/51k7swv4m5jr5mpidn275q4fhp0hg50z-cc-wrapper-test
valgrind-light.x86_64-darwin                                                  dev=/nix/store/b0w652f2fzg8mryxkx4r0w613wq4wsiw-valgrind-3.13.0-dev;doc=/nix/store/2g9k9772551cx099gr327w4026jx4clw-valgrind-3.13.0-doc;man=/nix/store/vb6shg00dxf8cr3ddyf2idlg4lhv45dv-valgrind-3.13.0-man;/nix/store/2sp9jbhx4d3dql55kc630ys05g5s666x-valgrind-3.13.0
valgrind.x86_64-darwin                                                        dev=/nix/store/gvf83www9jpy9m2j8r8rhwiacfjss44w-valgrind-3.13.0-dev;doc=/nix/store/hg9pnlvalqvw1zvb2qi4x546xn3wh26q-valgrind-3.13.0-doc;man=/nix/store/3bj1p2y6p42vhkg3v3hj0953x3ghj4r9-valgrind-3.13.0-man;/nix/store/nq34ihx5z6k1gjyq5rhafjainzimihrl-valgrind-3.13.0

@dtzWill
Copy link
Member Author

dtzWill commented Jun 23, 2018

Rebasing for some fixes on master to make for cleaner nox-review (not sure I have enough build power to process them but the first one I tried failed so I investigated :))

@GrahamcOfBorg
Copy link

Success on aarch64-linux (full log)

Attempted: clang_38, clang_39, llvm_38, llvm_39, llvm_4

Partial log (click to expand)

/nix/store/60h1rjl5hnc4qvglqzi9w60qjpzx9cy2-clang-wrapper-3.8.1
/nix/store/29dwqfhv32fks3c9vkfsl2vg9z45l02y-clang-wrapper-3.9.1
/nix/store/wg7nlng6mvfy5i106gya0cv7ll2qrlkz-llvm-3.8.1
/nix/store/gk0wykxybbbp16b1aryb1zacs17ccv7c-llvm-3.9.1
/nix/store/1bl08xv1i79mlzwp16n3a5lyhy8pica3-llvm-4.0.1

@GrahamcOfBorg
Copy link

Failure on x86_64-darwin (full log)

Attempted: clang_38, clang_39, llvm_38, llvm_39, llvm_4

Partial log (click to expand)

  CMakeLists.txt:48 (project)


-- Configuring incomplete, errors occurred!
See also "/tmp/nix-build-llvm-3.9.1.drv-0/llvm/build/CMakeFiles/CMakeOutput.log".
See also "/tmp/nix-build-llvm-3.9.1.drv-0/llvm/build/CMakeFiles/CMakeError.log".
builder for '/nix/store/mflqk43986xdn3c21dcsn9wx26b6c5qz-llvm-3.9.1.drv' failed with exit code 1
cannot build derivation '/nix/store/917kzx7zd4xm3jxih6rgx313zwlv61qj-clang-3.9.1.drv': 1 dependencies couldn't be built
cannot build derivation '/nix/store/bb5zj3949pxgz9z7m1x3vpsvz3d6slw2-clang-wrapper-3.9.1.drv': 2 dependencies couldn't be built
�[31;1merror:�[0m build of '/nix/store/bb5zj3949pxgz9z7m1x3vpsvz3d6slw2-clang-wrapper-3.9.1.drv', '/nix/store/dqqfyg36dbbskd1y4j1nsmcpw3m8x8ci-llvm-3.8.1.drv', '/nix/store/l5w5i276lacivkdhngh55jyqndg8m0hs-clang-wrapper-3.8.1.drv', '/nix/store/mflqk43986xdn3c21dcsn9wx26b6c5qz-llvm-3.9.1.drv' failed

@dtzWill
Copy link
Member Author

dtzWill commented Jun 23, 2018

Alright LGTM on Linux and such-- post-merge review welcome, and will be monitoring hydra a bit to see how non-borg Darwin likes the changes (since they appear to be builder-specific).

@dtzWill dtzWill merged commit 1667a3c into NixOS:master Jun 23, 2018
@GrahamcOfBorg
Copy link

Success on x86_64-linux (full log)

Attempted: clang_38, clang_39, llvm_38, llvm_39, llvm_4

Partial log (click to expand)

installing
post-installation fixup
shrinking RPATHs of ELF executables and libraries in /nix/store/znayzw0hsmdr5qgds9z8ggdwvfafdbb3-clang-wrapper-3.8.1
patching script interpreter paths in /nix/store/znayzw0hsmdr5qgds9z8ggdwvfafdbb3-clang-wrapper-3.8.1
checking for references to /build in /nix/store/znayzw0hsmdr5qgds9z8ggdwvfafdbb3-clang-wrapper-3.8.1...
/nix/store/znayzw0hsmdr5qgds9z8ggdwvfafdbb3-clang-wrapper-3.8.1
/nix/store/nzsfsbnn6ilyxfprq587pqncw7r53m4q-clang-wrapper-3.9.1
/nix/store/ijnfv6wrrpzmj8fffxdn0ff6rhsh5qdr-llvm-3.8.1
/nix/store/gf59y603jpc05rmyr9vg5wm8fi4aibdz-llvm-3.9.1
/nix/store/a83nrj2ra2aj4pvc2551v4cdscwxphv8-llvm-4.0.1

@dtzWill dtzWill deleted the feature/llvm-38-39-musl branch June 23, 2018 22:08
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