Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!

Bug 353289

Summary: sys-libs/libcap-ng-0.6.4 - cap-ng.c:325:21: error: 'XATTR_NAME_CAPS' undeclared (first use in this function)
Product: Gentoo Linux Reporter: Sven Eden <sven.eden>
Component: [OLD] Core systemAssignee: Gentoo's Team for Core System packages <base-system>
Status: RESOLVED FIXED    
Severity: normal CC: prometheanfire
Priority: High    
Version: unspecified   
Hardware: All   
OS: Linux   
URL: https://fedorahosted.org/libcap-ng/changeset/11
Whiteboard:
Package list:
Runtime testing required: ---
Bug Depends on: 353448    
Bug Blocks:    
Attachments: Output of emerge --info =sys-libs/libcap-ng-0.6.4
The build log
emerge --info for libcap-ng 0.6.4 amd64 hardened
libcap-ng 0.6.4 build log

Description Sven Eden 2011-01-31 09:06:49 UTC
libcap-ng is a dependency of smartmontools and fails to compile on my amd64 laptop with the following error:

--------------------------------

/bin/sh ../libtool --tag=CC   --mode=compile x86_64-pc-linux-gnu-gcc -DHAVE_CONFIG_H -I. -I.. -I. -I..   -fPIC -DPIC -W -Wall -Wshadow -Wformat -Wundef -D_GNU_SOURCE -march=native -O2 -pipe -MT cap-ng.lo -MD -MP -MF .deps/cap-ng.Tpo -c -o cap-ng.lo cap-ng.c
libtool: compile:  x86_64-pc-linux-gnu-gcc -DHAVE_CONFIG_H -I. -I.. -I. -I.. -fPIC -DPIC -W -Wall -Wshadow -Wformat -Wundef -D_GNU_SOURCE -march=native -O2 -pipe -MT cap-ng.lo -MD -MP -MF .deps/cap-ng.Tpo -c cap-ng.c  -fPIC -DPIC -o .libs/cap-ng.o
cap-ng.c: In function 'get_bounding_set':
cap-ng.c:225:70: warning: signed and unsigned type in conditional expression
cap-ng.c: In function 'capng_get_caps_fd':
cap-ng.c:325:21: error: 'XATTR_NAME_CAPS' undeclared (first use in this function)
cap-ng.c:325:21: note: each undeclared identifier is reported only once for each function it appears in
cap-ng.c: In function 'capng_apply_caps_fd':
cap-ng.c:539:25: error: 'XATTR_NAME_CAPS' undeclared (first use in this function)
make[3]: *** [cap-ng.lo] Error 1

--------------------------------

I'll add attachments with the full log and the output of emerge --info
Comment 1 Sven Eden 2011-01-31 09:07:36 UTC
Created attachment 261162 [details]
Output of emerge --info =sys-libs/libcap-ng-0.6.4

This is the output of emerge --info =sys-libs/libcap-ng-0.6.4
Comment 2 Sven Eden 2011-01-31 09:08:35 UTC
Created attachment 261163 [details]
The build log

This is the full build log
Comment 3 Sven Eden 2011-01-31 09:10:30 UTC
Just forgot to mention:

The C(XX)FLAGS in the output of emerge --info are wrong. The package is compiled with "-march=native -O2 -pipe" as stated in the build log.
Comment 4 Matthew Thode ( prometheanfire ) archtester Gentoo Infrastructure gentoo-dev Security 2011-02-01 20:30:55 UTC
Created attachment 261286 [details]
emerge --info for libcap-ng 0.6.4 amd64 hardened
Comment 5 Matthew Thode ( prometheanfire ) archtester Gentoo Infrastructure gentoo-dev Security 2011-02-01 20:34:30 UTC
Created attachment 261287 [details]
libcap-ng 0.6.4 build log

It looks like the same issue.  Are you running a hardened profile Sven?
Comment 6 Doug Goldstein (RETIRED) gentoo-dev 2011-02-01 20:58:05 UTC
The issue is that newer sys-kernel/linux-headers have moved some of the defines around. You're running a ~arch sys-kernel/linux-headers and trying to use stable sys-libs/libcap-ng. You'll need to run an ~arch sys-libs/libcap-ng as well.
Comment 7 Matthew Thode ( prometheanfire ) archtester Gentoo Infrastructure gentoo-dev Security 2011-02-01 21:03:07 UTC
Yep, once downgraded it emerged fine.  Thanks.
Comment 8 Sven Eden 2011-02-07 12:16:13 UTC
(In reply to comment #6)
> The issue is that newer sys-kernel/linux-headers have moved some of the defines
> around. You're running a ~arch sys-kernel/linux-headers and trying to use
> stable sys-libs/libcap-ng. You'll need to run an ~arch sys-libs/libcap-ng as
> well.
> 
Yep, once unkeyworded libcap-ng-0.6.5 emerges fine.

So sys-libs/libcap-ng-0.6.4 should block too recent linux-headers, right?
Comment 9 Peter Volkov (RETIRED) gentoo-dev 2011-05-24 05:44:47 UTC
There is upstream fix(In reply to comment #8)
> Yep, once unkeyworded libcap-ng-0.6.5 emerges fine.
> 
> So sys-libs/libcap-ng-0.6.4 should block too recent linux-headers, right?

libcap-ng-0.6.5 is stable and we don't port changes to older versions (we better drop them and use most up to date sources). In any case thank you for report. This bug was fixed some time ago both in arch and ~arch.