Hello,
My operating system is Linux FC 6.
I downloaded 2.6.16.11 version of Linux kernel, then added patch and compiled the kernel. This patch was supposed to add new capabilities to my kernel. However, to achieve this goal I have to compile libcap.
I downloaded source code of libcal from
www.kernel.org, unpacked it into my home (I logged in as a root) directory and ran make. Unfortunately make halted with error message. Here is outupt:
Code:
[root@localhost libcap-1.10]# make
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 -g -I/home/bayram/libcap-1.10/libcap/include' LD='ld' LIBS='-L/home/bayram/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 `/home/bayram/libcap-1.10/libcap'
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 -g -I/home/bayram/libcap-1.10/libcap/include -s _makenames.c -o _makenames
In file included from _makenames.c:12:
/usr/include/linux/capability.h:17:101: error: linux/compiler.h: No such file or directory
In file included from _makenames.c:12:
/usr/include/linux/capability.h:35: error: expected =, ,, ;, asm or __attribute__ before * token
/usr/include/linux/capability.h:41: error: expected =, ,, ;, asm or __attribute__ before * token
_makenames.c: In function main:
_makenames.c:30: warning: traditional C rejects ISO C style function definitions
_makenames.c:48: warning: traditional C rejects string constant concatenation
_makenames.c:60: warning: traditional C rejects string constant concatenation
make[1]: *** [_makenames] Error 1
make[1]: Leaving directory `/home/bayram/libcap-1.10/libcap'
make: *** [all] Error 2
[root@localhost libcap-1.10]#
Then I copied the file compiler.h to /usr/include/linux/ and ran make. However,make again failed with the following output:
Code:
[root@localhost libcap-1.10]# make
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 -g -I/home/bayram/libcap-1.10/libcap/include' LD='ld' LIBS='-L/home/bayram/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 `/home/bayram/libcap-1.10/libcap'
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 -g -I/home/bayram/libcap-1.10/libcap/include -c cap_sys.c -o cap_sys.o
In file included from cap_sys.c:10:
libcap.h:57:3: warning: suggest hiding #error from traditional C with an indented #
libcap.h:58:3: warning: suggest hiding #error from traditional C with an indented #
libcap.h:101:25: warning: ISO C does not permit named variadic macros
cap_sys.c:14: error: expected declaration specifiers or ... before capget
cap_sys.c:15: error: expected declaration specifiers or ... before header
cap_sys.c:16: error: expected declaration specifiers or ... before data
cap_sys.c:18: warning: return type defaults to int
cap_sys.c:18: warning: no previous prototype for _syscall2
cap_sys.c: In function _syscall2:
cap_sys.c:18: error: expected declaration specifiers before _syscall2
cap_sys.c:20: warning: traditional C rejects ISO C style function definitions
cap_sys.c:14: error: parameter name omitted
cap_sys.c:15: error: parameter name omitted
cap_sys.c:16: error: parameter name omitted
make[1]: *** [cap_sys.o] Error 1
make[1]: Leaving directory `/home/bayram/libcap-1.10/libcap'
make: *** [all] Error 2
[root@localhost libcap-1.10]#
Could anyone help me with this problem?
Thank you in advance.