Description
Which means that programs that run clang
from a build script, or from cargo in some other way, fail.
Steps to Reproduce:
0. Have a clang binary pointing to clang-8 installed and in your path.
- rustup install nightly
- git clone https://github.com/rust-lang/rust-bindgen && cd $_
- cargo test
Actual results: /usr/bin/clang: relocation error: /lib64/libclangBasic.so.8: symbol _ZTIN4llvm14FoldingSetBaseE version LLVM_8 not defined in file libLLVM-8.so with link time reference
Expected results: not so
This only happens if ran from cargo, if I run the test executable manually then stuff works, so I suspect this is some LD_LIBRARY_PATH mungling that cargo or rustup do under the hood.
This is technically a regression from #58408, same problem does not exist with rust stable / beta and clang 7.
There's a slight chance that there's an issue on how clang-8 is built in Fedora, so I also filed https://bugzilla.redhat.com/show_bug.cgi?id=1687047, but I think it's unexpected that clang when called from cargo / build scripts uses rust's libLLVM.so, and probably should be avoided.