LinuxQuestions.org
Review your favorite Linux distribution.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Software
User Name
Password
Linux - Software This forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.

Notices


Reply
  Search this Thread
Old 01-13-2007, 05:22 AM   #1
bayram
LQ Newbie
 
Registered: Dec 2006
Posts: 3

Rep: Reputation: 0
Question a problem while compiling libcap


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.

Last edited by bayram; 01-13-2007 at 06:36 AM.
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Problem while compiling shinni Programming 1 02-08-2005 12:13 AM
Problem compiling javakid Programming 8 12-16-2004 12:03 AM
Problem compiling Kami.JZ Linux - Newbie 6 10-26-2004 06:28 AM
pppd problem with libcap.so l2g Slackware 0 04-26-2004 05:50 AM
What is libcap, and how can I make sure its installed? bripage Linux - General 2 09-26-2002 12:30 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Software

All times are GMT -5. The time now is 01:05 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration