<html>
<head>
<base href="https://bugs.freedesktop.org/" />
</head>
<body><table border="1" cellspacing="0" cellpadding="8">
<tr>
<th>Priority</th>
<td>medium
</td>
</tr>
<tr>
<th>Bug ID</th>
<td><a class="bz_bug_link
bz_status_NEW "
title="NEW --- - oprofilejit should be included in the list of LLVM components required"
href="https://bugs.freedesktop.org/show_bug.cgi?id=61366">61366</a>
</td>
</tr>
<tr>
<th>Assignee</th>
<td>mesa-dev@lists.freedesktop.org
</td>
</tr>
<tr>
<th>Summary</th>
<td>oprofilejit should be included in the list of LLVM components required
</td>
</tr>
<tr>
<th>Severity</th>
<td>minor
</td>
</tr>
<tr>
<th>Classification</th>
<td>Unclassified
</td>
</tr>
<tr>
<th>OS</th>
<td>Linux (All)
</td>
</tr>
<tr>
<th>Reporter</th>
<td>ats-fd@offog.org
</td>
</tr>
<tr>
<th>Hardware</th>
<td>x86-64 (AMD64)
</td>
</tr>
<tr>
<th>Status</th>
<td>NEW
</td>
</tr>
<tr>
<th>Version</th>
<td>9.0
</td>
</tr>
<tr>
<th>Component</th>
<td>Other
</td>
</tr>
<tr>
<th>Product</th>
<td>Mesa
</td>
</tr></table>
<p>
<div>
<pre>Created <span class=""><a href="attachment.cgi?id=75423" name="attach_75423" title="My patch">attachment 75423</a> <a href="attachment.cgi?id=75423&action=edit" title="My patch">[details]</a></span> <a href='page.cgi?id=splinter.html&bug=61366&attachment=75423'>[review]</a>
My patch
I'm using Mesa 9.0.3 on Linux, built with automake.
llvmpipe uses llvm::JITEventListener::createOProfileJITEventListener if LLVM
was compiled with OProfile support, so it needs to link with
libLLVMOProfileJIT -- i.e. include oprofilejit in the list of LLVM components
required in configure.ac, if it exists.
There's already a similar test for mcjit; duplicating this for oprofilejit
works for me. Patch to this effect attached, but you may prefer a different
fix.
Without this, I get the following link error:
gmake[5]: Entering directory
`/src/x11/mesa/work/Mesa-9.0.3/src/gallium/drivers/llvmpipe'
g++ -Wl,-O2 -Wl,--as-needed -Wl,-O2 -Wl,--as-needed
-L/gar/packages/llvm-3.2/lib -lbfd -lpthread -ldl -lm -lopagent
-L/gar/lib/oprofile -Wl,-rpath,/gar/lib/oprofile lp_test_format.o
lp_test_main.o -o lp_test_format -Wl,--start-group -L../../auxiliary/
-lgallium libllvmpipe.a -lLLVMMCJIT -lLLVMBitWriter -lLLVMX86Disassembler
-lLLVMX86CodeGen -lLLVMSelectionDAG -lLLVMAsmPrinter -lLLVMX86AsmParser
-lLLVMMCParser -lLLVMX86Desc -lLLVMX86Info -lLLVMX86AsmPrinter -lLLVMX86Utils
-lLLVMJIT -lLLVMRuntimeDyld -lLLVMExecutionEngine -lLLVMCodeGen
-lLLVMScalarOpts -lLLVMInstCombine -lLLVMTransformUtils -lLLVMipa
-lLLVMAnalysis -lLLVMTarget -lLLVMMC -lLLVMObject -lLLVMCore -lLLVMSupport
-L/gar/lib -lXext -lXdamage -lXfixes -lX11-xcb -lX11 -lxcb-glx -lxcb -lXxf86vm
-L/gar/lib -ldrm -lm -lpthread -ldl -Wl,--end-group
../../auxiliary//libgallium.a(lp_bld_misc.o): In function
`lp_register_oprofile_jit_event_listener':
lp_bld_misc.cpp:(.text+0x1c): undefined reference to
`llvm::JITEventListener::createOProfileJITEventListener()'
collect2: error: ld returned 1 exit status
gmake[5]: *** [lp_test_format] Error 1
gmake[5]: Leaving directory
`/src/x11/mesa/work/Mesa-9.0.3/src/gallium/drivers/llvmpipe'
I guess this error doesn't show up for people who've got LLVM built as one
large library, which isn't the default configuration.</pre>
</div>
</p>
<hr>
<span>You are receiving this mail because:</span>
<ul>
<li>You are the assignee for the bug.</li>
</ul>
</body>
</html>