Description of problem: Any program that calls clang from a Rust build script fails with: /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 Version-Release number of selected component (if applicable): clang version 8.0.0 (Fedora 8.0.0-0.3.rc2.fc31) How reproducible: Always Steps to Reproduce: 1. rustup install nightly 2. git clone https://github.com/rust-lang/rust-bindgen && cd $_ 3. cargo test Note that this also affects a bunch of other rust programs. The issue is that clang is picking the rust libLLVM-8.so, rather than the one on the system. I'm not sure if the issue is in Rust's libLLVM.so or on Fedora's clang installation. 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 Additional info: As I said I'm not sure whether the problem is RedHat's build of clang or Rust's LLVM, I'll file both and paste here the rust issue. I'm mostly filing here because it's the most recent clang upgrade what busted it, but it only updated to clang-8 so before that the issue shouldn't happen.
I filed this in the rust repo as well as: https://github.com/rust-lang/rust/issues/59034
As I just commented on the other issue -- IMO rust's libLLVM should use a custom version suffix.
I fixed it on the rust side of things, so closed as UPSTREAM, but I'm not 100% familiar with the bug statuses here, so if that's wrong please change it :)