<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 - XRay unit tests don't link in Linux/i686 build"
href="https://bugs.llvm.org/show_bug.cgi?id=42465">42465</a>
</td>
</tr>
<tr>
<th>Summary</th>
<td>XRay unit tests don't link in Linux/i686 build
</td>
</tr>
<tr>
<th>Product</th>
<td>compiler-rt
</td>
</tr>
<tr>
<th>Version</th>
<td>unspecified
</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>enhancement
</td>
</tr>
<tr>
<th>Priority</th>
<td>P
</td>
</tr>
<tr>
<th>Component</th>
<td>xray
</td>
</tr>
<tr>
<th>Assignee</th>
<td>unassignedbugs@nondot.org
</td>
</tr>
<tr>
<th>Reporter</th>
<td>ro@gcc.gnu.org
</td>
</tr>
<tr>
<th>CC</th>
<td>llvm-bugs@lists.llvm.org
</td>
</tr></table>
<p>
<div>
<pre>make check-all fails in a LLVM build for target i686-pc-linux-gnu on a
Linux/x86_64
system:
[2/8] cd
/var/gcc/llvm/dist-i686-release/projects/compiler-rt/lib/xray/tests/unit &&
/var/gcc/llvm/dist-i686-release/./bin/clang
TEST_OBJECTS.allocator_test.cc.x86_64.o
TEST_OBJECTS.buffer_queue_test.cc.x86_64.o
TEST_OBJECTS.function_call_trie_test.cc.x86_64.o
TEST_OBJECTS.profile_collector_test.cc.x86_64.o
TEST_OBJECTS.segmented_array_test.cc.x86_64.o
TEST_OBJECTS.test_helpers.cc.x86_64.o
TEST_OBJECTS.xray_unit_test_main.cc.x86_64.o
TEST_OBJECTS.fdr_controller_test.cc.x86_64.o
TEST_OBJECTS.fdr_log_writer_test.cc.x86_64.o TEST_OBJECTS.gtest-all.cc.x86_64.o
TEST_OBJECTS.gmock-all.cc.x86_64.o
/var/gcc/llvm/dist-i686-release/projects/compiler-rt/lib/xray/tests/libRTXRay.test.x86_64.a
-o
/var/gcc/llvm/dist-i686-release/projects/compiler-rt/lib/xray/tests/unit/./XRayTest-x86_64-Test
-Wl,-allow-shlib-undefined -lpthread -ltinfo
-L/var/gcc/llvm/dist-i686-release/./lib -lLLVMXRay -lLLVMSupport -lLLVMDemangle
-lLLVMTestingSupport -lm -lrt -ldl -pthread -lstdc++ -m64
FAILED: projects/compiler-rt/lib/xray/tests/unit/XRayTest-x86_64-Test
cd /var/gcc/llvm/dist-i686-release/projects/compiler-rt/lib/xray/tests/unit &&
/var/gcc/llvm/dist-i686-release/./bin/clang
TEST_OBJECTS.allocator_test.cc.x86_64.o
TEST_OBJECTS.buffer_queue_test.cc.x86_64.o
TEST_OBJECTS.function_call_trie_test.cc.x86_64.o
TEST_OBJECTS.profile_collector_test.cc.x86_64.o
TEST_OBJECTS.segmented_array_test.cc.x86_64.o
TEST_OBJECTS.test_helpers.cc.x86_64.o
TEST_OBJECTS.xray_unit_test_main.cc.x86_64.o
TEST_OBJECTS.fdr_controller_test.cc.x86_64.o
TEST_OBJECTS.fdr_log_writer_test.cc.x86_64.o TEST_OBJECTS.gtest-all.cc.x86_64.o
TEST_OBJECTS.gmock-all.cc.x86_64.o
/var/gcc/llvm/dist-i686-release/projects/compiler-rt/lib/xray/tests/libRTXRay.test.x86_64.a
-o
/var/gcc/llvm/dist-i686-release/projects/compiler-rt/lib/xray/tests/unit/./XRayTest-x86_64-Test
-Wl,-allow-shlib-undefined -lpthread -ltinfo
-L/var/gcc/llvm/dist-i686-release/./lib -lLLVMXRay -lLLVMSupport -lLLVMDemangle
-lLLVMTestingSupport -lm -lrt -ldl -pthread -lstdc++ -m64
/usr/bin/ld: skipping incompatible
/var/gcc/llvm/dist-i686-release/./lib/libLLVMXRay.a when searching for
-lLLVMXRay
/usr/bin/ld: skipping incompatible
/var/scratch/gcc/llvm/dist-i686-release/bin/../lib/libLLVMXRay.a when searching
for -lLLVMXRay
/usr/bin/ld: cannot find -lLLVMXRay
/usr/bin/ld: skipping incompatible
/var/gcc/llvm/dist-i686-release/./lib/libLLVMSupport.a when searching for
-lLLVMSupport
/usr/bin/ld: skipping incompatible
/var/scratch/gcc/llvm/dist-i686-release/bin/../lib/libLLVMSupport.a when
searching for -lLLVMSupport
/usr/bin/ld: cannot find -lLLVMSupport
/usr/bin/ld: skipping incompatible
/var/gcc/llvm/dist-i686-release/./lib/libLLVMDemangle.a when searching for
-lLLVMDemangle
/usr/bin/ld: skipping incompatible
/var/scratch/gcc/llvm/dist-i686-release/bin/../lib/libLLVMDemangle.a when
searching for -lLLVMDemangle
/usr/bin/ld: cannot find -lLLVMDemangle
/usr/bin/ld: skipping incompatible
/var/gcc/llvm/dist-i686-release/./lib/libLLVMTestingSupport.a when searching
for -lLLVMTestingSupport
/usr/bin/ld: skipping incompatible
/var/scratch/gcc/llvm/dist-i686-release/bin/../lib/libLLVMTestingSupport.a when
searching for -lLLVMTestingSupport
/usr/bin/ld: cannot find -lLLVMTestingSupport
clang-9: error: linker command failed with exit code 1 (use -v to see
invocation)
While the LLVM support libs above are all 32-bit only, xray only supports
x86_64, but doesn't detect the mismatch, thus the failing links.
I've hacked around this in lib/xray/tests/CMakeLists.txt (add_xray_unittest)
but am unclear about the proper condition to use.</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>