https://sourceware.org/bugzilla/show_bug.cgi?id=32548
Bug ID: 32548
Summary: musl/error-standalone incompatibility (error.h)
Product: elfutils
Version: unspecified
Status: UNCONFIRMED
Severity: normal
Priority: P2
Component: libdw
Assignee: unassigned at sourceware dot org
Reporter: christian+sourceware-bugzilla at tramnitz dot com
CC: elfutils-devel at sourceware dot org
Target Milestone: ---
I'm trying to build elfutils-192 (as dependency for dwz/debugedit) on a musl
build chain (Gentoo stage3 amd64-musl-hardened with musl 1.2.5) and run into
what I think is a linking error:
x86_64-pc-linux-musl-gcc -std=gnu99 -Wall -Wshadow -Wformat=2
-Wold-style-definition -Wstrict-prototypes -Wtrampolines -Wlogical-op
-Wduplicated-cond -Wnull-dereference -Wimplicit-fallthrough=5
-Wuse-after-free=3 -Wunused -Wextra -Wstack-usage=262144
-D_FORTIFY_SOURCE=3 -O2 -pipe -march=x86-64-v3 -mtune=skylake -ggdb -Wl,-O1
-Wl,--as-needed -Wl,-z,pack-relative-relocs -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.192-r2/work/elfutils-0.192/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
-lbz2 -pthread
/usr/lib/gcc/x86_64-pc-linux-musl/14/../../../../x86_64-pc-linux-musl/bin/ld:
libdw_pic.a(libdw_alloc.os): in function `__libdw_oom':
/var/tmp/portage/dev-libs/elfutils-0.192-r2/work/elfutils-0.192/libdw/libdw_alloc.c:155:(.text+0x310):
undefined reference to `error'
collect2: error: ld returned 1 exit status
make[3]: *** [Makefile:1455: libdw.so] Error 1
make[2]: *** [Makefile:693: all] Error 2
make[1]: *** [Makefile:547: all-recursive] Error 1
make: *** [Makefile:463: all] Error 2
I assume that the check for error.h assumes that this a glibc-system where
`error` is an internal library. But since this doesn't exist in musl I have
error-standalone (from https://hacktivis.me/git/error-standalone/) installed,
which provides the error-functions, but also needs to be linked to do so. But
in above activity the library is not in included (in contrast to argp, fts, and
obstack which basically have the same musl/glibs issues).
Using error-standalone seems to be the new Gentoo standard for applications
that still include error.h, so it may be worthwhile to adapt the detection
logic of `error`.
--
You are receiving this mail because:
You are on the CC list for the bug.