Summary: | sys-libs/musl installs /usr/include/ucontext.h, but does not implement the functions declared within it (was: sys-libs/libxcrypt-4.4.28-r2 fails tests on MUSL: ld: explicit-bzero.c:(.text.startup+0xed): undefined reference to makecontext) | ||
---|---|---|---|
Product: | Gentoo Linux | Reporter: | Agostino Sarubbo <ago> |
Component: | Current packages | Assignee: | Gentoo musl team <musl> |
Status: | RESOLVED FIXED | ||
Severity: | normal | CC: | toolchain |
Priority: | Normal | ||
Version: | unspecified | ||
Hardware: | All | ||
OS: | Linux | ||
Whiteboard: | |||
Package list: | Runtime testing required: | --- | |
Attachments: | build.log |
Description
Agostino Sarubbo
2022-04-13 07:14:07 UTC
Created attachment 770495 [details]
build.log
build log and emerge --info
Error(s) that match a know pattern in addition to what has been reported in the summary: /usr/lib/gcc/x86_64-gentoo-linux-musl/11.2.1/../../../../x86_64-gentoo-linux-musl/bin/ld: explicit-bzero.c:(.text.startup+0x108): undefined reference to `swapcontext' /usr/lib/gcc/x86_64-gentoo-linux-musl/11.2.1/../../../../x86_64-gentoo-linux-musl/bin/ld: explicit-bzero.c:(.text.startup+0x134): undefined reference to `swapcontext' /usr/lib/gcc/x86_64-gentoo-linux-musl/11.2.1/../../../../x86_64-gentoo-linux-musl/bin/ld: explicit-bzero.c:(.text.startup+0x177): undefined reference to `swapcontext' /usr/lib/gcc/x86_64-gentoo-linux-musl/11.2.1/../../../../x86_64-gentoo-linux-musl/bin/ld: explicit-bzero.c:(.text.startup+0xed): undefined reference to `makecontext' explicit-bzero.c:(.text+0x3c5): undefined reference to `swapcontext' explicit-bzero.c:(.text+0x5a): undefined reference to `swapcontext' explicit-bzero.c:(.text+0xd5): undefined reference to `swapcontext' explicit-bzero.c:(.text.startup+0x92): undefined reference to `getcontext' collect2: error: ld returned 1 exit status https://wiki.musl-libc.org/open-issues.html#ucontext.h these functions (swapcontext, makecontext) are not implemented, and need to be blocked out when using musl we could drop test/explicit-bzero from check_PROGRAMS (Makefile.am) for musl tinderbox_musl has reproduced this issue with version 4.4.28-r2 - Updating summary. (In reply to Fabian Groffen from comment #3) musl installs /usr/include/ucontext.h which declares the swapcontext and getcontext functions. If libc doesn't provide these functions, arguably /usr/include/ucontext.h should not be installed at all. libxcrypt has a configure test that checks for ucontext.h, and there is a check in test/explicit-bzero.c that checks for HAVE_UCONTEXT_H. If the macro is not set, the test simply exits with status 77 (skip). The bug has been closed via the following commit(s): https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=6da5a9571d82af96730a4ecb966b58b4c18c13a7 commit 6da5a9571d82af96730a4ecb966b58b4c18c13a7 Author: Mike Gilbert <floppym@gentoo.org> AuthorDate: 2022-10-08 15:29:25 +0000 Commit: Mike Gilbert <floppym@gentoo.org> CommitDate: 2022-10-08 15:29:25 +0000 sys-libs/libxcrypt: add musl workaround Closes: https://bugs.gentoo.org/838172 Signed-off-by: Mike Gilbert <floppym@gentoo.org> sys-libs/libxcrypt/libxcrypt-4.4.28-r1.ebuild | 7 +++++++ sys-libs/libxcrypt/libxcrypt-4.4.28-r2.ebuild | 7 +++++++ 2 files changed, 14 insertions(+) The bug has been closed via the following commit(s): https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=67b62e98c3b475c46489f25469492f579ed531ca commit 67b62e98c3b475c46489f25469492f579ed531ca Author: Sam James <sam@gentoo.org> AuthorDate: 2022-11-02 02:29:52 +0000 Commit: Sam James <sam@gentoo.org> CommitDate: 2022-11-02 02:29:52 +0000 sys-libs/libxcrypt: add 4.4.30 Closes: https://bugs.gentoo.org/838172 Signed-off-by: Sam James <sam@gentoo.org> sys-libs/libxcrypt/Manifest | 1 + sys-libs/libxcrypt/libxcrypt-4.4.30.ebuild | 329 +++++++++++++++++++++++++++++ 2 files changed, 330 insertions(+) |