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: update default 5 -> 6 #39986

Closed
wants to merge 1 commit into from

Conversation

dtzWill
Copy link
Member

@dtzWill dtzWill commented May 4, 2018

Testing needed.

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

@LnL7
Copy link
Member

LnL7 commented May 7, 2018

We should run a full hydra build for darwin before merging this, IIRC I already tried to build a basic set do you remember if that was ok?

@dtzWill
Copy link
Member Author

dtzWill commented May 7, 2018

I don't remember, sorry :(. If it was a hydra job would it be on an instance somewhere perhaps?

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.

Not sure what this is about...

/nix/store/r3hlqw31bp6b0n0286jvzsgsf9xa5r0h-bootstrap-stage1-stdenv-darwin/setup: line 1305: cd: /nix/store/28addjb206cfvj78dq6jjyg3wzvsffd3-architecture-osx-10.11.6/include: No such file or directory
builder for '/nix/store/1sb4xy60mpw3bfpydg9pjksz3rjn3ih0-Libsystem-osx-10.11.6.drv' failed with exit code 1

@LnL7
Copy link
Member

LnL7 commented May 7, 2018

Well, staging is completely broken.

@dtzWill
Copy link
Member Author

dtzWill commented May 15, 2018

D'oh re:staging being broken. Are there issues tracking this?

EDIT: by "this" I mean "staging being broken" :)

@LnL7
Copy link
Member

LnL7 commented May 15, 2018

Should be fixed now, let me start another build.

@LnL7
Copy link
Member

LnL7 commented May 15, 2018

Well, it was for a day. Unknown option: -DCMAKE_CXX_COMPILER=c++. I'll look into it again.

@dtzWill
Copy link
Member Author

dtzWill commented May 15, 2018

@LnL7: https://github.com/NixOS/nixpkgs/pull/40539/files#r188388605 fwiw, hopefully fixed soon :).

@dtzWill
Copy link
Member Author

dtzWill commented May 16, 2018

Beep boop! 😁

@dtzWill
Copy link
Member Author

dtzWill commented Jun 6, 2018

Updated to latest staging (conflicts resolved)!

@dtzWill dtzWill force-pushed the update/llvm-6-default-rebased branch from e8b45b1 to ff80297 Compare June 17, 2018 01:59
@dtzWill
Copy link
Member Author

dtzWill commented Jun 17, 2018

Conflicts resolved!

@dtzWill
Copy link
Member Author

dtzWill commented Jun 18, 2018

hmm not sure why eval breaks, do you know why this is happening @Ericson2314 ? No worries if not but since you're poked at these things lately thought I'd ask before diving in too deep :3.

@Ericson2314 Ericson2314 force-pushed the update/llvm-6-default-rebased branch from ff80297 to 98780b8 Compare June 19, 2018 00:13
@Ericson2314
Copy link
Member

Ericson2314 commented Jun 19, 2018

Yes, it's because the Darwin bootstrapping recently was changed referred to llvmPackages_5 directly. Unfortunately this hard-coding of version was necessary because we need to override llvmPackages too, and don't want to break llvmPackages == llvmPackages_5.

I've fixed this and rebased the PR.

@GrahamcOfBorg GrahamcOfBorg added the 6.topic: stdenv Standard environment label Jun 19, 2018
@dtzWill
Copy link
Member Author

dtzWill commented Jun 19, 2018

Okay, thank you! I think I oops accidentally missed your change... but I think ended up in the same place.

Will try moving back to your update shortly...

