Hello,
I tried to get clang++ to work, but it fails on each compile. More specifically, I get error messages like these when compiling any C++ program:
nix/store/dx8hynidprz3kf4ngcjipnwaxp6h229f-binutils-2.40/bin/ld: cannot find -lc++: No such file or directory
/nix/store/dx8hynidprz3kf4ngcjipnwaxp6h229f-binutils-2.40/bin/ld: cannot find -lc++abi: No such file or directory
/nix/store/dx8hynidprz3kf4ngcjipnwaxp6h229f-binutils-2.40/bin/ld: cannot find -lc++: No such file or directory
clang-13: error: linker command failed with exit code 1 (use -v to see invocation)
/nix/store/dx8hynidprz3kf4ngcjipnwaxp6h229f-binutils-2.40/bin/ld: cannot find -lc++abi: No such file or directory
/nix/store/dx8hynidprz3kf4ngcjipnwaxp6h229f-binutils-2.40/bin/ld: cannot find -lc++: No such file or directory
clang-13: error: linker command failed with exit code 1 (use -v to see invocation)
I have the following section in my configuration.nix:
# List packages installed in system profile. To search, run:
# $ nix search wget
environment.systemPackages = with pkgs; [
# other packages
# ....
llvmPackages_13.stdenv
llvmPackages_13.llvm
llvmPackages_13.libllvm
llvmPackages_13.libllvm.dev
llvmPackages_13.libcxxClang
llvmPackages_13.libcxx
llvmPackages_13.libcxxabi
llvmPackages_13.libcxx.dev
llvmPackages_13.libcxxabi.dev
llvmPackages_13.libcxxStdenv
llvmPackages_13.compiler-rt-libc
llvmPackages_13.clangUseLLVM
llvmPackages_13.bintools
libstdcxx5
gnumake
];
I had a problem earlier today with clang-config not being present, and one of the maintainers thankfully helped me with the libllvm.dev package for that. I am fairly new to Nix, so I don’t know which other suffixes are necessary, or what / where to look packages up, outside of search.nixos.org. Are there any packages or configuration options I missed? Or are there other resources/tutorial, that are more official, which I could turn to (since the manual doesn’t have a LLVM/clang section, and the wiki page is about building from source, not these package issues)?
With regards,
Hypatia of Sva.