Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 677098 - sys-libs/musl with sys-kernel/linux-headers-4.20 on arm64: asm/ptrace.h is incompatible with musl signal.h
Summary: sys-libs/musl with sys-kernel/linux-headers-4.20 on arm64: asm/ptrace.h is in...
Status: RESOLVED TEST-REQUEST
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: All Linux
: Normal normal (vote)
Assignee: Anthony Basile
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2019-02-02 13:08 UTC by eroen
Modified: 2020-05-21 00:45 UTC (History)
1 user (show)

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 eroen 2019-02-02 13:08:35 UTC
On arm64 musl systems, <asm/ptrace.h> from linux-headers-4.20 conflicts with <signal.h> from musl-1.1.21 if they are both included in the same compilation unit.


This causes issues when compiling sys-apps/sandbox:

libtool: compile:  aarch64-linux-musl-gcc -DHAVE_CONFIG_H -I. -I/var/tmp/portage/sys-apps/sandbox-2.13/work/sandbox-2.13 -DETCDIR=\"/etc\" -DLIBSANDBOX_PATH=\"/usr/lib\" -DSANDBOX_BASHRC_PATH=\"/usr/share/sandbox\" -D_REENTRANT -O2 -Wall -Winvalid-pch -fdata-sections -ffunction-sections -fno-builtin-calloc -fno-builtin-malloc -fno-builtin-realloc -c /var/tmp/portage/sys-apps/sandbox-2.13/work/sandbox-2.13/headers.h  -fPIC -DPIC -o libsbutil/.libs/headers.h.gch.o
In file included from /usr/include/asm/ptrace.h:26,
                 from /var/tmp/portage/sys-apps/sandbox-2.13/work/sandbox-2.13/headers.h:152:
/usr/include/asm/sigcontext.h:28:8: error: redefinition of 'struct sigcontext'
 struct sigcontext {
        ^~~~~~~~~~
In file included from /usr/include/signal.h:48,
                 from /var/tmp/portage/sys-apps/sandbox-2.13/work/sandbox-2.13/headers.h:63:
/usr/include/bits/signal.h:18:16: note: originally defined here
 typedef struct sigcontext {
                ^~~~~~~~~~


This is resolved upstream by these two commits:
https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=ee1b465b303591d3a04d403122bbc0d7026520fb
https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit?id=9966a05c7b80f075f2bc7e48dbb108d3f2927234
Comment 1 tt_1 2019-07-06 15:23:59 UTC
I might add this to the overlay, since it has been fixed upstream for linux-headers-5.x - does this happen only with linux-headers-4.20?
Comment 2 Jory A. Pratt gentoo-dev 2019-07-11 22:36:51 UTC
(In reply to tt_1 from comment #1)
> I might add this to the overlay, since it has been fixed upstream for
> linux-headers-5.x - does this happen only with linux-headers-4.20?

not worth adding to the overlay, we need to stablize a 5.x, it is past due.
Comment 3 Jory A. Pratt gentoo-dev 2020-05-21 00:45:39 UTC
Feel free to reopen if your still having problems. I have tested with a stable musl/linux-headers and have not seen any problems.