Skip to content

Downgrade llvmPackages_latest to 12 on Darwin#146517

Closed
midchildan wants to merge 3 commits intoNixOS:stagingfrom
midchildan:fix/llvmpackages_latest-darwin
Closed

Downgrade llvmPackages_latest to 12 on Darwin#146517
midchildan wants to merge 3 commits intoNixOS:stagingfrom
midchildan:fix/llvmpackages_latest-darwin

Conversation

@midchildan
Copy link
Member

Motivation for this change

The recent upgrade of llvmPackages_latest to llvmPackages_13 broke a number of packages that depend on it, due to llmvPackages_13.libcxx (and by extension, llvmPackages_13.clang) being marked as broken. This reverts those changes on Darwin. It should fix the builds of the following packages:

  • clang-analyzer
  • clang-tools
  • lldb
  • ccls

Relates to: #140783, #140783
ZHF: #144627

Things done

Since building from the staging branch triggered an overwhelming amount of local builds, I've tested on the master branched and rebased against staging.

  • Built on platform(s)
    • x86_64-linux
    • aarch64-linux
    • x86_64-darwin
    • aarch64-darwin
  • For non-Linux: Is sandbox = true set in nix.conf? (See Nix manual)
  • Tested, as applicable:
  • Tested compilation of all packages that depend on this change using nix-shell -p nixpkgs-review --run "nixpkgs-review rev HEAD". Note: all changes have to be committed, also see nixpkgs-review usage
  • Tested basic functionality of all binary files (usually in ./result/bin/)
  • 21.11 Release Notes (or backporting 21.05 Release notes)
    • (Package updates) Added a release notes entry if the change is major or breaking
    • (Module updates) Added a release notes entry if the change is significant
    • (Module addition) Added a release notes entry if adding a new NixOS module
  • Fits CONTRIBUTING.md.

@midchildan midchildan changed the title Downgrade llvmPackages_latest to 13 on Darwin Downgrade llvmPackages_latest to 12 on Darwin Nov 18, 2021
@midchildan midchildan force-pushed the fix/llvmpackages_latest-darwin branch from c73ffcf to 8aa8ecf Compare November 18, 2021 18:06
@midchildan midchildan force-pushed the fix/llvmpackages_latest-darwin branch from 8aa8ecf to e440b76 Compare November 18, 2021 18:08
@ofborg ofborg bot added the 6.topic: darwin Running or building packages on Darwin label Nov 18, 2021
@risicle
Copy link
Contributor

risicle commented Nov 18, 2021

@ofborg eval

@jonringer
Copy link
Contributor

I would prefer to fix why they are broken, rather than just "rolling" back. However that's a lot more work.

@jonringer
Copy link
Contributor

@ofborg eval

@midchildan
Copy link
Member Author

midchildan commented Nov 19, 2021

For an actual fix, building llvmPackages_13 with llvmPackages_12.stdenv seems to fix the original problem and makes the compile phase succeed, but then it fails when linking the dynamic library. I haven't found a solution to this yet, and judging from the package definitions, neither Homebrew nor Macports seem to suffer from this problem.

[ 97%] Linking CXX static library ../lib/libc++.a
/nix/store/hzkyp1z5amrp9b01hiim19p1wwyf1hjz-cctools-port-949.0.1/bin/ranlib: file: ../lib/libc++.a(functional.cpp.o) has no symbols
/nix/store/3sp84cykwfbyxyyzy5y8dxifgfhs1bx0-cctools-binutils-darwin-949.0.1/bin/ranlib: file: ../lib/libc++.a(functional.cpp.o) has no symbols
[ 98%] Linking CXX shared library ../lib/libc++.dylib
[ 98%] Built target cxx_static
ld: requested re-export symbol std::set_unexpected(void (*)()) is not from a dylib, but from CMakeFiles/cxx_shared.dir/exception.cpp.o
 file 'CMakeFiles/cxx_shared.dir/exception.cpp.o' for architecture x86_64
clang-12: error: linker command failed with exit code 1 (use -v to see invocation)
make[2]: *** [src/CMakeFiles/cxx_shared.dir/build.make:737: lib/libc++.1.0.dylib] Error 1
make[1]: *** [CMakeFiles/Makefile2:471: src/CMakeFiles/cxx_shared.dir/all] Error 2
make: *** [Makefile:136: all] Error 2

@ofborg ofborg bot added the 8.has: package (new) This PR adds a new package label Nov 20, 2021
@ofborg ofborg bot added 10.rebuild-darwin: 501+ This PR causes many rebuilds on Darwin and should normally target the staging branches. 10.rebuild-darwin: 2501-5000 This PR causes many rebuilds on Darwin and should target the staging branches. 10.rebuild-linux: 1-10 This PR causes between 1 and 10 packages to rebuild on Linux. labels Nov 20, 2021
midchildan added a commit to midchildan/dotfiles that referenced this pull request Nov 21, 2021
midchildan added a commit to midchildan/dotfiles that referenced this pull request Nov 21, 2021
@midchildan
Copy link
Member Author

midchildan commented Nov 21, 2021

I've enabled llvmPackages_12.llvm-manpages in a572e7e, since the lack of it seemed to be causing the ofborg failures.

@midchildan
Copy link
Member Author

Closing in favor of #147289.

@midchildan midchildan closed this Nov 24, 2021
@midchildan
Copy link
Member Author

Reopening because #147289 (comment).

@midchildan midchildan reopened this Nov 24, 2021
@midchildan
Copy link
Member Author

Re-closing because #147289 is now working.

@midchildan midchildan closed this Nov 25, 2021
@rrbutani rrbutani added the 6.topic: llvm/clang Issues related to llvmPackages, clangStdenv and related label May 27, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

6.topic: darwin Running or building packages on Darwin 6.topic: llvm/clang Issues related to llvmPackages, clangStdenv and related 8.has: package (new) This PR adds a new package 10.rebuild-darwin: 501+ This PR causes many rebuilds on Darwin and should normally target the staging branches. 10.rebuild-darwin: 2501-5000 This PR causes many rebuilds on Darwin and should target the staging branches. 10.rebuild-linux: 1-10 This PR causes between 1 and 10 packages to rebuild on Linux.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants