Opened 10 years ago

Closed 10 years ago

Last modified 10 years ago

#4508 closed enhancement (fixed)

Libcap not found due to missing header

Reported by: Chris Staub Owned by: Igor Živković
Priority: normal Milestone:
Component: BOOK Version: SVN
Severity: normal Keywords:
Cc:

Description

Libcap 2.23 installs /usr/include/sys/capability.h, which contains the line

#include <uapi/linux/capability.h>

That file does exist in Libcap's source, but is not installed. There is a <linux/capability.h>, installed by the linux-headers, which is referred to in the <sys/capability.h> of the previous Libcap version. I'm not sure if the referenced file in the uapi directory should be installed from the Libcap source, or if the include line should be modified to use the one in include/linux instead.

Change History (8)

comment:1 by bdubbs@…, 10 years ago

The kernel has:

./security/apparmor/include/capability.h
./include/uapi/linux/capability.h
./include/linux/capability.h

They are all different, but only the third one is installed, but yes, it calls for #include <uapi/linux/capability.h> also. Checking an older kernel (3.4.1), that include is not there. It looks like the kernel missed that header in the headers_install target in the Makefile.

See also https://bugs.archlinux.org/task/38333

We can fix it in either LFS or BLFS (libcap), but I suspect it will be installed as a part of the kernel headers_install target pretty soon and we then won't need to do anything.

comment:2 by Armin K, 10 years ago

According to the git commit [1], it was supposed to "Get the library to compile again", but reverting the mentioned commit doesn't break the build at all.

I guess you could just revert the commit untill upstream has a better solution.

[1] https://git.kernel.org/cgit/linux/kernel/git/morgan/libcap.git/commit/?id=158b7732f139d12de955026074d594a8d9c84554

comment:4 by Armin K, 10 years ago

But it doesn't completely fix the issue. A sed is required to fix the missing bit.

sed -i "s|uapi/
" libcap/Makefile

comment:5 by Armin K, 10 years ago

sed -i "s|uapi/||" libcap/Makefile

Damn trac formating

comment:6 by Igor Živković, 10 years ago

Owner: changed from blfs-book@… to Igor Živković
Status: newassigned

comment:7 by Igor Živković, 10 years ago

Resolution: fixed
Status: assignedclosed

Fixed at r12512. Thanks for the report and the fix.

comment:8 by bdubbs@…, 10 years ago

Milestone: current

Milestone current deleted

Note: See TracTickets for help on using tickets.