Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 560098 - app-misc/pax-utils-1.1.1: fails to build on arches w/out si_syscall
Summary: app-misc/pax-utils-1.1.1: fails to build on arches w/out si_syscall
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: All Linux
: Normal normal (vote)
Assignee: SpanKY
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2015-09-10 10:06 UTC by Anthony Basile
Modified: 2015-09-19 06:27 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 Anthony Basile gentoo-dev 2015-09-10 10:06:44 UTC
The build fails with the following on mips but not on amd64.

>>> Source configured.
>>> Compiling source in /var/tmp/portage/app-misc/pax-utils-1.1.1/work/pax-utils-1.1.1 ...
make -j1 USE_CAP=no USE_DEBUG=no USE_PYTHON=no USE_SECCOMP=yes 
mips64el-unknown-linux-gnu-gcc -O2 -march=mips3 -mplt -Wa,-mfix-loongson2f-nop -pipe -D_GNU_SOURCE -D_FILE_OFFSET_BITS=64 -DWANT_SECCOMP -DVERSION="v1.1.1" -DVCSID="" -o paxelf.o -c paxelf.c
mips64el-unknown-linux-gnu-gcc -O2 -march=mips3 -mplt -Wa,-mfix-loongson2f-nop -pipe -D_GNU_SOURCE -D_FILE_OFFSET_BITS=64 -DWANT_SECCOMP -DVERSION="v1.1.1" -DVCSID="" -o paxmacho.o -c paxmacho.c
mips64el-unknown-linux-gnu-gcc -O2 -march=mips3 -mplt -Wa,-mfix-loongson2f-nop -pipe -D_GNU_SOURCE -D_FILE_OFFSET_BITS=64 -DWANT_SECCOMP -DVERSION="v1.1.1" -DVCSID="" -o paxinc.o -c paxinc.c
mips64el-unknown-linux-gnu-gcc -O2 -march=mips3 -mplt -Wa,-mfix-loongson2f-nop -pipe -D_GNU_SOURCE -D_FILE_OFFSET_BITS=64 -DWANT_SECCOMP -DVERSION="v1.1.1" -DVCSID="" -o security.o -c security.c
In file included from security.c:8:0:
security.c: In function 'pax_seccomp_sigal':
security.c:47:43: error: 'siginfo_t' has no member named 'si_syscall'
  warn("seccomp violated: syscall %i", info->si_syscall);
                                           ^
paxinc.h:113:61: note: in definition of macro 'warn'
  fprintf(stderr, "%s%s%s: " fmt "\n", RED, argv0, NORM , ## args)
                                                             ^
Makefile:108: recipe for target 'security.o' failed
make: *** [security.o] Error 1


When I look at <bits/siginfo.h> on amd64, I see that it has a bunch of defininitions required by X/Open, one of which is

# define si_syscall     _sifields._sigsys._syscall

but this is missing in the mips.  In fact, the mips struct for siginfo_t doesn't even have a _sigsys memeber.  The only other difference is that I'm using stable glibc 2.20-r2 on amd64, but 2.21-r1 on mips.

Sorry I don't have time to dig deeper because ${real_life}.  For now I've masked USE=seccomp for pax-utils only on mips for glibc, uclibc, and musl.


Reproducible: Always
Comment 1 Anthony Basile gentoo-dev 2015-09-10 10:11:53 UTC
Oh, I should add that it also fails with uclibc mipsel3.
Comment 2 Mike Gilbert gentoo-dev 2015-09-10 14:45:17 UTC
This issue was reported in bug 558482 comment 14.

It looks like vapier fixed it in glibc already (see also).
Comment 3 Anthony Basile gentoo-dev 2015-09-10 18:49:21 UTC
(In reply to Mike Gilbert from comment #2)
> This issue was reported in bug 558482 comment 14.
> 
> It looks like vapier fixed it in glibc already (see also).

Looks like we're going to need a uclibc port of the upstream fix at

https://sourceware.org/git/gitweb.cgi?p=glibc.git;h=a2ab38c9b8a8b99f998bb9b9743b3f5c9a4493b5

Its easy enough.
Comment 4 SpanKY gentoo-dev 2015-09-11 02:29:56 UTC
the ifdef logic was supposed to catch si_syscall usage, but this one line was used outside of that