Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 747856 - sys-libs/compiler-rt-sanitizers-10.0.1 error: use of undeclared identifier 'dlvsym' on musl arm64
Summary: sys-libs/compiler-rt-sanitizers-10.0.1 error: use of undeclared identifier 'd...
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: ARM64 Linux
: Normal normal (vote)
Assignee: LLVM support project
URL:
Whiteboard:
Keywords: PATCH
Depends on:
Blocks:
 
Reported: 2020-10-11 16:46 UTC by Jannik Glückert
Modified: 2022-06-23 04:34 UTC (History)
1 user (show)

See Also:
Package list:
Runtime testing required: ---


Attachments
build.log (build.log,48.41 KB, text/x-log)
2020-10-11 16:46 UTC, Jannik Glückert
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Jannik Glückert 2020-10-11 16:46:36 UTC
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
Comment 1 Sam James archtester Gentoo Infrastructure gentoo-dev Security 2020-10-11 23:41:34 UTC
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.
Comment 2 fee1-dead-beef 2021-02-01 11:17:31 UTC
This has been fixed in LLVM 12:
https://reviews.llvm.org/D93848
Comment 3 Sam James archtester Gentoo Infrastructure gentoo-dev Security 2022-06-23 04:34:59 UTC
(In reply to fee1-dead-beef from comment #2)
> This has been fixed in LLVM 12:
> https://reviews.llvm.org/D93848

Thanks.