Adam Jensen via llvm-dev
2017-Jun-04 00:12 UTC
[llvm-dev] building llvm_Rel400 on Scientific Linux (RHEL) 7.3 x86_64
On Sat, 3 Jun 2017 16:04:57 -0700 Tim Northover <t.p.northover at gmail.com> wrote: [snip]> I think you should be able to fix it by changing the > compiler-rt/lib/xray/test/CMakeLists.txt. If you find the > "add_compiler_rt_test" call and move "-lstdc++" to the end, just after > "-lrt" it should work.Thanks, Tim. I don't see "-lrt": $BASE/llvm_Rel400/projects/compiler-rt/lib/xray/tests/CMakeLists.txt 43 if(NOT APPLE) 44 add_compiler_rt_test(XRayUnitTests ${testname} 45 OBJECTS ${TEST_OBJECTS} 46 DEPS ${TEST_DEPS} 47 LINK_FLAGS ${TARGET_LINK_FLAGS} 48 -lstdc++ -lm ${CMAKE_THREAD_LIBS_INIT} 49 -lpthread 50 -L${COMPILER_RT_LIBRARY_OUTPUT_DIR} -lclang_rt.xray-fdr-${arch}) 51 endif()
Tim Northover via llvm-dev
2017-Jun-04 00:14 UTC
[llvm-dev] building llvm_Rel400 on Scientific Linux (RHEL) 7.3 x86_64
On 3 June 2017 at 17:12, Adam Jensen <hanzer at riseup.net> wrote:> Thanks, Tim. I don't see "-lrt":Ah sorry, I was looking at trunk and the code must have changed a bit. Just put it after the "-lclang_rt.xray-fdr-${arch}". At the end of that call. Tim.
Adam Jensen via llvm-dev
2017-Jun-04 03:03 UTC
[llvm-dev] building llvm_Rel400 on Scientific Linux (RHEL) 7.3 x86_64
On Sat, 3 Jun 2017 17:14:09 -0700 Tim Northover <t.p.northover at gmail.com> wrote:> On 3 June 2017 at 17:12, Adam Jensen <hanzer at riseup.net> wrote: > > Thanks, Tim. I don't see "-lrt": > > Ah sorry, I was looking at trunk and the code must have changed a bit. > Just put it after the "-lclang_rt.xray-fdr-${arch}". At the end of > that call.Same result. With this change: $BASE/llvm_Rel400/projects/compiler-rt/lib/xray/tests/CMakeLists.txt 43 if(NOT APPLE) 44 add_compiler_rt_test(XRayUnitTests ${testname} 45 OBJECTS ${TEST_OBJECTS} 46 DEPS ${TEST_DEPS} 47 LINK_FLAGS ${TARGET_LINK_FLAGS} 48 -lm ${CMAKE_THREAD_LIBS_INIT} 49 -lpthread 50 -L${COMPILER_RT_LIBRARY_OUTPUT_DIR} -lclang_rt.xray-fdr-${arch} -lstdc++) 51 endif() check-all fails with: [115/475] Generating gtest-all.cc.x86_64.o [116/475] cd /home/hanzer/build/build_llvm/projects/compiler-rt/lib/xray/tests/unit && /home/hanzer/build/build_llvm/./bin/clang buffer_queue_test.cc.x86_64.o xray_unit_test_main.cc.x86_64.o gtest-all.cc.x86_64.o -o /home/hanzer/build/build_llvm/projects/compiler-rt/lib/xray/tests/unit/XRayBufferQueueTest -Wl,-allow-shlib-undefined -m64 -lm -lpthread -lpthread -L/home/hanzer/build/build_llvm/./lib/clang/4.0.0/lib/linux -lclang_rt.xray-fdr-x86_64 -lstdc++ FAILED: projects/compiler-rt/lib/xray/tests/unit/CMakeFiles/XRayBufferQueueTest cd /home/hanzer/build/build_llvm/projects/compiler-rt/lib/xray/tests/unit && /home/hanzer/build/build_llvm/./bin/clang buffer_queue_test.cc.x86_64.o xray_unit_test_main.cc.x86_64.o gtest-all.cc.x86_64.o -o /home/hanzer/build/build_llvm/projects/compiler-rt/lib/xray/tests/unit/XRayBufferQueueTest -Wl,-allow-shlib-undefined -m64 -lm -lpthread -lpthread -L/home/hanzer/build/build_llvm/./lib/clang/4.0.0/lib/linux -lclang_rt.xray-fdr-x86_64 -lstdc++ /home/hanzer/build/build_llvm/./lib/clang/4.0.0/lib/linux/libclang_rt.xray-fdr-x86_64.a(xray_buffer_queue.cc.o): In function `std::make_error_code(std::errc)': /opt/rh/devtoolset-6/root/usr/include/c++/6.2.1/system_error:197: undefined reference to `std::_V2::generic_category()' /home/hanzer/build/build_llvm/./lib/clang/4.0.0/lib/linux/libclang_rt.xray-fdr-x86_64.a(xray_buffer_queue.cc.o): In function `std::error_code::error_code()': /opt/rh/devtoolset-6/root/usr/include/c++/6.2.1/system_error:141: undefined reference to `std::_V2::system_category()' /home/hanzer/build/build_llvm/./lib/clang/4.0.0/lib/linux/libclang_rt.xray-fdr-x86_64.a(xray_buffer_queue.cc.o): In function `std::make_error_code(std::errc)': /opt/rh/devtoolset-6/root/usr/include/c++/6.2.1/system_error:197: undefined reference to `std::_V2::generic_category()' /home/hanzer/build/build_llvm/./lib/clang/4.0.0/lib/linux/libclang_rt.xray-fdr-x86_64.a(xray_buffer_queue.cc.o): In function `std::error_code::error_code()': /opt/rh/devtoolset-6/root/usr/include/c++/6.2.1/system_error:141: undefined reference to `std::_V2::system_category()' /home/hanzer/build/build_llvm/./lib/clang/4.0.0/lib/linux/libclang_rt.xray-fdr-x86_64.a(xray_buffer_queue.cc.o): In function `std::make_error_code(std::errc)': /opt/rh/devtoolset-6/root/usr/include/c++/6.2.1/system_error:197: undefined reference to `std::_V2::generic_category()' /opt/rh/devtoolset-6/root/usr/include/c++/6.2.1/system_error:197: undefined reference to `std::_V2::generic_category()' /home/hanzer/build/build_llvm/./lib/clang/4.0.0/lib/linux/libclang_rt.xray-fdr-x86_64.a(xray_buffer_queue.cc.o): In function `std::error_code::error_code()': /opt/rh/devtoolset-6/root/usr/include/c++/6.2.1/system_error:141: undefined reference to `std::_V2::system_category()' clang-4.0: error: linker command failed with exit code 1 (use -v to see invocation) [117/475] Building CXX object tools/clang/unittests/Format/CMakeFiles/FormatTests.dir/FormatTestObjC.cpp.o [118/475] Building CXX object tools/lld/unittests/MachOTests/CMakeFiles/lldMachOTests.dir/MachONormalizedFileBinaryReaderTests.cpp.o [119/475] Building CXX object unittests/DebugInfo/PDB/CMakeFiles/DebugInfoPDBTests.dir/MSFBuilderTest.cpp.o [120/475] Performing build step for 'libcxx_msan_x86_64' -- libcxx_msan_x86_64 build command succeeded. See also /home/hanzer/build/build_llvm/projects/compiler-rt/lib/msan/tests/../libcxx_msan_x86_64/src/libcxx_msan_x86_64-stamp/libcxx_msan_x86_64-build-*.log [121/475] Building CXX object tools/clang/unittests/Format/CMakeFiles/FormatTests.dir/FormatTest.cpp.o ninja: build stopped: subcommand failed.