[compiler-rt] [rtsan] Explicitly link pthread in the tests and dynamic libraries (PR #98256)

LLVM Continuous Integration via llvm-commits llvm-commits at lists.llvm.org
Tue Jul 9 19:25:59 PDT 2024


llvm-ci wrote:

LLVM Buildbot has detected a new failure on builder `clang-ppc64be-linux-test-suite` running on `ppc64be-clang-test-suite` while building `compiler-rt` at step 6 "test-build-unified-tree-check-all".

Full details are available at: https://lab.llvm.org/buildbot/#/builders/176/builds/878

Here is the relevant piece of the build log for the reference:
```
Step 6 (test-build-unified-tree-check-all) failure: test (failure)
...
34.156 [8/8/76] Generating ASAN_INST_TEST_OBJECTS.asan_str_test.cpp.powerpc64-inline.o
35.185 [8/7/77] Generating ScudoUnitTestsObjects.combined_test.cpp.powerpc64.o
37.008 [7/7/78] Generating ScudoUnitTest-powerpc64-Test
41.188 [7/6/79] Generating ASAN_INST_TEST_OBJECTS.asan_test.cpp.powerpc64-inline.o
41.541 [7/5/80] Generating ASAN_NOINST_TEST_OBJECTS.gtest-all.cc.powerpc64-inline.o
42.089 [6/5/81] Generating POWERPC64LinuxConfig/Asan-powerpc64-inline-Noinst-Test
45.250 [6/4/82] Generating ASAN_NOINST_TEST_OBJECTS.gtest-all.cc.powerpc64-calls.o
45.721 [5/4/83] Generating POWERPC64LinuxConfig/Asan-powerpc64-calls-Noinst-Test
45.819 [5/3/84] Generating RtsanNoInstTestObjects.gtest-all.cc.powerpc64.o
45.892 [4/3/85] Generating Rtsan-powerpc64-NoInstTest
FAILED: compiler-rt/lib/rtsan/tests/Rtsan-powerpc64-NoInstTest /home/buildbots/llvm-external-buildbots/workers/ppc64be-clang-test-suite/clang-ppc64be-test-suite/build/runtimes/runtimes-bins/compiler-rt/lib/rtsan/tests/Rtsan-powerpc64-NoInstTest 
cd /home/buildbots/llvm-external-buildbots/workers/ppc64be-clang-test-suite/clang-ppc64be-test-suite/build/runtimes/runtimes-bins/compiler-rt/lib/rtsan/tests && /home/buildbots/llvm-external-buildbots/workers/ppc64be-clang-test-suite/clang-ppc64be-test-suite/build/./bin/clang++ RtsanNoInstTestObjects.rtsan_preinit.cpp.powerpc64.o RtsanNoInstTestObjects.rtsan_test_context.cpp.powerpc64.o RtsanNoInstTestObjects.rtsan_test_main.cpp.powerpc64.o RtsanNoInstTestObjects.gtest-all.cc.powerpc64.o RtsanNoInstTestObjects.gmock-all.cc.powerpc64.o /home/buildbots/llvm-external-buildbots/workers/ppc64be-clang-test-suite/clang-ppc64be-test-suite/build/runtimes/runtimes-bins/compiler-rt/lib/rtsan/tests/libRTRtsanTest.powerpc64.a -o /home/buildbots/llvm-external-buildbots/workers/ppc64be-clang-test-suite/clang-ppc64be-test-suite/build/runtimes/runtimes-bins/compiler-rt/lib/rtsan/tests/./Rtsan-powerpc64-NoInstTest -Wthread-safety -Wthread-safety-reference -Wthread-safety-beta -resource-dir=/home/buildbots/llvm-external-buildbots/workers/ppc64be-clang-test-suite/clang-ppc64be-test-suite/build/./lib/../lib/clang/19 -Wl,-rpath,/home/buildbots/llvm-external-buildbots/workers/ppc64be-clang-test-suite/clang-ppc64be-test-suite/build/./lib/../lib/clang/19/lib/powerpc64-unknown-linux-gnu -lstdc++ -no-pie -pthread -latomic -m64
/opt/rh/devtoolset-11/root/usr/lib/gcc/ppc64-redhat-linux/11/../../../../bin/ld: cannot find /usr/lib64/libatomic.so.1
clang++: error: linker command failed with exit code 1 (use -v to see invocation)
50.270 [4/2/86] Generating ASAN_INST_TEST_OBJECTS.gtest-all.cc.powerpc64-calls.o
55.560 [4/1/87] Generating ASAN_INST_TEST_OBJECTS.gtest-all.cc.powerpc64-inline.o
ninja: build stopped: subcommand failed.
33.366 [382/40/741] Building CXX object unittests/Frontend/CMakeFiles/LLVMFrontendTests.dir/OpenMPDecompositionTest.cpp.o
In file included from /home/buildbots/llvm-external-buildbots/workers/ppc64be-clang-test-suite/clang-ppc64be-test-suite/llvm-project/llvm/include/llvm/ADT/ArrayRef.h:13,
                 from /home/buildbots/llvm-external-buildbots/workers/ppc64be-clang-test-suite/clang-ppc64be-test-suite/llvm-project/llvm/unittests/Frontend/OpenMPDecompositionTest.cpp:9:
/home/buildbots/llvm-external-buildbots/workers/ppc64be-clang-test-suite/clang-ppc64be-test-suite/llvm-project/llvm/include/llvm/ADT/SmallVector.h: In function ‘llvm::SmallVectorImpl<T>& llvm::SmallVectorImpl<T>::operator=(llvm::SmallVectorImpl<T>&&) [with T = llvm::omp::Directive]’:
/home/buildbots/llvm-external-buildbots/workers/ppc64be-clang-test-suite/clang-ppc64be-test-suite/llvm-project/llvm/include/llvm/ADT/SmallVector.h:608:22: note: the layout of aggregates containing vectors with 8-byte alignment has changed in GCC 5
  608 |     this->Size = RHS.Size;
      |                  ~~~~^~~~
34.344 [375/40/748] Building CXX object unittests/InterfaceStub/CMakeFiles/InterfaceStubTests.dir/ELFYAMLTest.cpp.o
In file included from /opt/rh/devtoolset-11/root/usr/include/c++/11/vector:72,
                 from /opt/rh/devtoolset-11/root/usr/include/c++/11/functional:62,
                 from /opt/rh/devtoolset-11/root/usr/include/c++/11/pstl/glue_algorithm_defs.h:13,
                 from /opt/rh/devtoolset-11/root/usr/include/c++/11/algorithm:74,
                 from /home/buildbots/llvm-external-buildbots/workers/ppc64be-clang-test-suite/clang-ppc64be-test-suite/llvm-project/llvm/include/llvm/ADT/StringRef.h:16,
                 from /home/buildbots/llvm-external-buildbots/workers/ppc64be-clang-test-suite/clang-ppc64be-test-suite/llvm-project/llvm/unittests/InterfaceStub/ELFYAMLTest.cpp:9:
/opt/rh/devtoolset-11/root/usr/include/c++/11/bits/vector.tcc: In member function ‘void std::vector<_Tp, _Alloc>::_M_realloc_insert(std::vector<_Tp, _Alloc>::iterator, _Args&& ...) [with _Args = {const llvm::ifs::IFSSymbol&}; _Tp = llvm::ifs::IFSSymbol; _Alloc = std::allocator<llvm::ifs::IFSSymbol>]’:
/opt/rh/devtoolset-11/root/usr/include/c++/11/bits/vector.tcc:426:7: note: the layout of aggregates containing vectors with 2-byte alignment has changed in GCC 5
  426 |       vector<_Tp, _Alloc>::
      |       ^~~~~~~~~~~~~~~~~~~
35.012 [361/40/762] Building CXX object unittests/IR/CMakeFiles/IRTests.dir/DebugInfoTest.cpp.o
In file included from /home/buildbots/llvm-external-buildbots/workers/ppc64be-clang-test-suite/clang-ppc64be-test-suite/llvm-project/llvm/unittests/IR/DebugInfoTest.cpp:10:
/home/buildbots/llvm-external-buildbots/workers/ppc64be-clang-test-suite/clang-ppc64be-test-suite/llvm-project/llvm/include/../lib/IR/LLVMContextImpl.h: In constructor ‘llvm::MDNodeKeyImpl<llvm::DISubprogram>::MDNodeKeyImpl(const llvm::DISubprogram*)’:
/home/buildbots/llvm-external-buildbots/workers/ppc64be-clang-test-suite/clang-ppc64be-test-suite/llvm-project/llvm/include/../lib/IR/LLVMContextImpl.h:793:3: note: the layout of aggregates containing vectors with 8-byte alignment has changed in GCC 5
  793 |   MDNodeKeyImpl(const DISubprogram *N)
      |   ^~~~~~~~~~~~~
35.124 [357/40/766] Building CXX object unittests/IR/CMakeFiles/IRTests.dir/DominatorTreeBatchUpdatesTest.cpp.o
In file included from /home/buildbots/llvm-external-buildbots/workers/ppc64be-clang-test-suite/clang-ppc64be-test-suite/llvm-project/llvm/include/llvm/ADT/ArrayRef.h:13,
                 from /home/buildbots/llvm-external-buildbots/workers/ppc64be-clang-test-suite/clang-ppc64be-test-suite/llvm-project/llvm/include/llvm/IR/Dominators.h:18,
                 from /home/buildbots/llvm-external-buildbots/workers/ppc64be-clang-test-suite/clang-ppc64be-test-suite/llvm-project/llvm/include/llvm/Analysis/PostDominators.h:17,
                 from /home/buildbots/llvm-external-buildbots/workers/ppc64be-clang-test-suite/clang-ppc64be-test-suite/llvm-project/llvm/unittests/IR/DominatorTreeBatchUpdatesTest.cpp:10:
/home/buildbots/llvm-external-buildbots/workers/ppc64be-clang-test-suite/clang-ppc64be-test-suite/llvm-project/llvm/include/llvm/ADT/SmallVector.h: In function ‘llvm::SmallVectorImpl<T>& llvm::SmallVectorImpl<T>::operator=(llvm::SmallVectorImpl<T>&&) [with T = llvm::BasicBlock*]’:
/home/buildbots/llvm-external-buildbots/workers/ppc64be-clang-test-suite/clang-ppc64be-test-suite/llvm-project/llvm/include/llvm/ADT/SmallVector.h:608:22: note: the layout of aggregates containing vectors with 8-byte alignment has changed in GCC 5
  608 |     this->Size = RHS.Size;
Step 7 (test-build-unified-tree-check-runtimes) failure: test (failure)
...
-- Generated Sanitizer SUPPORTED_TOOLS list on "Linux" is "asan;lsan;msan;tsan;ubsan"
-- sanitizer_common tests on "Linux" will run against "asan;lsan;msan;tsan;ubsan"
-- check-shadowcallstack does nothing.
-- Configuring done (2.7s)
-- Generating done (0.8s)
-- Build files have been written to: /home/buildbots/llvm-external-buildbots/workers/ppc64be-clang-test-suite/clang-ppc64be-test-suite/build/runtimes/runtimes-bins
11.457 [0/1/4] cd /home/buildbots/llvm-external-buildbots/workers/ppc64be-clang-test-suite/clang-ppc64be-test-suite/build/runtimes/runtimes-bins && /home/buildbots/llvm-external-buildbots/cmake-3.26.3/bin/cmake --build /home/buildbots/llvm-external-buildbots/workers/ppc64be-clang-test-suite/clang-ppc64be-test-suite/build/runtimes/runtimes-bins/ --target check-runtimes --config Release
0.157 [7/3/1] Building CXX object compiler-rt/lib/asan/CMakeFiles/RTAsan_dynamic_version_script_dummy.powerpc64.dir/dummy.cpp.o
0.158 [6/3/2] Building CXX object compiler-rt/lib/ubsan/CMakeFiles/RTUbsan_dynamic_version_script_dummy.powerpc64.dir/dummy.cpp.o
0.230 [5/3/3] Generating Rtsan-powerpc64-NoInstTest
FAILED: compiler-rt/lib/rtsan/tests/Rtsan-powerpc64-NoInstTest /home/buildbots/llvm-external-buildbots/workers/ppc64be-clang-test-suite/clang-ppc64be-test-suite/build/runtimes/runtimes-bins/compiler-rt/lib/rtsan/tests/Rtsan-powerpc64-NoInstTest 
cd /home/buildbots/llvm-external-buildbots/workers/ppc64be-clang-test-suite/clang-ppc64be-test-suite/build/runtimes/runtimes-bins/compiler-rt/lib/rtsan/tests && /home/buildbots/llvm-external-buildbots/workers/ppc64be-clang-test-suite/clang-ppc64be-test-suite/build/./bin/clang++ RtsanNoInstTestObjects.rtsan_preinit.cpp.powerpc64.o RtsanNoInstTestObjects.rtsan_test_context.cpp.powerpc64.o RtsanNoInstTestObjects.rtsan_test_main.cpp.powerpc64.o RtsanNoInstTestObjects.gtest-all.cc.powerpc64.o RtsanNoInstTestObjects.gmock-all.cc.powerpc64.o /home/buildbots/llvm-external-buildbots/workers/ppc64be-clang-test-suite/clang-ppc64be-test-suite/build/runtimes/runtimes-bins/compiler-rt/lib/rtsan/tests/libRTRtsanTest.powerpc64.a -o /home/buildbots/llvm-external-buildbots/workers/ppc64be-clang-test-suite/clang-ppc64be-test-suite/build/runtimes/runtimes-bins/compiler-rt/lib/rtsan/tests/./Rtsan-powerpc64-NoInstTest -Wthread-safety -Wthread-safety-reference -Wthread-safety-beta -resource-dir=/home/buildbots/llvm-external-buildbots/workers/ppc64be-clang-test-suite/clang-ppc64be-test-suite/build/./lib/../lib/clang/19 -Wl,-rpath,/home/buildbots/llvm-external-buildbots/workers/ppc64be-clang-test-suite/clang-ppc64be-test-suite/build/./lib/../lib/clang/19/lib/powerpc64-unknown-linux-gnu -lstdc++ -no-pie -pthread -latomic -m64
/opt/rh/devtoolset-11/root/usr/lib/gcc/ppc64-redhat-linux/11/../../../../bin/ld: cannot find /usr/lib64/libatomic.so.1
clang++: error: linker command failed with exit code 1 (use -v to see invocation)
0.464 [5/2/4] Linking CXX shared library /home/buildbots/llvm-external-buildbots/workers/ppc64be-clang-test-suite/clang-ppc64be-test-suite/build/lib/clang/19/lib/powerpc64-unknown-linux-gnu/libclang_rt.ubsan_standalone.so
0.775 [5/1/5] Linking CXX shared library /home/buildbots/llvm-external-buildbots/workers/ppc64be-clang-test-suite/clang-ppc64be-test-suite/build/lib/clang/19/lib/powerpc64-unknown-linux-gnu/libclang_rt.asan.so
ninja: build stopped: subcommand failed.
FAILED: runtimes/CMakeFiles/check-runtimes /home/buildbots/llvm-external-buildbots/workers/ppc64be-clang-test-suite/clang-ppc64be-test-suite/build/runtimes/CMakeFiles/check-runtimes 
cd /home/buildbots/llvm-external-buildbots/workers/ppc64be-clang-test-suite/clang-ppc64be-test-suite/build/runtimes/runtimes-bins && /home/buildbots/llvm-external-buildbots/cmake-3.26.3/bin/cmake --build /home/buildbots/llvm-external-buildbots/workers/ppc64be-clang-test-suite/clang-ppc64be-test-suite/build/runtimes/runtimes-bins/ --target check-runtimes --config Release
ninja: build stopped: subcommand failed.

```

https://github.com/llvm/llvm-project/pull/98256


More information about the llvm-commits mailing list