<html>
<head>
<base href="https://bugs.llvm.org/">
</head>
<body><table border="1" cellspacing="0" cellpadding="8">
<tr>
<th>Bug ID</th>
<td><a class="bz_bug_link
bz_status_NEW "
title="NEW - can't link a program with both llvm and libclang-cpp"
href="https://bugs.llvm.org/show_bug.cgi?id=44099">44099</a>
</td>
</tr>
<tr>
<th>Summary</th>
<td>can't link a program with both llvm and libclang-cpp
</td>
</tr>
<tr>
<th>Product</th>
<td>Packaging
</td>
</tr>
<tr>
<th>Version</th>
<td>unspecified
</td>
</tr>
<tr>
<th>Hardware</th>
<td>All
</td>
</tr>
<tr>
<th>OS</th>
<td>Linux
</td>
</tr>
<tr>
<th>Status</th>
<td>NEW
</td>
</tr>
<tr>
<th>Severity</th>
<td>normal
</td>
</tr>
<tr>
<th>Priority</th>
<td>P
</td>
</tr>
<tr>
<th>Component</th>
<td>binary tarballs
</td>
</tr>
<tr>
<th>Assignee</th>
<td>unassignedbugs@nondot.org
</td>
</tr>
<tr>
<th>Reporter</th>
<td>mikulas@artax.karlin.mff.cuni.cz
</td>
</tr>
<tr>
<th>CC</th>
<td>llvm-bugs@lists.llvm.org
</td>
</tr></table>
<p>
<div>
<pre>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
<a href="http://releases.llvm.org/9.0.0/clang+llvm-9.0.0-x86_64-linux-gnu-ubuntu-16.04.tar.xz">http://releases.llvm.org/9.0.0/clang+llvm-9.0.0-x86_64-linux-gnu-ubuntu-16.04.tar.xz</a>
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.</pre>
</div>
</p>
<hr>
<span>You are receiving this mail because:</span>
<ul>
<li>You are on the CC list for the bug.</li>
</ul>
</body>
</html>