Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 926770 - sys-libs/libunwind: build fails on powerpc-gentoo-linux-musl due to mcontext_t incompatibility with glibc
Summary: sys-libs/libunwind: build fails on powerpc-gentoo-linux-musl due to mcontext_...
Status: UNCONFIRMED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: PPC Linux
: Normal normal (vote)
Assignee: Gentoo Toolchain Maintainers
URL:
Whiteboard:
Keywords: PATCH
Depends on:
Blocks:
 
Reported: 2024-03-11 15:36 UTC by jonys
Modified: 2024-03-11 15:37 UTC (History)
0 users

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


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description jonys 2024-03-11 15:36:03 UTC
On ppc, glibc and musl have slightly different API for accessing registers in the mcontext_t struct, see https://www.openwall.com/lists/musl/2018/02/22/1 for the reasons behind the divergence. Because of this, sys-libs/libunwind currently doesn't compile on powerpc-gentoo-linux-musl (`error: 'mcontext_t' has no member named 'uc_regs'`). Upstream has an open issue about it here: https://github.com/libunwind/libunwind/issues/709

A patch exists to make it detect the libc at compile-time and use the musl API when necessary: https://github.com/libunwind/libunwind/pull/710 or https://git.openembedded.org/openembedded-core/tree/meta/recipes-support/libunwind/libunwind/0005-ppc32-Consider-ucontext-mismatches-between-glibc-and.patch

Can we include this patch downstream to fix the incompatibility until upstream merges the open pull request? The repository is listed as “in need of new / additional maintainer”, so it might take a while.

Reproducible: Always