Summary: | sys-libs/libucontext-1.1-r1 - In file included from include/libucontext/libucontext.h:5, from arch/ppc/makecontext.c:19: include/libucontext/bits.h:8:9: error: unknown type name 'greg_t' | ||
---|---|---|---|
Product: | Gentoo Linux | Reporter: | ernsteiswuerfel <erhard_f> |
Component: | Current packages | Assignee: | Gentoo musl team <musl> |
Status: | RESOLVED FIXED | ||
Severity: | normal | CC: | matoro_gentoo |
Priority: | Normal | Keywords: | PullRequest |
Version: | unspecified | ||
Hardware: | PPC | ||
OS: | Linux | ||
See Also: | https://github.com/gentoo/gentoo/pull/27342 | ||
Whiteboard: | |||
Package list: | Runtime testing required: | --- | |
Bug Depends on: | |||
Bug Blocks: | 834327 | ||
Attachments: |
emerge --info
build.log |
Created attachment 766127 [details]
build.log
I think that this is bug in glibc version of sys/ucontext.h header on some architectures (rather only PPC{32,64} relevant for Gentoo): https://sourceware.org/bugzilla/show_bug.cgi?id=28938 Problem should not occur in musl systems. In glibc system, you can add this line to your /usr/include/sys/ucontext.h (e.g. somewhere close to definition of gregset_t): typedef unsigned long greg_t; And try building sys-libs/libucontext again. Is sys-libs/libucontext ONLY intended to be used on musl? Based on the description, it seems like it's not totally useless on glibc systems (maybe you want an alternative ucontext implementation for a specific project?) but I want to make sure that upstream even supports that as a use case before opening a ticket with them. The bug has been closed via the following commit(s): https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=07d32a980a910272e3d2e92d70c8b8f38c9406da commit 07d32a980a910272e3d2e92d70c8b8f38c9406da Author: matoro <matoro@users.noreply.github.com> AuthorDate: 2022-09-19 01:31:15 +0000 Commit: Sam James <sam@gentoo.org> CommitDate: 2022-09-25 01:27:23 +0000 profiles: mask sys-libs/libucontext on non-musl Closes: https://bugs.gentoo.org/834450 Closes: https://github.com/gentoo/gentoo/pull/27342 Signed-off-by: Sam James <sam@gentoo.org> profiles/base/package.mask | 1 + profiles/features/musl/package.mask | 1 + 2 files changed, 2 insertions(+) |
Created attachment 766126 [details] emerge --info [...] make -j1 ARCH=ppc 'LDFLAGS=-Wl,-O1 -Wl,--as-needed -Wl,--hash-style=gnu' LIBDIR=/usr/lib all docs cp arch/common/include/libucontext/bits.h include/libucontext/bits.h powerpc-unknown-linux-gnu-gcc -std=gnu99 -D_BSD_SOURCE -fPIC -DPIC -O2 -mcpu=7450 -pipe -DEXPORT_UNPREFIXED -Iinclude -Iarch/ppc -Iarch/common -c -o arch/ppc/makecontext.o arch/ppc/makecontext.c In file included from /usr/include/bits/libc-header-start.h:33, from /usr/include/stdint.h:26, from /usr/lib/gcc/powerpc-unknown-linux-gnu/11.2.0/include/stdint.h:9, from arch/ppc/makecontext.c:15: /usr/include/features.h:187:3: warning: #warning "_BSD_SOURCE and _SVID_SOURCE are deprecated, use _DEFAULT_SOURCE" [-Wcpp] 187 | # warning "_BSD_SOURCE and _SVID_SOURCE are deprecated, use _DEFAULT_SOURCE" | ^~~~~~~ In file included from include/libucontext/libucontext.h:5, from arch/ppc/makecontext.c:19: include/libucontext/bits.h:8:9: error: unknown type name 'greg_t' 8 | typedef greg_t libucontext_greg_t; | ^~~~~~ arch/ppc/makecontext.c: In function 'libucontext_makecontext': arch/ppc/makecontext.c:39:26: error: 'union uc_regs_ptr' has no member named 'gregs'; did you mean 'regs'? 39 | ucp->uc_mcontext.gregs[REG_NIP] = (uintptr_t) func; | ^~~~~ | regs arch/ppc/makecontext.c:40:26: error: 'union uc_regs_ptr' has no member named 'gregs'; did you mean 'regs'? 40 | ucp->uc_mcontext.gregs[REG_LNK] = (uintptr_t) &libucontext_trampoline; | ^~~~~ | regs arch/ppc/makecontext.c:41:26: error: 'union uc_regs_ptr' has no member named 'gregs'; did you mean 'regs'? 41 | ucp->uc_mcontext.gregs[REG_R31] = (uintptr_t) ucp->uc_link; | ^~~~~ | regs arch/ppc/makecontext.c:42:26: error: 'union uc_regs_ptr' has no member named 'gregs'; did you mean 'regs'? 42 | ucp->uc_mcontext.gregs[REG_SP] = (uintptr_t) sp; | ^~~~~ | regs arch/ppc/makecontext.c:50:42: error: 'union uc_regs_ptr' has no member named 'gregs'; did you mean 'regs'? 50 | ucp->uc_mcontext.gregs[i + 3] = va_arg (va, libucontext_greg_t); | ^~~~~ | regs make: *** [Makefile:108: arch/ppc/makecontext.o] Error 1 * ERROR: sys-libs/libucontext-1.1-r1::gentoo failed (compile phase): * emake failed