Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 26231 - libcap / kernel
Summary: libcap / kernel
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: New packages (show other bugs)
Hardware: Alpha Linux
: High normal (vote)
Assignee: Robin Johnson
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2003-08-08 14:15 UTC by Nico Baggus
Modified: 2003-08-17 17:46 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 Nico Baggus 2003-08-08 14:15:26 UTC
Libcap compilation chokes on the /usr/include/asm/bitops.h 
as supplied with the kernels up to 2.4.21 
 
The inline directoive is not nderstood, and complaints are issued by 
the gcc compiler, changing all inline instances to __inline__  
instances will make the build go through
Comment 1 Joshua Kinard gentoo-dev 2003-08-08 17:40:11 UTC
This is the exact error off my MIPS box, which uses 2.4.21 headers from a CVS snapshot from linux-mips.org.  I don't know much about the use of the inline or __inline__ keywords in gcc, nor the difference between them.  Perhaps someone can clarify their differance and whether it's safe to change all instances of "inline" to "__inline__"?


Calculating dependencies ...done!
>>> emerge (1 of 1) sys-libs/libcap-1.10 to /
>>> md5 src_uri ;-) libcap-1.10.tar.bz2
>>> Unpacking source...
>>> Unpacking libcap-1.10.tar.bz2 to /usr/obj/portage/libcap-1.10/work
 * Applying libcap-1.10-python.patch...                                                                                                   [ ok ]
>>> Source unpacked.
make -C libcap CC='gcc' CFLAGS='-Dlinux -ansi -D_POSIX_SOURCE -Wall -Wwrite-strings -Wpointer-arith -Wcast-qual -Wcast-align -Wtraditional -Wstrict-prototypes -Wmissing-prototypes -Wnested-externs -Winline -Wshadow -pedantic  -O3 -mips3 -mtune=r4400 -mabi=32 -pipe -fomit-frame-pointer -fPIC -I/usr/include/python2.2 -I/usr/obj/portage/libcap-1.10/work/libcap-1.10/libcap/include' LD='ld' LIBS='-L/usr/obj/portage/libcap-1.10/work/libcap-1.10/libcap -lcap' LDFLAGS='-s ' VERSION='1' MINOR='10' LIBDIR='/lib' INCDIR='/usr/include' SBINDIR='/sbin' MANDIR='/usr/man' all
make[1]: Entering directory `/usr/obj/portage/libcap-1.10/work/libcap-1.10/libcap'
=> making cap_names.c from <linux/capability.h>
gcc -Dlinux -ansi -D_POSIX_SOURCE -Wall -Wwrite-strings -Wpointer-arith -Wcast-qual -Wcast-align -Wtraditional -Wstrict-prototypes -Wmissing-prototypes -Wnested-externs -Winline -Wshadow -pedantic  -O3 -mips3 -mtune=r4400 -mabi=32 -pipe -fomit-frame-pointer -fPIC -I/usr/include/python2.2 -I/usr/obj/portage/libcap-1.10/work/libcap-1.10/libcap/include -s  _makenames.c -o _makenames
In file included from /usr/include/linux/fs.h:26,
                 from /usr/include/linux/capability.h:17,
                 from _makenames.c:12:
/usr/include/asm/bitops.h:585: syntax error before "int"
_makenames.c: In function `main':
_makenames.c:41: warning: traditional C rejects string concatenation
_makenames.c:42: warning: traditional C rejects string concatenation
_makenames.c:43: warning: traditional C rejects string concatenation
_makenames.c:44: warning: traditional C rejects string concatenation
_makenames.c:45: warning: traditional C rejects string concatenation
_makenames.c:46: warning: traditional C rejects string concatenation
_makenames.c:47: warning: traditional C rejects string concatenation
_makenames.c:48: warning: traditional C rejects string concatenation
_makenames.c:58: warning: traditional C rejects string concatenation
_makenames.c:59: warning: traditional C rejects string concatenation
_makenames.c:60: warning: traditional C rejects string concatenation
make[1]: *** [_makenames] Error 1
make[1]: Leaving directory `/usr/obj/portage/libcap-1.10/work/libcap-1.10/libcap'
make: *** [all] Error 2

!!! ERROR: sys-libs/libcap-1.10 failed.
!!! Function src_compile, Line 39, Exitcode 2
!!! (no error message)
Comment 2 Nico Baggus 2003-08-11 15:26:36 UTC
In  the mentioned bitops.h there are some routines with something like: 
 
int inline blah () 
or void __inline__ blah() 
 
The compilation falls over the first for but does accept the second form 
so there is a commandline option supplied to gcc that makes gss complain about 
" inline " but not " __inline__ ", I hope this clarifies the issue a bit? 
 
 
Comment 3 Robin Johnson archtester Gentoo Infrastructure gentoo-dev Security 2003-08-11 17:29:51 UTC
What is the proper fix for it tho?
Comment 4 Nico Baggus 2003-08-12 01:07:36 UTC
There are no more complaints when -ansi is left off 
My guess: -ansi alse means inline should be __inline__ 
 
the dropping of -ansi doesn't solve the "warning: traditional C rejects string 
concatenation"   
 
My guess, the defaults for gcc changed ? 
 
 
Comment 5 Nico Baggus 2003-08-12 16:42:09 UTC
dropping of -ansi helps get past the __inline__ problem 
 
modification of _cap_debug(f, x...) to _cap_debug(f...) removes a lot of 
warning messages 
 
The cast warnings from esp. libcap_wrap.c seem to be unavoidable. 
 
Hope it helps 
Comment 6 Robin Johnson archtester Gentoo Infrastructure gentoo-dev Security 2003-08-17 17:46:53 UTC
Ok, -ansi is filtered out now, so this should be fixed.