Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 928892 - dev-libs/libdex-0.4.3 - dex-fiber.c:(.text+<snip>): undefined reference to getcontext
Summary: dev-libs/libdex-0.4.3 - dex-fiber.c:(.text+<snip>): undefined reference to ge...
Status: CONFIRMED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: All Linux
: Normal normal
Assignee: Gentoo musl team
URL:
Whiteboard:
Keywords: PATCH, PullRequest
Depends on:
Blocks:
 
Reported: 2024-04-07 16:06 UTC by Toralf Förster
Modified: 2025-02-20 23:21 UTC (History)
5 users (show)

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


Attachments
emerge-info.txt (emerge-info.txt,17.92 KB, text/plain)
2024-04-07 16:06 UTC, Toralf Förster
Details
dev-libs:libdex-0.4.3:20240407-154026.log (dev-libs:libdex-0.4.3:20240407-154026.log,77.94 KB, text/plain)
2024-04-07 16:06 UTC, Toralf Förster
Details
emerge-history.txt (emerge-history.txt,60.47 KB, text/plain)
2024-04-07 16:06 UTC, Toralf Förster
Details
environment (environment,139.19 KB, text/plain)
2024-04-07 16:06 UTC, Toralf Förster
Details
etc.clang.tar.xz (etc.clang.tar.xz,992 bytes, application/x-xz)
2024-04-07 16:06 UTC, Toralf Förster
Details
etc.portage.tar.xz (etc.portage.tar.xz,40.95 KB, application/x-xz)
2024-04-07 16:06 UTC, Toralf Förster
Details
qlist-info.txt (qlist-info.txt,112.07 KB, text/plain)
2024-04-07 16:06 UTC, Toralf Förster
Details
temp.tar.xz (temp.tar.xz,30.85 KB, application/x-xz)
2024-04-07 16:06 UTC, Toralf Förster
Details
dev-libs/libdex-0.8.1 build.log (gz compressed) (libdex-0.8.1:20250129-043620.log.gz,6.95 KB, application/gzip)
2025-01-29 04:38 UTC, Alfred Wingate
Details
emerge --info (emerge--info.txt,5.56 KB, text/plain)
2025-01-29 04:40 UTC, Alfred Wingate
Details
dev-libs/libdex-0.6.1 build.log (gz compressed) (libdex-0.6.1:20250129-043549.log.gz,6.96 KB, application/gzip)
2025-01-29 04:41 UTC, Alfred Wingate
Details
libdex-ucontext-musl.patch (libdex-ucontext-musl.patch,1.07 KB, patch)
2025-01-29 05:14 UTC, Alfred Wingate
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Toralf Förster gentoo-dev 2024-04-07 16:06:10 UTC
too long lines were shrinked:

[35/39] x86_64-pc-linux-musl-gcc -Isrc/libdex-1.a.p -Isrc -I../libdex-0.4.3/src -I/usr/lib/libffi/include -I/usr/include/glib-2.0 -I/usr/lib/glib-2.0/include -I/usr/include/libmount -I/usr/include/blkid -I/usr/include/sysprof-4 -I/var/tmp/portage/dev-libs/libdex-0.4.3/work/libdex-0.4.3-build -fvisib
[36/39] rm -f src/libdex-1.a && x86_64-pc-linux-musl-ar csrDT src/libdex-1.a src/libdex-1.a.p/dex-aio.c.o src/libdex-1.a.p/dex-aio-backend.c.o src/libdex-1.a.p/dex-async-pair.c.o src/libdex-1.a.p/dex-async-result.c.o src/libdex-1.a.p/dex-block.c.o src/libdex-1.a.p/dex-cancellable.c.o src/libdex-1.a.
[37/39] x86_64-pc-linux-musl-gcc  -o src/libdex-1.so.1.0.0  -Wl,--as-needed -Wl,--no-undefined -shared -fPIC -Wl,-soname,libdex-1.so.1 -Wl,--whole-archive -Wl,--start-group src/libdex-1.a -Wl,--no-whole-archive -Wl,-z,relro -Wl,-z,now -Wl,-z,noexecstack -Wl,-Bsymbolic -fno-plt -O2 -pipe -march=nativ
FAILED: src/libdex-1.so.1.0.0 
x86_64-pc-linux-musl-gcc  -o src/libdex-1.so.1.0.0  -Wl,--as-needed -Wl,--no-undefined -shared -fPIC -Wl,-soname,libdex-1.so.1 -Wl,--whole-archive -Wl,--start-group src/libdex-1.a -Wl,--no-whole-archive -Wl,-z,relro -Wl,-z,now -Wl,-z,noexecstack -Wl,-Bsymbolic -fno-plt -O2 -pipe -march=native -fno-d
/usr/lib/gcc/x86_64-pc-linux-musl/13/../../../../x86_64-pc-linux-musl/bin/ld: src/libdex-1.a.p/dex-fiber.c.o: in function `dex_fiber_context_init':
dex-fiber.c:(.text+0x267): undefined reference to `getcontext'
/usr/lib/gcc/x86_64-pc-linux-musl/13/../../../../x86_64-pc-linux-musl/bin/ld: dex-fiber.c:(.text+0x2af): undefined reference to `makecontext'
/usr/lib/gcc/x86_64-pc-linux-musl/13/../../../../x86_64-pc-linux-musl/bin/ld: src/libdex-1.a.p/dex-fiber.c.o: in function `dex_fiber_scheduler_dispatch':

  -------------------------------------------------------------------

  This is an unstable amd64 chroot image at a tinderbox (==build bot)
  name: 23.0_musl-20240406-125502

  -------------------------------------------------------------------

