<html>
<head>
<base href="http://llvm.org/bugs/" />
</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 --- - libLLVMTarget.so is not linked with -lLLVMCodeGet, unresolved llvm::MachineInstr::hasPropertyInBundle when linking llvm-dis"
href="http://llvm.org/bugs/show_bug.cgi?id=15655">15655</a>
</td>
</tr>
<tr>
<th>Summary</th>
<td>libLLVMTarget.so is not linked with -lLLVMCodeGet, unresolved llvm::MachineInstr::hasPropertyInBundle when linking llvm-dis
</td>
</tr>
<tr>
<th>Product</th>
<td>Build scripts
</td>
</tr>
<tr>
<th>Version</th>
<td>3.2
</td>
</tr>
<tr>
<th>Hardware</th>
<td>PC
</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>cmake
</td>
</tr>
<tr>
<th>Assignee</th>
<td>unassignedbugs@nondot.org
</td>
</tr>
<tr>
<th>Reporter</th>
<td>dilyan.palauzov@aegee.org
</td>
</tr>
<tr>
<th>CC</th>
<td>llvmbugs@cs.uiuc.edu
</td>
</tr>
<tr>
<th>Classification</th>
<td>Unclassified
</td>
</tr></table>
<p>
<div>
<pre>I compile llvm-3.2 with cmake. On 'make' I get the message
[ 61%] Built target opt
[ 61%] Built target llvm-as
Linking CXX executable ../../bin/llvm-dis
../../lib/libLLVMTarget.so: undefined reference to
`llvm::MachineInstr::hasPropertyInBundle(unsigned int,
llvm::MachineInstr::QueryType) const'
collect2: error: ld returned 1 exit status
make[2]: *** [bin/llvm-dis] Error 1
make[1]: *** [tools/llvm-dis/CMakeFiles/llvm-dis.dir/all] Error 2
make: *** [all] Error 2
Indeed, libLLVMCodeGen.so defines llvm::MachineInstr::hasPropertyInBundle:
nm -C lib/libLLVMCodeGen.so |grep hasPropertyInBundle
000000000027136c T llvm::MachineInstr::hasPropertyInBundle(unsigned int,
llvm::MachineInstr::QueryType) const
and libLLVMTarget.so has hasPropertyInBundle as undefined symbol:
nm -C lib/libLLVMTarget.so |grep hasPropertyInBundle
U llvm::MachineInstr::hasPropertyInBundle(unsigned int,
llvm::MachineInstr::QueryType) const
and libLLVMTarget.so does not depend on libLLVMCodeGen.so:
readelf -d lib/libLLVMTarget.so |grep NEEDED
0x0000000000000001 (NEEDED) Shared library: [libdl.so.2]
0x0000000000000001 (NEEDED) Shared library: [libpthread.so.0]
0x0000000000000001 (NEEDED) Shared library: [libLLVMCore.so]
0x0000000000000001 (NEEDED) Shared library: [libLLVMMC.so]
0x0000000000000001 (NEEDED) Shared library: [libLLVMSupport.so]
0x0000000000000001 (NEEDED) Shared library: [libLLVMObject.so]
0x0000000000000001 (NEEDED) Shared library: [libstdc++.so.6]
0x0000000000000001 (NEEDED) Shared library: [libm.so.6]
0x0000000000000001 (NEEDED) Shared library: [libgcc_s.so.1]
0x0000000000000001 (NEEDED) Shared library: [libc.so.6]
I noticed, that both libLLVMTarget.so and libLLVMCodeGen.so have a private
llvm::MachineInstr::hasProperty , but only libLLVMCodeGen has and exports
hasPropertyInBundle() .
So the error is one of:
-- libLLVMTarget.so is not linked with -lLLVMCodeGet, or
-- llvm-dis is not linked with -lLLVMCodeGet, in case llvm-dis does not use on
its own hasPropertyInBundle, but depends on libLLVMTarget
I can compile llvm-dis using Autoconf, but not with cmake.</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>