-
-
Notifications
You must be signed in to change notification settings - Fork 14.1k
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.clangUseLLVM cannot find libunwind.so #201591
Comments
I agree with this fix. I think it the same treatment is also needed for libc++ and libstdc++? |
llvmPackages_*.clangUseLLVM: add libunwind to lib search path (#201591)
In spite of the PR, this is still an issue for me:
|
How to reproduce this? |
Have the following in your configuration.nix for your system packages:
Clang a c file. It gives and error. Clang a c file with -fuse-ld=lld and it gives the above error |
@JustAnotherCodemonkey Sorry but I failed to reproduce this, clang compiles without error on my machine. Could you provide the commit of your nixpkgs, the running platform, and a debug trace by running |
How do I get the commit of my nixpkgs? I tried sudo nix-channel --update and it still doesn't work. |
I'm having the same issue with llvmPackages, both 16 and 17. I am using WSL2
Seems like the |
No matter what LLVM package version I use, there's no |
Hey folks, I believe this was fixed in 555c7d1 as @SharzyL was suggesting. At least, I cannot reproduce here on my x86_64-linux. Prior to that commit I get the error you report building a You can test a specific nixpkgs commit using this command, which reports an error (or doesn't show libunwind) if there is an issue.
I think this can be closed, or at least it needs more information about what is being tested precisely (nixpkgs commit in particular). |
Describe the bug
When using
llvmPackages.clangUseLLVM
to compile, the linker cannot find libunwind.so.Steps To Reproduce
Steps to reproduce the behavior:
Expected behavior
The linker should be able to find libunwind and compile successfully.
Additional context
Run with
NIX_DEBUG=1
gives the following:It is clear that the path of libunwind is not added to search path. Maybe we should add
-L${targetLlvmLibraries.libunwind}/lib
innixSupport.cc-cflags
.nixpkgs/pkgs/development/compilers/llvm/git/default.nix
Lines 151 to 172 in 3a86856
Notify maintainers
@Ericson2314 @primeos
Metadata
"x86_64-linux"
Linux 6.0.8, NixOS, 22.11 (Raccoon), 22.11pre-git
yes
yes
nix-env (Nix) 2.11.0
"nixos-22.05"
"nixos, nixpkgs"
/home/sharzy/.nix-defexpr/channels/nixpkgs
The text was updated successfully, but these errors were encountered: