Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 265304 - sys-libs/libcap-2.15 (2.16): build fails with kernel headers from 2.6.29
Summary: sys-libs/libcap-2.15 (2.16): build fails with kernel headers from 2.6.29
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: [OLD] Core system (show other bugs)
Hardware: x86 Linux
: High normal (vote)
Assignee: Gentoo's Team for Core System packages
URL:
Whiteboard:
Keywords:
: 269848 (view as bug list)
Depends on:
Blocks:
 
Reported: 2009-04-07 13:17 UTC by Johan Hovold
Modified: 2009-05-16 16:16 UTC (History)
2 users (show)

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


Attachments
include capability.h after wait.h (libcap-2.15-capability_h.patch,510 bytes, patch)
2009-04-07 13:22 UTC, Johan Hovold
Details | Diff
Remove include-guard defines from capability.h (libcap-2.15-capability_h-2.patch,661 bytes, patch)
2009-04-08 11:54 UTC, Johan Hovold
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Johan Hovold 2009-04-07 13:17:32 UTC
sys-libs/libcap-2.15 (2.16) fails to build with kernel headers from 2.6.29 (manually installed):

gcc -O2 -Dlinux -fPIC -Wall -Wwrite-strings -Wpointer-arith -Wcast-qual -Wcast-align -Wstrict-prototypes -Wmissing-prototypes -Wnested-externs -Winline -Wshadow -g  -I/home/johan/src/external/libcap/libcap-2.15/progs/../libcap/include -I/home/johan/src/external/libcap/libcap-2.15/progs/../libcap/include -c capsh.c -o capsh.o
In file included from /usr/include/bits/sigcontext.h:28,
                 from /usr/include/signal.h:333,
                 from /usr/include/sys/wait.h:31,
                 from capsh.c:19:
/usr/include/asm/sigcontext.h:28: error: expected specifier-qualifier-list before '__u64'
/usr/include/asm/sigcontext.h:191: error: expected specifier-qualifier-list before '__u64'


Reproducible: Always




Probably due to the following change: 

commit e59afe6a21dce7bb3c63ba4f894a3195ae3d5529
Author: Jaswinder Singh Rajput <jaswinderrajput@gmail.com>
Date:   Fri Jan 30 22:53:49 2009 +0530

    headers_check fix: x86, sigcontext.h
    
    fix the following 'make headers_check' warnings:
    
      usr/include/asm/sigcontext.h:5: include of <linux/types.h> is preferred over <asm/types.h>
      usr/include/asm/sigcontext.h:24: found __[us]{8,16,32,64} type without #include <linux/types.h>
    
    Signed-off-by: Jaswinder Singh Rajput <jaswinderrajput@gmail.com>

diff --git a/arch/x86/include/asm/sigcontext.h b/arch/x86/include/asm/sigcontext.h
index 0afcb5e..ec66649 100644
--- a/arch/x86/include/asm/sigcontext.h
+++ b/arch/x86/include/asm/sigcontext.h
@@ -2,7 +2,7 @@
 #define _ASM_X86_SIGCONTEXT_H
 
 #include <linux/compiler.h>
-#include <asm/types.h>
+#include <linux/types.h>
 
 #define FP_XSTATE_MAGIC1       0x46505853U
 #define FP_XSTATE_MAGIC2       0x46505845U
Comment 1 Johan Hovold 2009-04-07 13:22:21 UTC
Created attachment 187580 [details, diff]
include capability.h after wait.h

The attached patch makes libcap compile with 2.6.29 headers by including capability.h after wait.h.
Comment 2 Peter Alfredsen (RETIRED) gentoo-dev 2009-04-07 13:57:32 UTC
We only support the headers included with the package linux-headers, sorry.
Comment 3 Johan Hovold 2009-04-07 14:10:52 UTC
Ok, but this is likely to break once linux-headers hits 2.6.29...
Comment 4 Johan Hovold 2009-04-08 11:51:21 UTC
For future reference:

Simply including sys/capability.h before sys/wait.h (and likely other system headers) results in

In file included from /usr/include/bits/sigcontext.h:28,
                 from /usr/include/signal.h:333,
                 from /usr/include/sys/wait.h:31,
                 from capsh.c:19:
/usr/include/asm/sigcontext.h:28: error: expected specifier-qualifier-list
before '__u64'
/usr/include/asm/sigcontext.h:191: error: expected specifier-qualifier-list
before '__u64'

In particular, this is not specific to the capsh application, but rather an issue with capability.h triggered by commit e59afe6a21dce7bb3c63ba4f894a3195ae3d5529.

I'm attaching a patch which removes the no longer needed user-space include guard defines from capability.h.
Comment 5 Johan Hovold 2009-04-08 11:54:53 UTC
Created attachment 187677 [details, diff]
Remove include-guard defines from capability.h

Remove the no longer needed include-guard defines from capability.h (the kernel headers have been sanitized in 2.6.29).
Comment 6 Yar Odin 2009-05-14 13:16:04 UTC
usefull for me, thanx
Comment 7 SpanKY gentoo-dev 2009-05-15 09:10:54 UTC
not sure why this is INVALID
Comment 8 SpanKY gentoo-dev 2009-05-15 09:11:24 UTC
*** Bug 269848 has been marked as a duplicate of this bug. ***
Comment 9 Yar Odin 2009-05-15 14:27:00 UTC
http://bugs.gentoo.org/attachment.cgi?id=191326

tihs patch works for me with with GCC 4.3.3 and Linux headers 2.6.29 and libcap
2.16.