(EDIT: this was done almost immediately after posting this, there's just no visual indication of such :))

@dtzWill
Copy link
Member Author

dtzWill commented Jul 6, 2018

Maybe we'll update the default by the time LLVM 7.0.1 is released... 😛 😇

@samueldr samueldr added this to the 18.09 milestone Aug 10, 2018
@samueldr
Copy link
Member

Anything blocking this if, let's say, we would target this for 18.09? Any inconvenience could be expected to be caused by merging this?

There's not been a bunch of discussion, so either everything's fine (which I think it probably is) or there hasn't been enough eyes on this.

@LnL7
Copy link
Member

LnL7 commented Aug 10, 2018

This has a large impact on darwin builds, similar to a gcc upgrade for the linux side. There's no fundamental problem but it needs more rigorous testing compared to other changes.

  1. Make sure stdenv bootstrapping still works, I cleaned some stuff up recently so that might be simpler now.
  2. Build a full darwin eval on hydra to get a sense of the amount of newly broken packages, I've used my wip jobset for this in the past.

@dtzWill
Copy link
Member Author

dtzWill commented Aug 21, 2018

I'll look into conflicts shortly, but this is long overdue! 😁

They're cutting RC's for 7, haha!

@LnL7
Copy link
Member

LnL7 commented Aug 21, 2018

@dtzWill You should be able to drop the overrides in all-packages.nix, that stuff is done in the stdenv phases now.

@dtzWill dtzWill force-pushed the update/llvm-6-default-rebased branch from 98780b8 to c4b43a4 Compare August 21, 2018 20:42
@dtzWill
Copy link
Member Author

dtzWill commented Aug 21, 2018

@dtzWill You should be able to drop the overrides in all-packages.nix, that stuff is done in the stdenv phases now.

Oooo very nice, makes this sort of thing much easier! Resolved commits, haha at this point it's almost entirely s/llvmPackages_5/llvmPackages_6/g 😁. Let's see.

@LnL7
Copy link
Member

LnL7 commented Aug 22, 2018

Hmm, I think the llvm6 expressions might have diverged a bit.

output '/nix/store/a04j9abvhgbr59z379n89dcsqi1az8h9-stdenv-darwin' is not allowed to refer to the following paths:
     /nix/store/4ks1n2bvbvpr9gkds5fb65pggfk3m8k8-libxml2-2.9.8

@dtzWill
Copy link
Member Author

dtzWill commented Aug 22, 2018

Hmm, I think the llvm6 expressions might have diverged a bit.

After some poking I found that llvm_6 (or clang_6, one of them) has a reference to libxml2 on Linux as well, where the llvm/clang 5 variant does not. Investigating, there are some options set on 6 that don't really make sense while bootstrapping anyway...

@LnL7
Copy link
Member

LnL7 commented Aug 22, 2018

Oh I just noticed, this stuff might be important https://github.com/NixOS/nixpkgs/blob/master/pkgs/stdenv/darwin/default.nix#L256

@dtzWill
Copy link
Member Author

dtzWill commented Aug 23, 2018

Oh I just noticed, this stuff might be important https://github.com/NixOS/nixpkgs/blob/master/pkgs/stdenv/darwin/default.nix#L256

I may be mistaken but I think that's already handled, and in fact is the only reason this PR isn't a tiny trivial change in top-level :).

I'm not sure what role libxml2 plays but I'm wondering if answer might be to just libxml2 = null in Darwin's bootstrap LLVM? Or maybe mark it allowed if that's preferable?

Unfortunately I'm not in a good position to iterate/test/explore this, thoughts and testing from Darwin folks appreciated :).

@LnL7
Copy link
Member

LnL7 commented Aug 23, 2018

@dtzWill I don't think we want to depend on libxml2 (same with ncurses actually), but it's a required build dependency IIRC. libxml2 isn't a runtime dependency now.

$ nix why-depends /nix/store/fv2l2w3w8931jcsv150c1pkb4l315gas-stdenv-darwin /nix/store/k4hyqqki1r4xfaja94r4hrnjlgnxh7v1-bootstrap-stage3-libxml2-2.9.8
/nix/store/fv2l2w3w8931jcsv150c1pkb4l315gas-stdenv-darwin
╚═══setup: …e-epoch-to-latest.sh /nix/store/wm35lw0kgpnjfybj1b1cp78s2ys3rhww-clang-wrapper-6.0.1".defaultBui…
    => /nix/store/wm35lw0kgpnjfybj1b1cp78s2ys3rhww-clang-wrapper-6.0.1
    ╚═══bin/clang: …k disable=SC2193.[[ "/nix/store/nbbznkx8imy3qx2934fwvdspl0h0vl2n-clang-6.0.1/bin/clang" = *++ ]]…
        => /nix/store/nbbznkx8imy3qx2934fwvdspl0h0vl2n-clang-6.0.1
        ╚═══lib/cmake/clang/ClangTargets-release.cmake: …RTED_SONAME_RELEASE "/nix/store/5d98z1k98ajwjgld86mcz3v0sclls7qj-llvm-6.0.1-lib/lib/libclang.dyl…
            => /nix/store/5d98z1k98ajwjgld86mcz3v0sclls7qj-llvm-6.0.1-lib
            ╚═══lib/libLLVM.dylib: ….x.................../nix/store/k4hyqqki1r4xfaja94r4hrnjlgnxh7v1-bootstrap-stage3-libxml2-2.9.8/…
                => /nix/store/k4hyqqki1r4xfaja94r4hrnjlgnxh7v1-bootstrap-stage3-libxml2-2.9.8

