[llvm-bugs] [Bug 42465] New: XRay unit tests don't link in Linux/i686 build

via llvm-bugs llvm-bugs at lists.llvm.org
Mon Jul 1 06:57:49 PDT 2019


https://bugs.llvm.org/show_bug.cgi?id=42465

            Bug ID: 42465
           Summary: XRay unit tests don't link in Linux/i686 build
           Product: compiler-rt
           Version: unspecified
          Hardware: PC
                OS: Linux
            Status: NEW
          Severity: enhancement
          Priority: P
         Component: xray
          Assignee: unassignedbugs at nondot.org
          Reporter: ro at gcc.gnu.org
                CC: llvm-bugs at lists.llvm.org

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.

-- 
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/20190701/59e6e58c/attachment.html>


More information about the llvm-bugs mailing list