using profile: default/linux/amd64/23.0/musl/llvm build will failed if sys-libs/error-standalone is installed. clang -std=gnu99 -Wall -Wshadow -Wformat=2 -Wold-style-definition -Wstrict-prototypes -Wnull-dereference -Wimplicit-fallthrough -Wunused -Wextra -D_FORTIFY_SOURCE=3 -O2 -pipe -g -fno-addrsig -Wl,-O1 -Wl,--as-needed -Wl,-z,pack-relative-relocs -Wl,--as-needed -Wl,--build-id -o libdw.so -shared -Wl,-z,defs -Wl,-z,relro -o libdw.so \ -Wl,--soname,libdw.so.1,--enable-new-dtags \ -Wl,--version-script,/var/tmp/portage/dev-libs/elfutils-0.191-r2/work/elfutils-0.191/libdw/libdw.map \ -Wl,--no-undefined \ -Wl,--whole-archive ../libebl/libebl_pic.a ../backends/libebl_backends_pic.a ../libcpu/libcpu_pic.a libdw_pic.a ../libdwelf/libdwelf_pic.a ../libdwfl/libdwfl_pic.a -Wl,--no-whole-archive \ ../lib/libeu.a ../libelf/libelf.so -ldl -lz -largp -lfts -lobstack -lzstd -lbz2 -pthread ld.lld: error: undefined symbol: error >>> referenced by libdw_alloc.c:155 (/var/tmp/portage/dev-libs/elfutils-0.191-r2/work/elfutils-0.191/libdw/libdw_alloc.c:155) >>> libdw_alloc.os:(__libdw_oom) in archive libdw_pic.a the reason has been described in https://bugs.gentoo.org/864787, and build.log is there too. Reproducible: Always
Sent a patch upstream https://sourceware.org/pipermail/elfutils-devel/2025q1/007770.html
https://sourceware.org/git/?p=elfutils.git;a=commit;h=1d1739f1664964252d6b5cde233805f6a14459bf Patch merged upstream
The bug has been closed via the following commit(s): https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=a4aa03f192a3b51ffce6e540220c3b466d3381ae commit a4aa03f192a3b51ffce6e540220c3b466d3381ae Author: Z. Liu <zhixu.liu@gmail.com> AuthorDate: 2025-01-26 17:57:39 +0000 Commit: Sam James <sam@gentoo.org> CommitDate: 2025-01-29 22:47:26 +0000 dev-libs/elfutils: fix build failed w/ musl error() is available in glibc, not in musl, configure check header file "error.h" only. If sys-libs/error-standalone is installed, check report ok, but link will fail because no "-lerror". So update configure.ac to check both error.h exist and can be linked without any extra "-l...", if not then fallback to err.h which cause built-in error() to be used. Closes: https://bugs.gentoo.org/948878 Signed-off-by: Z. Liu <zhixu.liu@gmail.com> Signed-off-by: Alfred Wingate <parona@protonmail.com> Closes: https://github.com/gentoo/gentoo/pull/40322 Signed-off-by: Sam James <sam@gentoo.org> dev-libs/elfutils/elfutils-0.191-r2.ebuild | 3 +- dev-libs/elfutils/elfutils-0.192-r1.ebuild | 3 +- ...0.191-musl-configure-better-error-h-check.patch | 32 ++++++++++++++++++++++ 3 files changed, 36 insertions(+), 2 deletions(-)