[llvm-bugs] [Bug 44099] New: can't link a program with both llvm and libclang-cpp
via llvm-bugs
llvm-bugs at lists.llvm.org
Wed Nov 20 23:57:34 PST 2019
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: unassignedbugs at nondot.org
Reporter: mikulas at artax.karlin.mff.cuni.cz
CC: llvm-bugs at 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.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-bugs/attachments/20191121/9ad4266b/attachment.html>
More information about the llvm-bugs
mailing list