[llvm] [CMake] Fix DynamicLibraryTests exports symbol when plugins are enabled (PR #102941)

LLVM Continuous Integration via llvm-commits llvm-commits at lists.llvm.org
Tue Aug 13 14:13:37 PDT 2024


llvm-ci wrote:

LLVM Buildbot has detected a new failure on builder `sanitizer-aarch64-linux-bootstrap-ubsan` running on `sanitizer-buildbot9` while building `llvm` at step 2 "annotate".

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

Here is the relevant piece of the build log for the reference:
```
Step 2 (annotate) failure: 'python ../sanitizer_buildbot/sanitizers/zorg/buildbot/builders/sanitizers/buildbot_selector.py' (failure)
...
[957/1132] Building CXX object unittests/Support/CMakeFiles/SupportTests.dir/raw_fd_stream_test.cpp.o
[958/1132] Building CXX object unittests/Support/CMakeFiles/SupportTests.dir/xxhashTest.cpp.o
[959/1132] Building CXX object unittests/Support/CMakeFiles/SupportTests.dir/raw_pwrite_stream_test.cpp.o
[960/1132] Building CXX object unittests/Target/CMakeFiles/TargetMachineCTests.dir/TargetMachineOptionsTest.cpp.o
[961/1132] Building CXX object unittests/Support/CommandLineInit/CMakeFiles/CommandLineInitTests.dir/CommandLineInitTest.cpp.o
[962/1132] Building CXX object unittests/ProfileData/CMakeFiles/ProfileDataTests.dir/MemProfTest.cpp.o
[963/1132] Linking CXX executable unittests/Support/CommandLineInit/CommandLineInitTests
[964/1132] Building CXX object unittests/Support/CMakeFiles/SupportTests.dir/YAMLParserTest.cpp.o
[965/1132] Building CXX object unittests/Support/DynamicLibrary/CMakeFiles/DynamicLibraryTests.dir/DynamicLibraryTest.cpp.o
[966/1132] Linking CXX executable unittests/Support/DynamicLibrary/DynamicLibraryTests
FAILED: unittests/Support/DynamicLibrary/DynamicLibraryTests 
: && /home/b/sanitizer-aarch64-linux-bootstrap-ubsan/build/llvm_build0/bin/clang++ -nostdinc++ -isystem /home/b/sanitizer-aarch64-linux-bootstrap-ubsan/build/libcxx_build_ubsan/include -isystem /home/b/sanitizer-aarch64-linux-bootstrap-ubsan/build/libcxx_build_ubsan/include/c++/v1 -fsanitize=undefined -Wl,--rpath=/home/b/sanitizer-aarch64-linux-bootstrap-ubsan/build/libcxx_build_ubsan/lib -L/home/b/sanitizer-aarch64-linux-bootstrap-ubsan/build/libcxx_build_ubsan/lib -w -stdlib=libc++ -fPIC -fno-semantic-interposition -fvisibility-inlines-hidden -Werror=date-time -Werror=unguarded-availability-new -Wall -Wextra -Wno-unused-parameter -Wwrite-strings -Wcast-qual -Wmissing-field-initializers -pedantic -Wno-long-long -Wc++98-compat-extra-semi -Wimplicit-fallthrough -Wcovered-switch-default -Wno-noexcept-type -Wnon-virtual-dtor -Wdelete-non-virtual-dtor -Wsuggest-override -Wstring-conversion -Wmisleading-indentation -Wctad-maybe-unsupported -fno-omit-frame-pointer -gline-tables-only -fsanitize=undefined -fno-sanitize=vptr,function -fno-sanitize-recover=all -fsanitize-blacklist=/home/b/sanitizer-aarch64-linux-bootstrap-ubsan/build/llvm-project/llvm/utils/sanitizers/ubsan_ignorelist.txt -fdiagnostics-color -ffunction-sections -fdata-sections -O3 -DNDEBUG -Wl,--rpath=/home/b/sanitizer-aarch64-linux-bootstrap-ubsan/build/libcxx_build_ubsan/lib -L/home/b/sanitizer-aarch64-linux-bootstrap-ubsan/build/libcxx_build_ubsan/lib -stdlib=libc++ -fuse-ld=lld -Wl,--color-diagnostics   -Wl,--export-dynamic  -Wl,--gc-sections  -Wl,--version-script,"/home/b/sanitizer-aarch64-linux-bootstrap-ubsan/build/llvm_build_ubsan/unittests/Support/DynamicLibrary/DynamicLibraryTests.exports" unittests/Support/DynamicLibrary/CMakeFiles/DynamicLibraryTests.dir/DynamicLibraryTest.cpp.o -o unittests/Support/DynamicLibrary/DynamicLibraryTests  lib/libLLVMSupport.a  lib/libLLVMSupport.a  lib/libllvm_gtest_main.a  lib/libllvm_gtest.a  lib/libDynamicLibraryLib.a  lib/libLLVMSupport.a  -lrt  -ldl  -lm  /usr/lib/aarch64-linux-gnu/libz.so  /usr/lib/aarch64-linux-gnu/libzstd.so  lib/libLLVMDemangle.a  -lpthread && :
ld.lld: error: undefined reference: __ubsan_handle_type_mismatch_v1
>>> referenced by /home/b/sanitizer-aarch64-linux-bootstrap-ubsan/build/libcxx_build_ubsan/lib/libc++abi.so (disallowed by --no-allow-shlib-undefined)

ld.lld: error: non-exported symbol '__ubsan_handle_builtin_unreachable' in '/home/b/sanitizer-aarch64-linux-bootstrap-ubsan/build/llvm_build0/lib/clang/20/lib/aarch64-unknown-linux-gnu/libclang_rt.ubsan_standalone.a(ubsan_handlers.cpp.o)' is referenced by DSO '/home/b/sanitizer-aarch64-linux-bootstrap-ubsan/build/libcxx_build_ubsan/lib/libc++abi.so'
ld.lld: error: undefined reference: __ubsan_handle_pointer_overflow
>>> referenced by /home/b/sanitizer-aarch64-linux-bootstrap-ubsan/build/libcxx_build_ubsan/lib/libc++abi.so (disallowed by --no-allow-shlib-undefined)

ld.lld: error: undefined reference: __ubsan_handle_function_type_mismatch
>>> referenced by /home/b/sanitizer-aarch64-linux-bootstrap-ubsan/build/libcxx_build_ubsan/lib/libc++abi.so (disallowed by --no-allow-shlib-undefined)

ld.lld: error: undefined reference: __ubsan_handle_nonnull_arg
>>> referenced by /home/b/sanitizer-aarch64-linux-bootstrap-ubsan/build/libcxx_build_ubsan/lib/libc++abi.so (disallowed by --no-allow-shlib-undefined)

ld.lld: error: undefined reference: __ubsan_handle_load_invalid_value
>>> referenced by /home/b/sanitizer-aarch64-linux-bootstrap-ubsan/build/libcxx_build_ubsan/lib/libc++abi.so (disallowed by --no-allow-shlib-undefined)

ld.lld: error: undefined reference: __ubsan_handle_out_of_bounds
>>> referenced by /home/b/sanitizer-aarch64-linux-bootstrap-ubsan/build/libcxx_build_ubsan/lib/libc++abi.so (disallowed by --no-allow-shlib-undefined)

ld.lld: error: undefined reference: __ubsan_handle_add_overflow
>>> referenced by /home/b/sanitizer-aarch64-linux-bootstrap-ubsan/build/libcxx_build_ubsan/lib/libc++abi.so (disallowed by --no-allow-shlib-undefined)

ld.lld: error: undefined reference: __ubsan_handle_alignment_assumption
>>> referenced by /home/b/sanitizer-aarch64-linux-bootstrap-ubsan/build/libcxx_build_ubsan/lib/libc++abi.so (disallowed by --no-allow-shlib-undefined)

ld.lld: error: undefined reference: __ubsan_handle_negate_overflow
>>> referenced by /home/b/sanitizer-aarch64-linux-bootstrap-ubsan/build/libcxx_build_ubsan/lib/libc++abi.so (disallowed by --no-allow-shlib-undefined)

ld.lld: error: undefined reference: __ubsan_handle_sub_overflow
>>> referenced by /home/b/sanitizer-aarch64-linux-bootstrap-ubsan/build/libcxx_build_ubsan/lib/libc++abi.so (disallowed by --no-allow-shlib-undefined)

ld.lld: error: undefined reference: __ubsan_handle_shift_out_of_bounds
>>> referenced by /home/b/sanitizer-aarch64-linux-bootstrap-ubsan/build/libcxx_build_ubsan/lib/libc++abi.so (disallowed by --no-allow-shlib-undefined)
clang++: error: linker command failed with exit code 1 (use -v to see invocation)
[967/1132] Linking CXX executable unittests/Target/TargetMachineCTests
[968/1132] Building CXX object unittests/Support/CMakeFiles/SupportTests.dir/UnicodeTest.cpp.o
[969/1132] Building CXX object unittests/TableGen/CMakeFiles/TableGenTests.dir/ParserEntryPointTest.cpp.o
Step 10 (stage2/ubsan check) failure: stage2/ubsan check (failure)
...
[957/1132] Building CXX object unittests/Support/CMakeFiles/SupportTests.dir/raw_fd_stream_test.cpp.o
[958/1132] Building CXX object unittests/Support/CMakeFiles/SupportTests.dir/xxhashTest.cpp.o
[959/1132] Building CXX object unittests/Support/CMakeFiles/SupportTests.dir/raw_pwrite_stream_test.cpp.o
[960/1132] Building CXX object unittests/Target/CMakeFiles/TargetMachineCTests.dir/TargetMachineOptionsTest.cpp.o
[961/1132] Building CXX object unittests/Support/CommandLineInit/CMakeFiles/CommandLineInitTests.dir/CommandLineInitTest.cpp.o
[962/1132] Building CXX object unittests/ProfileData/CMakeFiles/ProfileDataTests.dir/MemProfTest.cpp.o
[963/1132] Linking CXX executable unittests/Support/CommandLineInit/CommandLineInitTests
[964/1132] Building CXX object unittests/Support/CMakeFiles/SupportTests.dir/YAMLParserTest.cpp.o
[965/1132] Building CXX object unittests/Support/DynamicLibrary/CMakeFiles/DynamicLibraryTests.dir/DynamicLibraryTest.cpp.o
[966/1132] Linking CXX executable unittests/Support/DynamicLibrary/DynamicLibraryTests
FAILED: unittests/Support/DynamicLibrary/DynamicLibraryTests 
: && /home/b/sanitizer-aarch64-linux-bootstrap-ubsan/build/llvm_build0/bin/clang++ -nostdinc++ -isystem /home/b/sanitizer-aarch64-linux-bootstrap-ubsan/build/libcxx_build_ubsan/include -isystem /home/b/sanitizer-aarch64-linux-bootstrap-ubsan/build/libcxx_build_ubsan/include/c++/v1 -fsanitize=undefined -Wl,--rpath=/home/b/sanitizer-aarch64-linux-bootstrap-ubsan/build/libcxx_build_ubsan/lib -L/home/b/sanitizer-aarch64-linux-bootstrap-ubsan/build/libcxx_build_ubsan/lib -w -stdlib=libc++ -fPIC -fno-semantic-interposition -fvisibility-inlines-hidden -Werror=date-time -Werror=unguarded-availability-new -Wall -Wextra -Wno-unused-parameter -Wwrite-strings -Wcast-qual -Wmissing-field-initializers -pedantic -Wno-long-long -Wc++98-compat-extra-semi -Wimplicit-fallthrough -Wcovered-switch-default -Wno-noexcept-type -Wnon-virtual-dtor -Wdelete-non-virtual-dtor -Wsuggest-override -Wstring-conversion -Wmisleading-indentation -Wctad-maybe-unsupported -fno-omit-frame-pointer -gline-tables-only -fsanitize=undefined -fno-sanitize=vptr,function -fno-sanitize-recover=all -fsanitize-blacklist=/home/b/sanitizer-aarch64-linux-bootstrap-ubsan/build/llvm-project/llvm/utils/sanitizers/ubsan_ignorelist.txt -fdiagnostics-color -ffunction-sections -fdata-sections -O3 -DNDEBUG -Wl,--rpath=/home/b/sanitizer-aarch64-linux-bootstrap-ubsan/build/libcxx_build_ubsan/lib -L/home/b/sanitizer-aarch64-linux-bootstrap-ubsan/build/libcxx_build_ubsan/lib -stdlib=libc++ -fuse-ld=lld -Wl,--color-diagnostics   -Wl,--export-dynamic  -Wl,--gc-sections  -Wl,--version-script,"/home/b/sanitizer-aarch64-linux-bootstrap-ubsan/build/llvm_build_ubsan/unittests/Support/DynamicLibrary/DynamicLibraryTests.exports" unittests/Support/DynamicLibrary/CMakeFiles/DynamicLibraryTests.dir/DynamicLibraryTest.cpp.o -o unittests/Support/DynamicLibrary/DynamicLibraryTests  lib/libLLVMSupport.a  lib/libLLVMSupport.a  lib/libllvm_gtest_main.a  lib/libllvm_gtest.a  lib/libDynamicLibraryLib.a  lib/libLLVMSupport.a  -lrt  -ldl  -lm  /usr/lib/aarch64-linux-gnu/libz.so  /usr/lib/aarch64-linux-gnu/libzstd.so  lib/libLLVMDemangle.a  -lpthread && :
ld.lld: error: undefined reference: __ubsan_handle_type_mismatch_v1
>>> referenced by /home/b/sanitizer-aarch64-linux-bootstrap-ubsan/build/libcxx_build_ubsan/lib/libc++abi.so (disallowed by --no-allow-shlib-undefined)

ld.lld: error: non-exported symbol '__ubsan_handle_builtin_unreachable' in '/home/b/sanitizer-aarch64-linux-bootstrap-ubsan/build/llvm_build0/lib/clang/20/lib/aarch64-unknown-linux-gnu/libclang_rt.ubsan_standalone.a(ubsan_handlers.cpp.o)' is referenced by DSO '/home/b/sanitizer-aarch64-linux-bootstrap-ubsan/build/libcxx_build_ubsan/lib/libc++abi.so'
ld.lld: error: undefined reference: __ubsan_handle_pointer_overflow
>>> referenced by /home/b/sanitizer-aarch64-linux-bootstrap-ubsan/build/libcxx_build_ubsan/lib/libc++abi.so (disallowed by --no-allow-shlib-undefined)

ld.lld: error: undefined reference: __ubsan_handle_function_type_mismatch
>>> referenced by /home/b/sanitizer-aarch64-linux-bootstrap-ubsan/build/libcxx_build_ubsan/lib/libc++abi.so (disallowed by --no-allow-shlib-undefined)

ld.lld: error: undefined reference: __ubsan_handle_nonnull_arg
>>> referenced by /home/b/sanitizer-aarch64-linux-bootstrap-ubsan/build/libcxx_build_ubsan/lib/libc++abi.so (disallowed by --no-allow-shlib-undefined)

ld.lld: error: undefined reference: __ubsan_handle_load_invalid_value
>>> referenced by /home/b/sanitizer-aarch64-linux-bootstrap-ubsan/build/libcxx_build_ubsan/lib/libc++abi.so (disallowed by --no-allow-shlib-undefined)

ld.lld: error: undefined reference: __ubsan_handle_out_of_bounds
>>> referenced by /home/b/sanitizer-aarch64-linux-bootstrap-ubsan/build/libcxx_build_ubsan/lib/libc++abi.so (disallowed by --no-allow-shlib-undefined)

ld.lld: error: undefined reference: __ubsan_handle_add_overflow
>>> referenced by /home/b/sanitizer-aarch64-linux-bootstrap-ubsan/build/libcxx_build_ubsan/lib/libc++abi.so (disallowed by --no-allow-shlib-undefined)

ld.lld: error: undefined reference: __ubsan_handle_alignment_assumption
>>> referenced by /home/b/sanitizer-aarch64-linux-bootstrap-ubsan/build/libcxx_build_ubsan/lib/libc++abi.so (disallowed by --no-allow-shlib-undefined)

ld.lld: error: undefined reference: __ubsan_handle_negate_overflow
>>> referenced by /home/b/sanitizer-aarch64-linux-bootstrap-ubsan/build/libcxx_build_ubsan/lib/libc++abi.so (disallowed by --no-allow-shlib-undefined)

ld.lld: error: undefined reference: __ubsan_handle_sub_overflow
>>> referenced by /home/b/sanitizer-aarch64-linux-bootstrap-ubsan/build/libcxx_build_ubsan/lib/libc++abi.so (disallowed by --no-allow-shlib-undefined)

ld.lld: error: undefined reference: __ubsan_handle_shift_out_of_bounds
>>> referenced by /home/b/sanitizer-aarch64-linux-bootstrap-ubsan/build/libcxx_build_ubsan/lib/libc++abi.so (disallowed by --no-allow-shlib-undefined)
clang++: error: linker command failed with exit code 1 (use -v to see invocation)
[967/1132] Linking CXX executable unittests/Target/TargetMachineCTests
[968/1132] Building CXX object unittests/Support/CMakeFiles/SupportTests.dir/UnicodeTest.cpp.o
[969/1132] Building CXX object unittests/TableGen/CMakeFiles/TableGenTests.dir/ParserEntryPointTest.cpp.o

```

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


More information about the llvm-commits mailing list