Bug 1687047 - clang doesn't work on rawhide if ran from cargo / rust programs
Summary: clang doesn't work on rawhide if ran from cargo / rust programs
Keywords:
Status: CLOSED UPSTREAM
Alias: None
Product: Fedora
Classification: Fedora
Component: clang
Version: rawhide
Hardware: Unspecified
OS: Unspecified
unspecified
unspecified
Target Milestone: ---
Assignee: Tom Stellard
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2019-03-09 02:56 UTC by Emilio Cobos Álvarez (:emilio)
Modified: 2019-03-18 12:04 UTC (History)
6 users (show)

Fixed In Version:
Clone Of:
Environment:
Last Closed: 2019-03-18 12:04:28 UTC
Type: Bug
Embargoed:


Attachments (Terms of Use)

Description Emilio Cobos Álvarez (:emilio) 2019-03-09 02:56:18 UTC
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.

Comment 1 Emilio Cobos Álvarez (:emilio) 2019-03-09 03:01:46 UTC
I filed this in the rust repo as well as: https://github.com/rust-lang/rust/issues/59034

Comment 2 Josh Stone 2019-03-14 00:39:11 UTC
As I just commented on the other issue -- IMO rust's libLLVM should use a custom version suffix.

Comment 3 Emilio Cobos Álvarez (:emilio) 2019-03-18 12:04:28 UTC
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 :)


Note You need to log in before you can comment on or make changes to this bug.