#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 , 11 years ago
comment:2 by , 11 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:3 by , 11 years ago
comment:4 by , 11 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:6 by , 11 years ago
Owner: | changed from | to
---|---|
Status: | new → assigned |
comment:7 by , 11 years ago
Resolution: | → fixed |
---|---|
Status: | assigned → closed |
Fixed at r12512. Thanks for the report and the fix.
The kernel has:
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.