Created attachment 664783 [details] build.log compiler-rt-sanitizers-10.0.1 on musl arm64 fails with the following error: FAILED: lib/interception/CMakeFiles/RTInterception.aarch64.dir/interception_linux.cpp.o /usr/lib/llvm/10/bin/aarch64-gentoo-linux-musl-clang++ -I/var/tmp/portage/sys-libs/compiler-rt-sanitizers-10.0.1/work/compiler-rt/lib/interception/.. -O2 -pipe -Wall -std=c++14 -Wno-unused-parameter -march=armv8-a -fPIC -fno-builtin -fno-exceptions -fomit-frame-pointer -funwind-tables -fno-stack-protector -fno-sanitize=safe-stack -fvisibility=hidden -fno-lto -O3 -gline-tables-only -Wno-gnu -Wno-variadic-macros -Wno-c99-extensions -Wno-non-virtual-dtor -fno-rtti -MD -MT lib/interception/CMakeFiles/RTInterception.aarch64.dir/interception_linux.cpp.o -MF lib/interception/CMakeFiles/RTInterception.aarch64.dir/interception_linux.cpp.o.d -o lib/interception/CMakeFiles/RTInterception.aarch64.dir/interception_linux.cpp.o -c /var/tmp/portage/sys-libs/compiler-rt-sanitizers-10.0.1/work/compiler-rt/lib/interception/interception_linux.cpp /var/tmp/portage/sys-libs/compiler-rt-sanitizers-10.0.1/work/compiler-rt/lib/interception/interception_linux.cpp:69:10: error: use of undeclared identifier 'dlvsym' return dlvsym(RTLD_NEXT, name, ver); This is on a fresh musl system created by: emerge-webrsync; emerge -vuDU @world, emerge --depclean, emerge compiler-rt-sanitizers Attached is the build.log
I googled around and found: https://github.com/anholt/libepoxy/pull/158. dlvsym seems to be a glibcism. Note that upstream support BSDs and all sorts of platforms, so this shouldn't be a problem. I found this: https://reviews.llvm.org/D63785. It looks like we need DCOMPILER_RT_BUILD_WITH_MUSL=$(usex elibc_musl) in the ebuild.
This has been fixed in LLVM 12: https://reviews.llvm.org/D93848
(In reply to fee1-dead-beef from comment #2) > This has been fixed in LLVM 12: > https://reviews.llvm.org/D93848 Thanks.