gcc-config -l:
 [1] x86_64-pc-linux-musl-13 *
clang/llvm (if any):
clang version 18.1.3
Target: x86_64-pc-linux-musl
Thread model: posix
InstalledDir: /usr/lib/llvm/18/bin
Configuration file: /etc/clang/x86_64-pc-linux-musl-clang.cfg
/usr/lib/llvm/18
18.1.3
Python 3.11.9
Available Ruby profiles:
  [1]   ruby31 (with Rubygems) *
Available Rust versions:
  [1]   rust-bin-1.77.1 *
php cli (if any):
go version go1.22.1 linux/amd64

  HEAD of ::gentoo
commit 5dbef1b88e9ca265091c4dc400d4290b27baf18e
Author: Repository mirror & CI <repomirrorci@gentoo.org>
Date:   Sun Apr 7 15:04:16 2024 +0000

    2024-04-07 15:04:16 UTC

emerge -qpvO dev-libs/libdex
[ebuild  N    ] dev-libs/libdex-0.4.3  USE="introspection sysprof -eventfd -gtk-doc -liburing -test -vala"
Comment 1 Toralf Förster gentoo-dev 2024-04-07 16:06:12 UTC
Created attachment 889732 [details]
emerge-info.txt
Comment 2 Toralf Förster gentoo-dev 2024-04-07 16:06:13 UTC
Created attachment 889733 [details]
dev-libs:libdex-0.4.3:20240407-154026.log
Comment 3 Toralf Förster gentoo-dev 2024-04-07 16:06:14 UTC
Created attachment 889734 [details]
emerge-history.txt
Comment 4 Toralf Förster gentoo-dev 2024-04-07 16:06:16 UTC
Created attachment 889735 [details]
environment
Comment 5 Toralf Förster gentoo-dev 2024-04-07 16:06:17 UTC
Created attachment 889736 [details]
etc.clang.tar.xz
Comment 6 Toralf Förster gentoo-dev 2024-04-07 16:06:18 UTC
Created attachment 889737 [details]
etc.portage.tar.xz
Comment 7 Toralf Förster gentoo-dev 2024-04-07 16:06:19 UTC
Created attachment 889738 [details]
qlist-info.txt
Comment 8 Toralf Förster gentoo-dev 2024-04-07 16:06:20 UTC
Created attachment 889739 [details]
temp.tar.xz
Comment 9 NHO 2024-05-12 14:06:39 UTC
https://wiki.musl-libc.org/open-issues.html#ucontext.h

This should be masked on musl.
Comment 10 Andreas K. Hüttel archtester gentoo-dev 2024-10-24 19:58:16 UTC
Not a C99 problem.
Comment 11 Pacho Ramos gentoo-dev 2024-11-08 19:59:05 UTC
Still valid for 0.6.1?
Comment 12 Toralf Förster gentoo-dev 2024-11-10 09:41:11 UTC
does not appear till now
Comment 13 Pacho Ramos gentoo-dev 2025-01-16 14:35:22 UTC
Thanks for the feedback
Comment 14 Alfred Wingate 2025-01-29 04:38:41 UTC
Created attachment 917756 [details]
dev-libs/libdex-0.8.1 build.log (gz compressed)

This is still valid for both version in tree.
Comment 15 Alfred Wingate 2025-01-29 04:40:37 UTC
Created attachment 917757 [details]
emerge --info
Comment 16 Alfred Wingate 2025-01-29 04:41:04 UTC
Created attachment 917758 [details]
dev-libs/libdex-0.6.1 build.log (gz compressed)
Comment 17 Alfred Wingate 2025-01-29 05:14:54 UTC
Created attachment 917759 [details, diff]
libdex-ucontext-musl.patch

This is a patch that links sys-libs/libucontext if the symbol is missing.

Will see about a PR and seeing about if upstream is receptive to it.

https://github.com/kaniini/libucontext
Comment 18 Larry the Git Cow gentoo-dev 2025-02-20 23:21:57 UTC
The bug has been referenced in the following commit(s):

https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=1f277d7199e615b2da44c12355734e40a685fc8c

commit 1f277d7199e615b2da44c12355734e40a685fc8c
Author:     Alfred Wingate <parona@protonmail.com>
AuthorDate: 2025-01-29 05:29:40 +0000
Commit:     Sam James <sam@gentoo.org>
CommitDate: 2025-02-20 23:21:20 +0000

    dev-libs/libdex: use libucontext on musl
    
    No revbump because musl could never be built
    
    Bug: https://bugs.gentoo.org/928892
    Signed-off-by: Alfred Wingate <parona@protonmail.com>
    Closes: https://github.com/gentoo/gentoo/pull/40357
    Signed-off-by: Sam James <sam@gentoo.org>

 .../files/libdex-0.8.1-libucontext-musl.patch      | 61 ++++++++++++++++++++++
 dev-libs/libdex/libdex-0.8.1.ebuild                |  5 ++
 2 files changed, 66 insertions(+)