Skip to content

Can't build scudo_standalone on armv7 on Ubuntu Focal #56900

@rovka

Description

@rovka

Compiling armv7l-unknown-linux-gnueabihf/libclang_rt.scudo_standalone.so fails to link, with the following error:

ld.lld: error: undefined symbol: __aeabi_unwind_cpp_pr0
  referenced by common.cpp
               compiler-rt/lib/gwp_asan/CMakeFiles/RTGwpAsan.armhf.dir/common.cpp.o:(.ARM.exidx.text._ZN8gwp_asan13ErrorToStringERKNS_5ErrorE+0x0)
  referenced by common.cpp
               compiler-rt/lib/gwp_asan/CMakeFiles/RTGwpAsan.armhf.dir/common.cpp.o:(.ARM.exidx.text._ZNK8gwp_asan14AllocatorState21maximumAllocationSizeEv+0x0)
  referenced by common.cpp
               compiler-rt/lib/gwp_asan/CMakeFiles/RTGwpAsan.armhf.dir/common.cpp.o:(.ARM.exidx.text._ZNK8gwp_asan14AllocatorState10slotToAddrEj+0x0)
  referenced 34 more times

The full command line generated is (note the --unwindlib=none, which seems relevant):

/home/tcwg-buildslave/workspace/tcwg-llvm-release/tcwg-tk1_32-build/rc1/Phase1/Release/llvmCore-15.0.0-rc1.obj/./bin/clang++ --target=armv7l-unknown-linux-gnueabihf -fPIC -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 -Wimplicit-fallthrough -Wcovered-switch-default -Wno-noexcept-type -Wnon-virtual-dtor -Wdelete-non-virtual-dtor -Wsuggest-override -Wno-comment -Wstring-conversion -Wmisleading-indentation -fdiagnostics-color -ffunction-sections -fdata-sections -Wall -std=c++14 -Wno-unused-parameter -O3 -DNDEBUG  -Wl,-z,defs -Wl,-z,nodelete -fuse-ld=lld -Wl,--color-diagnostics   -Wl,-z,defs,-z,now,-z,relro -ffunction-sections -fdata-sections -Wl,--gc-sections -nostdlib++ --unwindlib=none -pthread -shared -Wl,-soname,libclang_rt.scudo_standalone.so -o /home/tcwg-buildslave/workspace/tcwg-llvm-release/tcwg-tk1_32-build/rc1/Phase1/Release/llvmCore-15.0.0-rc1.obj/lib/clang/15.0.0/lib/armv7l-unknown-linux-gnueabihf/libclang_rt.scudo_standalone.so compiler-rt/lib/gwp_asan/CMakeFiles/RTGwpAsan.armhf.dir/common.cpp.o compiler-rt/lib/gwp_asan/CMakeFiles/RTGwpAsan.armhf.dir/crash_handler.cpp.o compiler-rt/lib/gwp_asan/CMakeFiles/RTGwpAsan.armhf.dir/platform_specific/common_posix.cpp.o compiler-rt/lib/gwp_asan/CMakeFiles/RTGwpAsan.armhf.dir/platform_specific/guarded_pool_allocator_posix.cpp.o compiler-rt/lib/gwp_asan/CMakeFiles/RTGwpAsan.armhf.dir/platform_specific/mutex_posix.cpp.o compiler-rt/lib/gwp_asan/CMakeFiles/RTGwpAsan.armhf.dir/platform_specific/utilities_posix.cpp.o compiler-rt/lib/gwp_asan/CMakeFiles/RTGwpAsan.armhf.dir/guarded_pool_allocator.cpp.o compiler-rt/lib/gwp_asan/CMakeFiles/RTGwpAsan.armhf.dir/stack_trace_compressor.cpp.o compiler-rt/lib/gwp_asan/CMakeFiles/RTGwpAsanBacktraceLibc.armhf.dir/optional/backtrace_linux_libc.cpp.o compiler-rt/lib/gwp_asan/CMakeFiles/RTGwpAsanSegvHandler.armhf.dir/optional/segv_handler_posix.cpp.o compiler-rt/lib/gwp_asan/CMakeFiles/RTGwpAsanOptionsParser.armhf.dir/optional/options_parser.cpp.o compiler-rt/lib/scudo/standalone/CMakeFiles/clang_rt.scudo_standalone-dynamic-armhf.dir/checksum.cpp.o compiler-rt/lib/scudo/standalone/CMakeFiles/clang_rt.scudo_standalone-dynamic-armhf.dir/common.cpp.o compiler-rt/lib/scudo/standalone/CMakeFiles/clang_rt.scudo_standalone-dynamic-armhf.dir/crc32_hw.cpp.o compiler-rt/lib/scudo/standalone/CMakeFiles/clang_rt.scudo_standalone-dynamic-armhf.dir/flags_parser.cpp.o compiler-rt/lib/scudo/standalone/CMakeFiles/clang_rt.scudo_standalone-dynamic-armhf.dir/flags.cpp.o compiler-rt/lib/scudo/standalone/CMakeFiles/clang_rt.scudo_standalone-dynamic-armhf.dir/fuchsia.cpp.o compiler-rt/lib/scudo/standalone/CMakeFiles/clang_rt.scudo_standalone-dynamic-armhf.dir/linux.cpp.o compiler-rt/lib/scudo/standalone/CMakeFiles/clang_rt.scudo_standalone-dynamic-armhf.dir/release.cpp.o compiler-rt/lib/scudo/standalone/CMakeFiles/clang_rt.scudo_standalone-dynamic-armhf.dir/report.cpp.o compiler-rt/lib/scudo/standalone/CMakeFiles/clang_rt.scudo_standalone-dynamic-armhf.dir/string_utils.cpp.o compiler-rt/lib/scudo/standalone/CMakeFiles/clang_rt.scudo_standalone-dynamic-armhf.dir/wrappers_c.cpp.o compiler-rt/lib/scudo/standalone/CMakeFiles/clang_rt.scudo_standalone-dynamic-armhf.dir/wrappers_cpp.cpp.o  -Wl,-rpath,"\$ORIGIN/../lib:/home/tcwg-buildslave/workspace/tcwg-llvm-release/tcwg-tk1_32-build/rc1/Phase1/Release/llvmCore-15.0.0-rc1.obj/./lib"

The whole cmake invocation is:

/usr/bin/cmake -DCMAKE_C_COMPILER=/home/tcwg-buildslave/workspace/tcwg-llvm-release/tcwg-tk1_32-build/rc1/Phase1/Release/llvmCore-15.0.0-rc1.obj/./bin/clang -DCMAKE_CXX_COMPILER=/home/tcwg-buildslave/workspace/tcwg-llvm-release/tcwg-tk1_32-build/rc1/Phase1/Release/llvmCore-15.0.0-rc1.obj/./bin/clang++ -DCMAKE_ASM_COMPILER=/home/tcwg-buildslave/workspace/tcwg-llvm-release/tcwg-tk1_32-build/rc1/Phase1/Release/llvmCore-15.0.0-rc1.obj/./bin/clang -DCMAKE_LINKER=/home/tcwg-buildslave/workspace/tcwg-llvm-release/tcwg-tk1_32-build/rc1/Phase1/Release/llvmCore-15.0.0-rc1.obj/./bin/ld.lld -DCMAKE_AR=/home/tcwg-buildslave/workspace/tcwg-llvm-release/tcwg-tk1_32-build/rc1/Phase1/Release/llvmCore-15.0.0-rc1.obj/./bin/llvm-ar -DCMAKE_RANLIB=/home/tcwg-buildslave/workspace/tcwg-llvm-release/tcwg-tk1_32-build/rc1/Phase1/Release/llvmCore-15.0.0-rc1.obj/./bin/llvm-ranlib -DCMAKE_NM=/home/tcwg-buildslave/workspace/tcwg-llvm-release/tcwg-tk1_32-build/rc1/Phase1/Release/llvmCore-15.0.0-rc1.obj/./bin/llvm-nm -DCMAKE_OBJDUMP=/home/tcwg-buildslave/workspace/tcwg-llvm-release/tcwg-tk1_32-build/rc1/Phase1/Release/llvmCore-15.0.0-rc1.obj/./bin/llvm-objdump -DCMAKE_OBJCOPY=/home/tcwg-buildslave/workspace/tcwg-llvm-release/tcwg-tk1_32-build/rc1/Phase1/Release/llvmCore-15.0.0-rc1.obj/./bin/llvm-objcopy -DCMAKE_STRIP=/home/tcwg-buildslave/workspace/tcwg-llvm-release/tcwg-tk1_32-build/rc1/Phase1/Release/llvmCore-15.0.0-rc1.obj/./bin/llvm-strip -DCMAKE_READELF=/home/tcwg-buildslave/workspace/tcwg-llvm-release/tcwg-tk1_32-build/rc1/Phase1/Release/llvmCore-15.0.0-rc1.obj/./bin/llvm-readelf -DCMAKE_C_COMPILER_TARGET=armv7l-unknown-linux-gnueabihf -DCMAKE_CXX_COMPILER_TARGET=armv7l-unknown-linux-gnueabihf -DCMAKE_ASM_COMPILER_TARGET=armv7l-unknown-linux-gnueabihf -DCMAKE_INSTALL_PREFIX=/usr/local -DLLVM_BINARY_DIR=/home/tcwg-buildslave/workspace/tcwg-llvm-release/tcwg-tk1_32-build/rc1/Phase1/Release/llvmCore-15.0.0-rc1.obj -DLLVM_CONFIG_PATH=/home/tcwg-buildslave/workspace/tcwg-llvm-release/tcwg-tk1_32-build/rc1/Phase1/Release/llvmCore-15.0.0-rc1.obj/bin/llvm-config -DLLVM_ENABLE_WERROR=OFF -DLLVM_HOST_TRIPLE=armv7l-unknown-linux-gnueabihf -DLLVM_HAVE_LINK_VERSION_SCRIPT=1 -DLLVM_USE_RELATIVE_PATHS_IN_DEBUG_INFO=OFF -DLLVM_USE_RELATIVE_PATHS_IN_FILES=OFF -DLLVM_LIT_ARGS=-v -DLLVM_SOURCE_PREFIX= -DPACKAGE_VERSION=15.0.0 -DCMAKE_BUILD_TYPE=Release -DCMAKE_MAKE_PROGRAM=/usr/bin/ninja -DCMAKE_C_COMPILER_LAUNCHER= -DCMAKE_CXX_COMPILER_LAUNCHER= -DCMAKE_EXPORT_COMPILE_COMMANDS=1 -DCOMPILER_RT_BUILD_BUILTINS=Off -DLLVM_INCLUDE_TESTS=ON -DLLVM_DEFAULT_TARGET_TRIPLE=armv7l-unknown-linux-gnueabihf -DLLVM_ENABLE_PROJECTS_USED=ON -DLLVM_ENABLE_PER_TARGET_RUNTIME_DIR=ON -DLLVM_BUILD_TOOLS=ON -DCMAKE_C_COMPILER_WORKS=ON -DCMAKE_CXX_COMPILER_WORKS=ON -DCMAKE_ASM_COMPILER_WORKS=ON -DHAVE_LLVM_LIT=ON "-DLLVM_ENABLE_RUNTIMES=;compiler-rt;libcxx;libcxxabi;libunwind" -DLLVM_USE_LINKER=lld -DCOMPILER_RT_DEFAULT_TARGET_ONLY=ON -GNinja /home/tcwg-buildslave/workspace/tcwg-llvm-release/tcwg-tk1_32-build/rc1/llvm-project/llvm/runtimes/../../runtimes && /usr/bin/cmake -E touch /home/tcwg-buildslave/workspace/tcwg-llvm-release/tcwg-tk1_32-build/rc1/Phase1/Release/llvmCore-15.0.0-rc1.obj/runtimes/runtimes-stamps//runtimes-configure

...which is generated by invoking the release script with:

./test-release.sh -release 15.0.0 -rc 1 -triple armv7a-linux-gnueabihf -j3 -no-openmp -no-mlir -no-flang -use-ninja -configure-flags '-DCOMPILER_RT_DEFAULT_TARGET_ONLY=ON  -DLLVM_PARALLEL_LINK_JOBS=2 -DLLVM_LIT_ARGS=-v -DCMAKE_C_COMPILER_TARGET=armv7a-linux-gnueabihf'

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    Status

    Done

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions