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

llvm: 4.0.1 -> 5.0.0rc2 #28410

Closed
wants to merge 1 commit into from
Closed

llvm: 4.0.1 -> 5.0.0rc2 #28410

wants to merge 1 commit into from

Conversation

andrewrk
Copy link
Member

Motivation for this change

LLVM 5.0 is coming out soon. From llvm.org, final release is August 23. This is rc2, we can test and see if everything works. I think we should be able to drop it in place instead of llvm 4, nothing really big changed.

I'm still waiting for it to build, will update this PR when status changes.

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

@andrewrk andrewrk mentioned this pull request Aug 19, 2017
7 tasks
@vcunat
Copy link
Member

vcunat commented Aug 19, 2017

The source hashes are wrong. EDIT: well, not for llvm package itself...

@vcunat
Copy link
Member

vcunat commented Aug 19, 2017

It seems you copied the files from some older nixpkgs version and therefore missed changes, e.g. around man pages in llvm. (Copying is prone to this, unfortunately.)

@vcunat
Copy link
Member

vcunat commented Aug 19, 2017

Hmm, llvm tests now try stuff with suid/sgid permission bits and thus fail when sandboxed :-/

@dtzWill
Copy link
Member

dtzWill commented Aug 19, 2017

This is what I've been using to disable those tests on 5+, basically nuke the entire Path unittest.

A better approach would be to patch out the failing tests, but thought I'd share anyway in case it's useful:

    # FileSystem permissions tests fail with various special bits
    substituteInPlace llvm/unittests/Support/CMakeLists.txt \
      --replace "Path.cpp" ""
    rm llvm/unittests/Support/Path.cpp

@andrewrk
Copy link
Member Author

Alright here's where I'm at:

  • I created this PR against c5badb1 which is what nixos-version reports for me. I'm confused about that because llvm is at 4.0.0 there:
    release_version = "4.0.0";
    however 4.0.1 is the one that gets installed if I do, e.g. nix-shell -p llvm_4
  • I updated this PR with the correct hashes and some other fixes.
  • I tried getting a diff of changes from c5badb1 to master and applying those to this PR, but there were many conflicts and I gave up. I think this work should be done by hand instead of with diff/patch. Or a better strategy would be to diff 4/5 and manually apply these changes to master.
  • I tried nix-build -A llvmPackages in the changes based on c5badb1 and ran into this problem:
[ 62%] Python script building LLDB Python wrapper
ERROR:root:swig failed with error code 1: stdout=, stderr=/tmp/nix-build-lldb-5.0.0rc2.drv-0/lldb-5.0.0rc2.src/scripts/lldb.swig:53: Error: CPP #error "Swig versions 3.0.9 and 3.0.10 are incompatible with lldb.". Use the -cpperraswarn option to continue swig processing.

ERROR:root:command line:
/nix/store/51bv29hki7y8jpb13iqdnlw52vgni3r8-swig-3.0.10/bin/swig -c++ -shadow -python -threads -I/tmp/nix-build-lldb-5.0.0rc2.drv-0/lldb-5.0.0rc2.src/include -I. -D__STDC_LIMIT_MACROS -D__STDC_CONSTANT_MACROS -outdir /tmp/nix-build-lldb-5.0.0rc2.drv-0/lldb-5.0.0rc2.src/build/scripts -o /tmp/nix-build-lldb-5.0.0rc2.drv-0/lldb-5.0.0rc2.src/build/scripts/LLDBWrapPython.cpp /tmp/nix-build-lldb-5.0.0rc2.drv-0/lldb-5.0.0rc2.src/scripts/lldb.swig
make[2]: *** [scripts/CMakeFiles/swig_wrapper.dir/build.make:136: scripts/LLDBWrapPython.cpp] Error 1
make[1]: *** [CMakeFiles/Makefile2:145: scripts/CMakeFiles/swig_wrapper.dir/all] Error 2
make: *** [Makefile:128: all] Error 2
  • I tried the following file with NIX_PATH=nixpkgs=/home/andy/dev/nixpkgs nix-shell ~/env/zig-llvm5.nix (nixpkgs with this PR based on c5badb1) and all zig tests passed:
with import <nixpkgs> {}; {
  tmpAoeu = stdenv.mkDerivation {
    name = "tmpAoeu";

    hardeningDisable = [ "all" ];
    buildInputs = [
      cmake
      llvmPackages_5.clang-unwrapped
      llvm_5
      lld
    ];
  };
}

@andrewrk
Copy link
Member Author

Here are the rc3 hashes: andrewrk@f18e59c

@fpletz fpletz added this to the 18.03 milestone Aug 30, 2017
@dtzWill
Copy link
Member

dtzWill commented Sep 18, 2017

This seems dead, probably should be closed in favor of #29541 .

@andrewrk andrewrk closed this Sep 18, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants