-
-
Notifications
You must be signed in to change notification settings - Fork 14.4k
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_{12,13,14,15,16,17,git}.{libcxx,libcxxabi}: merge libcxxabi into libcxx #292043
Conversation
This pull request has been mentioned on NixOS Discourse. There might be relevant details there: https://discourse.nixos.org/t/aarch64-darwin-rust-rocksdb-bindgen-linking-error/39931/3 |
This pull request has been mentioned on NixOS Discourse. There might be relevant details there: |
I haven't fully confirmed it yet, but I suspect this commit broke statically building boehm-gc on aarch64-darwin http://discourse.nixos.org/t/tracking-down-what-broke-boehm-gc-static-aarch64-apple-darwin/42234/2 |
yes, as noted https://discourse.nixos.org/t/tracking-down-what-broke-boehm-gc-static-aarch64-apple-darwin/42234/3 LLVM doesn't provide a mechanism for static builds that avoid having to specify [edit] PR #305876 merges libc++abi.a into libc++.a |
Key test case: nixpkgs#pkgsStatic.pkgsLLVM.ncurses Prior to this patch, this fails with errors such as: ``` error: undefined symbol: __cxa_throw ``` I think this is a reasonable solution because in NixOS#292043, libcxxabi was 'merged into libcxx', however, the commit message suggests that only dynamic linking was accounted for, because it says: ``` * linux/freebsd `libc++.so` is a linker script `LINK(libc++.so.1, -lc++abi)` making `-lc++` sufficient. ``` Whereas, I found that if I tried linking a "hello world" C++ program with a static hostPlatform, it failed unless -lc++abi was passed. Signed-off-by: Peter Waller <p@pwaller.net>
Key test case: nixpkgs#pkgsStatic.pkgsLLVM.ncurses Prior to this patch, this fails with errors such as: ``` error: undefined symbol: __cxa_throw ``` I think this is a reasonable solution because in #292043, libcxxabi was 'merged into libcxx', however, the commit message suggests that only dynamic linking was accounted for, because it says: ``` * linux/freebsd `libc++.so` is a linker script `LINK(libc++.so.1, -lc++abi)` making `-lc++` sufficient. ``` Whereas, I found that if I tried linking a "hello world" C++ program with a static hostPlatform, it failed unless -lc++abi was passed. Signed-off-by: Peter Waller <p@pwaller.net>
24.05 is incompatible with rules_nixpkgs at this point due to NixOS/nixpkgs#292043.
24.05 is incompatible with rules_nixpkgs at this point due to NixOS/nixpkgs#292043.
It was merged into libcxx in NixOS/nixpkgs#292043.
It was merged into libcxx in NixOS/nixpkgs#292043.
It was merged into libcxx in NixOS/nixpkgs#292043.
Description of changes
-lc++ -lc++abi
from 58 packages as it is no longer required.libc++abi
symbols are missing with LLVM12+'sstdenv
on Darwin #166205This change can be represented in 3 stages
merging libcxxabi into libcxx
-lc++
is sufficient.libc++.so
is a linker scriptLINK(libc++.so.1, -lc++abi)
making-lc++
sufficient.LIBCXX_ADDITIONAL_LIBRARIES
(only used in 16+)stdenv changes
58 package updates
NIX_LDFLAGS = "-l${stdenv.cc.libcxx.cxxabi.libName}
as no longer neededSupersedes #282624
tests bellow all pass:
linux x64 builds
linux / darwin x64 builds
dlopen and link tests
Things done
nix.conf
? (See Nix manual)sandbox = relaxed
sandbox = true
nix-shell -p nixpkgs-review --run "nixpkgs-review rev HEAD"
. Note: all changes have to be committed, also see nixpkgs-review usage./result/bin/
)Add a 👍 reaction to pull requests you find important.