[llvm-dev] Ubuntu LLVM packages incompatible with clang built projects?

Kern Handa via llvm-dev llvm-dev at lists.llvm.org
Thu Sep 27 00:46:36 PDT 2018


Hi folks,

Not sure if this is the right mailing list target, but I'm trying out the
new LLVM 7.0 packages found at http://apt.llvm.org by porting over an
existing LLVM 6.0 project of ours to the new version. In doing so, I found
that the executable always segfaulted at the same spot with no explanation:

0x0000000000fefe33 in
llvm::RegisterTargetMachine<llvm::X86TargetMachine>::Allocator(llvm::Target
const&, llvm::Triple const&, llvm::StringRef, llvm::StringRef,
llvm::TargetOptions const&, llvm::Optional<llvm::R
eloc::Model>, llvm::Optional<llvm::CodeModel::Model>,
llvm::CodeGenOpt::Level, bool) ()

This happens if I build my project and link it against LLVM 7.0 with either
clang++ 6.1 or clang++ 7.0. This does not happen if I build my project with
g++ 8.

I have also confirmed that building LLVM 7.0 with clang++ and then using
that private build of the libraries fixes the issue.

To summarize, it seems that there's an ABI incompatibility introduced
somewhere, which means LLVM 7.0 compiled with gcc can only be used by other
projects also built with gcc. Is this something that's being investigated
and to be resolved as a fix in 7.1? If not, is there any official release
note that's remarking on this incompatibility?

Thanks,
Kern
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20180927/96df4af4/attachment.html>


More information about the llvm-dev mailing list