$ otool -L /nix/store/5d98z1k98ajwjgld86mcz3v0sclls7qj-llvm-6.0.1-lib/lib/libLLVM.dylib
/nix/store/5d98z1k98ajwjgld86mcz3v0sclls7qj-llvm-6.0.1-lib/lib/libLLVM.dylib:
        /nix/store/5d98z1k98ajwjgld86mcz3v0sclls7qj-llvm-6.0.1-lib/lib/libLLVM.dylib (compatibility version 1.0.0, current version 6.0.1)
        /nix/store/rxdymjw4v1y5hwffdvxwazpk7cfxch8c-libffi-3.2.1/lib/libffi.6.dylib (compatibility version 7.0.0, current version 7.4.0)
        /nix/store/nsk3c08c1k7443kmghjmm1bm9bhf301y-zlib-1.2.11/lib/libz.dylib (compatibility version 1.0.0, current version 1.2.11)
        /nix/store/v588bjpzfd0kqaln1fzvw5v84yk6cz1d-ncurses-6.1/lib/libncursesw.6.dylib (compatibility version 6.0.0, current version 6.0.0)
        /nix/store/ry3vw1brlkhl1dbn3d0j4kxzj66apqvi-Libsystem-osx-10.11.6/lib/libSystem.B.dylib (compatibility version 1.0.0, current version 1226.10.1)
        /nix/store/k4hyqqki1r4xfaja94r4hrnjlgnxh7v1-bootstrap-stage3-libxml2-2.9.8/lib/libxml2.2.dylib (compatibility version 12.0.0, current version 12.8.0)
        /nix/store/msjrcrk2kv31bd3lghg1v9003lch56y3-libc++-6.0.1/lib/libc++.1.0.dylib (compatibility version 1.0.0, current version 1.0.0)

@orivej
Copy link
Contributor

orivej commented Aug 23, 2018

libxml2 is an optional dependency that is only used to support Windows .manifest files.

@LnL7
Copy link
Member

LnL7 commented Aug 25, 2018

I must have been thinking of ncurses, not libxml2. Removing it seems to work, should we do that in the stdenv or can we just drop it everywhere?

diff --git a/pkgs/development/compilers/llvm/6/llvm.nix b/pkgs/development/compilers/llvm/6/llvm.nix
index 787a48416ab..78583906273 100644
--- a/pkgs/development/compilers/llvm/6/llvm.nix
+++ b/pkgs/development/compilers/llvm/6/llvm.nix
@@ -4,7 +4,6 @@
 , python
 , libffi
 , libbfd
-, libxml2
 , ncurses
 , version
 , release_version
@@ -36,7 +35,7 @@ in stdenv.mkDerivation (rec {
   nativeBuildInputs = [ cmake python ]
     ++ stdenv.lib.optional enableManpages python.pkgs.sphinx;
 
-  buildInputs = [ libxml2 libffi ];
+  buildInputs = [ libffi ];
 
   propagatedBuildInputs = [ ncurses zlib ];

@orivej
Copy link
Contributor

orivej commented Aug 26, 2018

I'd enable it for the sake of completeness, and if LLVM is rebuilt after the stdenv bootstrap is complete regardless of libxml2, there are no downsides.

@orivej
Copy link
Contributor

orivej commented Sep 1, 2018

There has been a recent bug report about a miscompilation with -O2 in Clang 6 and later: https://bugs.llvm.org/show_bug.cgi?id=38786 . I'd rather not update without a patch.

@vcunat vcunat modified the milestones: 18.09, 19.03 Sep 2, 2018
@@ -159,7 +159,7 @@ in rec {
dyld = bootstrapTools;
};

llvmPackages_5 = {
llvmPackages_6 = {
Copy link
Member

Choose a reason for hiding this comment

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

Are you just getting rid of attributes for 5 here?

Copy link
Member

Choose a reason for hiding this comment

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

Oh never mind, I misunderstood where this was!

@copumpkin
Copy link
Member

copumpkin commented Sep 7, 2018

If it now depends on libxml2, that isn't a huge deal, we can just add it to the stdenv whitelist.

Edit: just saw the .manifest thing, let's just remove the optional dependency for now to minimize changes

@LnL7
Copy link
Member

LnL7 commented Sep 7, 2018

That's not the problem. This is a bootstrap version of libxml2 so we'd need to build llvm/clang twice or pull in python and all it's dependencies at runtime.

@LnL7
Copy link
Member

LnL7 commented Sep 7, 2018

Given the darwin bootstrapping and runtime implications I'd argue moving libxml2 to an overridable flag that's disabled by default is a better than increasing the darwin stdenv or adding conditionals.

@andrewrk
Copy link
Member

The final tag for 7 is in.

@dtzWill
Copy link
Member Author

dtzWill commented Oct 29, 2018

Closing in favor of #49402 (which attempts to dodge the Darwin bootstrap issue/touchups so it can be solved separately).

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

9 participants