https://bugs.llvm.org/show_bug.cgi?id=44099
Bug ID: 44099
Summary: can't link a program with both llvm and libclang-cpp
Product: Packaging
Version: unspecified
Hardware: All
OS: Linux
Status: NEW
Severity: normal
Priority: P
Component: binary tarballs
Assignee: unassignedb...@nondot.org
Reporter: miku...@artax.karlin.mff.cuni.cz
CC: llvm-bugs@lists.llvm.org
The binary tarball contains static libraries for LLVM and dynamic libraries for
clang. They can't be linked together.
How to reproduce:
1. download the tarball
http://releases.llvm.org/9.0.0/clang+llvm-9.0.0-x86_64-linux-gnu-ubuntu-16.04.tar.xz
2. unpack it to /opt/clang+llvm-9.0.0-x86_64-linux-gnu-ubuntu-16.04
3. create a "test.cpp" file with this content:
#include "llvm/Support/TargetSelect.h"
int main(void)
{
llvm::InitializeNativeTarget();
return 0;
}
4. run g++ test.cpp
`/opt/clang+llvm-9.0.0-x86_64-linux-gnu-ubuntu-16.04/bin/llvm-config --cppflags
--cflags --cxxflags --ldflags --libs --system-libs` -lclang-cpp
5. run ./a.out
you get this error:
: CommandLine Error: Option 'x86-machine-combiner' registered more than once!
LLVM ERROR: inconsistency in registered CommandLine options
The binary tarballs should contain the LLVM.so dynamic library to avoid this
error.
--
You are receiving this mail because:
You are on the CC list for the bug.
_______________________________________________
llvm-bugs mailing list
llvm-bugs@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-bugs