public inbox for ltp@lists.linux.it
 help / color / mirror / Atom feed
* [LTP] cap_bounds_r.c build failure
@ 2010-04-01  8:13 Mitani
  2010-04-01  8:35 ` Rishikesh K Rajak
  0 siblings, 1 reply; 10+ messages in thread
From: Mitani @ 2010-04-01  8:13 UTC (permalink / raw)
  To: ltp-list

Hi,

I tried to build by using yesterday's git.
 (ltp-dev-02719d6f7e5cb252c0fcbfbaf26208d7196e46f2.tar.gz)
But build failed in "cap_bounds_r.c" with following message.

------------
gcc -g -O2 -g -O2 -fno-strict-aliasing -pipe -Wall
-I/home/LTP/ltp-dev-20100401/testcases/kernel/include -I../../../../include
-I../../../../include   -L../../../../lib  cap_bounds_r.c   -lltp -lcap -o
cap_bounds_r
cap_bounds_r.c: In function `main':
cap_bounds_r.c:46: error: `CAP_LAST_CAP' undeclared (first use in this
function)
cap_bounds_r.c:46: error: (Each undeclared identifier is reported only once
cap_bounds_r.c:46: error: for each function it appears in.)
make[4]: *** [cap_bounds_r] Error 1
------------

I tried to today's git, but it failed, too.
 (ltp-dev-44fba94453ca4f446cde4db08b0a760862b55cfa.tar.gz)


I referd this source's diff in following URL.
http://ltp.git.sourceforge.net/git/gitweb.cgi?p=ltp/ltp-dev.git;a=commitdiff
;h=6e3dd83d9f575d98d76b8b3f642ad6e8793dbdfc

"CAP_LAST_CAP" definition is deleted with other definitions in this 
revision.
But "CAP_LAST_CAP" is still used after edited version.

"The editor may have deleted too much to make this source simple?"
I think. ;-)


There is same problem in "cap_bounds_rw.c", too.


How about following patch?


Signed-off-by: Tomonori Mitani <mitani@ryobi.co.jp>

Index: ./testcases/kernel/security/cap_bound/cap_bounds_r.c
============
--- ./testcases/kernel/security/cap_bound/cap_bounds_r.c        2010-03-31
22:44:52.000000000 +0900
+++ ./testcases/kernel/security/cap_bound/cap_bounds_r.c.new    2010-04-01
15:43:01.000000000 +0900
@@ -32,6 +32,13 @@
 #include <sys/prctl.h>
 #include <test.h>

+#if HAVE_SYS_CAPABILITY_H
+#ifndef CAP_LAST_CAP
+#warning out-of-date capability.h does not define CAP_LAST_CAP
+#define CAP_LAST_CAP 28  /* be ultra-conservative */
+#endif
+#endif
+
 char *TCID = "cap_bounds_r";
 int TST_TOTAL=1;

============

Index: ./testcases/kernel/security/cap_bound/cap_bounds_rw.c
============
--- ./testcases/kernel/security/cap_bound/cap_bounds_rw.c       2010-03-31
22:44:52.000000000 +0900
+++ ./testcases/kernel/security/cap_bound/cap_bounds_rw.c.new   2010-04-01
15:44:39.000000000 +0900
@@ -31,6 +31,13 @@
 #include <sys/prctl.h>
 #include <test.h>

+#if HAVE_SYS_CAPABILITY_H
+#ifndef CAP_LAST_CAP
+#warning out-of-date capability.h does not define CAP_LAST_CAP
+#define CAP_LAST_CAP 28  /* be ultra-conservative */
+#endif
+#endif
+
 char *TCID = "cap_bounds_rw";
 int TST_TOTAL=1;

============


Regards--

-Tomonori Mitani



------------------------------------------------------------------------------
Download Intel&#174; Parallel Studio Eval
Try the new software tools for yourself. Speed compiling, find bugs
proactively, and fine-tune applications for parallel performance.
See why Intel Parallel Studio got high marks during beta.
http://p.sf.net/sfu/intel-sw-dev
_______________________________________________
Ltp-list mailing list
Ltp-list@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/ltp-list

^ permalink raw reply	[flat|nested] 10+ messages in thread

* Re: [LTP] cap_bounds_r.c build failure
  2010-04-01  8:13 [LTP] cap_bounds_r.c build failure Mitani
@ 2010-04-01  8:35 ` Rishikesh K Rajak
  2010-04-01  9:23   ` Mitani
  0 siblings, 1 reply; 10+ messages in thread
From: Rishikesh K Rajak @ 2010-04-01  8:35 UTC (permalink / raw)
  To: Mitani; +Cc: ltp-list

Hi  Mitani,

Can you confirm if you have installed libcap-devel ? As i see this is defined
under linux/capability.h .

#define CAP_MAC_ADMIN        33

#define CAP_LAST_CAP         CAP_MAC_ADMIN

#define cap_valid(x) ((x) >= 0 && (x) <= CAP_LAST_CAP)


Which unltimately is being called by sys/capability.h .


FYI, I did not get any compilation error on SLES11GA where:

libcap2-2.11-2.15
libcap-devel-2.11-2.15

-Rishi


On Thu, Apr 01, 2010 at 05:13:39PM +0900, Mitani wrote:
> Hi,
> 
> I tried to build by using yesterday's git.
>  (ltp-dev-02719d6f7e5cb252c0fcbfbaf26208d7196e46f2.tar.gz)
> But build failed in "cap_bounds_r.c" with following message.
> 
> ------------
> gcc -g -O2 -g -O2 -fno-strict-aliasing -pipe -Wall
> -I/home/LTP/ltp-dev-20100401/testcases/kernel/include -I../../../../include
> -I../../../../include   -L../../../../lib  cap_bounds_r.c   -lltp -lcap -o
> cap_bounds_r
> cap_bounds_r.c: In function `main':
> cap_bounds_r.c:46: error: `CAP_LAST_CAP' undeclared (first use in this
> function)
> cap_bounds_r.c:46: error: (Each undeclared identifier is reported only once
> cap_bounds_r.c:46: error: for each function it appears in.)
> make[4]: *** [cap_bounds_r] Error 1
> ------------
> 
> I tried to today's git, but it failed, too.
>  (ltp-dev-44fba94453ca4f446cde4db08b0a760862b55cfa.tar.gz)
> 
> 
> I referd this source's diff in following URL.
> http://ltp.git.sourceforge.net/git/gitweb.cgi?p=ltp/ltp-dev.git;a=commitdiff
> ;h=6e3dd83d9f575d98d76b8b3f642ad6e8793dbdfc
> 
> "CAP_LAST_CAP" definition is deleted with other definitions in this 
> revision.
> But "CAP_LAST_CAP" is still used after edited version.
> 
> "The editor may have deleted too much to make this source simple?"
> I think. ;-)
> 
> 
> There is same problem in "cap_bounds_rw.c", too.
> 
> 
> How about following patch?
> 
> 
> Signed-off-by: Tomonori Mitani <mitani@ryobi.co.jp>
> 
> Index: ./testcases/kernel/security/cap_bound/cap_bounds_r.c
> ============
> --- ./testcases/kernel/security/cap_bound/cap_bounds_r.c        2010-03-31
> 22:44:52.000000000 +0900
> +++ ./testcases/kernel/security/cap_bound/cap_bounds_r.c.new    2010-04-01
> 15:43:01.000000000 +0900
> @@ -32,6 +32,13 @@
>  #include <sys/prctl.h>
>  #include <test.h>
> 
> +#if HAVE_SYS_CAPABILITY_H
> +#ifndef CAP_LAST_CAP
> +#warning out-of-date capability.h does not define CAP_LAST_CAP
> +#define CAP_LAST_CAP 28  /* be ultra-conservative */
> +#endif
> +#endif
> +
>  char *TCID = "cap_bounds_r";
>  int TST_TOTAL=1;
> 
> ============
> 
> Index: ./testcases/kernel/security/cap_bound/cap_bounds_rw.c
> ============
> --- ./testcases/kernel/security/cap_bound/cap_bounds_rw.c       2010-03-31
> 22:44:52.000000000 +0900
> +++ ./testcases/kernel/security/cap_bound/cap_bounds_rw.c.new   2010-04-01
> 15:44:39.000000000 +0900
> @@ -31,6 +31,13 @@
>  #include <sys/prctl.h>
>  #include <test.h>
> 
> +#if HAVE_SYS_CAPABILITY_H
> +#ifndef CAP_LAST_CAP
> +#warning out-of-date capability.h does not define CAP_LAST_CAP
> +#define CAP_LAST_CAP 28  /* be ultra-conservative */
> +#endif
> +#endif
> +
>  char *TCID = "cap_bounds_rw";
>  int TST_TOTAL=1;
> 
> ============
> 
> 
> Regards--
> 
> -Tomonori Mitani
> 
> 
> 
> ------------------------------------------------------------------------------
> Download Intel&#174; Parallel Studio Eval
> Try the new software tools for yourself. Speed compiling, find bugs
> proactively, and fine-tune applications for parallel performance.
> See why Intel Parallel Studio got high marks during beta.
> http://p.sf.net/sfu/intel-sw-dev
> _______________________________________________
> Ltp-list mailing list
> Ltp-list@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/ltp-list

-- 
Thanks & Regards
Rishi
LTP Maintainer
IBM, LTC, Bangalore
Please join IRC #ltp @ irc.freenode.net

------------------------------------------------------------------------------
Download Intel&#174; Parallel Studio Eval
Try the new software tools for yourself. Speed compiling, find bugs
proactively, and fine-tune applications for parallel performance.
See why Intel Parallel Studio got high marks during beta.
http://p.sf.net/sfu/intel-sw-dev
_______________________________________________
Ltp-list mailing list
Ltp-list@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/ltp-list

^ permalink raw reply	[flat|nested] 10+ messages in thread

* Re: [LTP] cap_bounds_r.c build failure
  2010-04-01  8:35 ` Rishikesh K Rajak
@ 2010-04-01  9:23   ` Mitani
  2010-04-01  9:35     ` Rishikesh K Rajak
  0 siblings, 1 reply; 10+ messages in thread
From: Mitani @ 2010-04-01  9:23 UTC (permalink / raw)
  To: 'Rishikesh K Rajak'; +Cc: ltp-list

Hi Rishi,


"libcap-devel" was not installed in my system.

------------
[root@RHEL4-8 mitani]# rpm -qa | grep libcap
libcap-1.10-20
[root@RHEL4-8 mitani]#
------------

I'm trying to install libcap-devel now.


Thanks--

-Tomonori Mitani

> -----Original Message-----
> From: Rishikesh K Rajak [mailto:risrajak@linux.vnet.ibm.com]
> Sent: Thursday, April 01, 2010 5:35 PM
> To: Mitani
> Cc: ltp-list@lists.sourceforge.net
> Subject: Re: [LTP] cap_bounds_r.c build failure
> 
> Hi  Mitani,
> 
> Can you confirm if you have installed libcap-devel ? As i see this is
> defined
> under linux/capability.h .
> 
> #define CAP_MAC_ADMIN        33
> 
> #define CAP_LAST_CAP         CAP_MAC_ADMIN
> 
> #define cap_valid(x) ((x) >= 0 && (x) <= CAP_LAST_CAP)
> 
> 
> Which unltimately is being called by sys/capability.h .
> 
> 
> FYI, I did not get any compilation error on SLES11GA where:
> 
> libcap2-2.11-2.15
> libcap-devel-2.11-2.15
> 
> -Rishi
> 
> 
> On Thu, Apr 01, 2010 at 05:13:39PM +0900, Mitani wrote:
> > Hi,
> >
> > I tried to build by using yesterday's git.
> >  (ltp-dev-02719d6f7e5cb252c0fcbfbaf26208d7196e46f2.tar.gz)
> > But build failed in "cap_bounds_r.c" with following message.
> >
> > ------------
> > gcc -g -O2 -g -O2 -fno-strict-aliasing -pipe -Wall
> > -I/home/LTP/ltp-dev-20100401/testcases/kernel/include
> -I../../../../include
> > -I../../../../include   -L../../../../lib  cap_bounds_r.c
> -lltp -lcap -o
> > cap_bounds_r
> > cap_bounds_r.c: In function `main':
> > cap_bounds_r.c:46: error: `CAP_LAST_CAP' undeclared (first use in
> this
> > function)
> > cap_bounds_r.c:46: error: (Each undeclared identifier is reported
> only once
> > cap_bounds_r.c:46: error: for each function it appears in.)
> > make[4]: *** [cap_bounds_r] Error 1
> > ------------
> >
> > I tried to today's git, but it failed, too.
> >  (ltp-dev-44fba94453ca4f446cde4db08b0a760862b55cfa.tar.gz)
> >
> >
> > I referd this source's diff in following URL.
> >
> http://ltp.git.sourceforge.net/git/gitweb.cgi?p=ltp/ltp-dev.git;a=
> commitdiff
> > ;h=6e3dd83d9f575d98d76b8b3f642ad6e8793dbdfc
> >
> > "CAP_LAST_CAP" definition is deleted with other definitions in this
> > revision.
> > But "CAP_LAST_CAP" is still used after edited version.
> >
> > "The editor may have deleted too much to make this source simple?"
> > I think. ;-)
> >
> >
> > There is same problem in "cap_bounds_rw.c", too.
> >
> >
> > How about following patch?
> >
> >
> > Signed-off-by: Tomonori Mitani <mitani@ryobi.co.jp>
> >
> > Index: ./testcases/kernel/security/cap_bound/cap_bounds_r.c
> > ============
> > --- ./testcases/kernel/security/cap_bound/cap_bounds_r.c
> 2010-03-31
> > 22:44:52.000000000 +0900
> > +++ ./testcases/kernel/security/cap_bound/cap_bounds_r.c.new
> 2010-04-01
> > 15:43:01.000000000 +0900
> > @@ -32,6 +32,13 @@
> >  #include <sys/prctl.h>
> >  #include <test.h>
> >
> > +#if HAVE_SYS_CAPABILITY_H
> > +#ifndef CAP_LAST_CAP
> > +#warning out-of-date capability.h does not define CAP_LAST_CAP
> > +#define CAP_LAST_CAP 28  /* be ultra-conservative */
> > +#endif
> > +#endif
> > +
> >  char *TCID = "cap_bounds_r";
> >  int TST_TOTAL=1;
> >
> > ============
> >
> > Index: ./testcases/kernel/security/cap_bound/cap_bounds_rw.c
> > ============
> > --- ./testcases/kernel/security/cap_bound/cap_bounds_rw.c
> 2010-03-31
> > 22:44:52.000000000 +0900
> > +++ ./testcases/kernel/security/cap_bound/cap_bounds_rw.c.new
> 2010-04-01
> > 15:44:39.000000000 +0900
> > @@ -31,6 +31,13 @@
> >  #include <sys/prctl.h>
> >  #include <test.h>
> >
> > +#if HAVE_SYS_CAPABILITY_H
> > +#ifndef CAP_LAST_CAP
> > +#warning out-of-date capability.h does not define CAP_LAST_CAP
> > +#define CAP_LAST_CAP 28  /* be ultra-conservative */
> > +#endif
> > +#endif
> > +
> >  char *TCID = "cap_bounds_rw";
> >  int TST_TOTAL=1;
> >
> > ============
> >
> >
> > Regards--
> >
> > -Tomonori Mitani
> >
> >
> >
> >
> ------------------------------------------------------------------
> ------------
> > Download Intel&#174; Parallel Studio Eval
> > Try the new software tools for yourself. Speed compiling, find bugs
> > proactively, and fine-tune applications for parallel performance.
> > See why Intel Parallel Studio got high marks during beta.
> > http://p.sf.net/sfu/intel-sw-dev
> > _______________________________________________
> > Ltp-list mailing list
> > Ltp-list@lists.sourceforge.net
> > https://lists.sourceforge.net/lists/listinfo/ltp-list
> 
> --
> Thanks & Regards
> Rishi
> LTP Maintainer
> IBM, LTC, Bangalore
> Please join IRC #ltp @ irc.freenode.net



------------------------------------------------------------------------------
Download Intel&#174; Parallel Studio Eval
Try the new software tools for yourself. Speed compiling, find bugs
proactively, and fine-tune applications for parallel performance.
See why Intel Parallel Studio got high marks during beta.
http://p.sf.net/sfu/intel-sw-dev
_______________________________________________
Ltp-list mailing list
Ltp-list@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/ltp-list

^ permalink raw reply	[flat|nested] 10+ messages in thread

* Re: [LTP] cap_bounds_r.c build failure
  2010-04-01  9:23   ` Mitani
@ 2010-04-01  9:35     ` Rishikesh K Rajak
  2010-04-01 11:24       ` Mitani
  0 siblings, 1 reply; 10+ messages in thread
From: Rishikesh K Rajak @ 2010-04-01  9:35 UTC (permalink / raw)
  To: Mitani; +Cc: ltp-list

On Thu, Apr 01, 2010 at 06:23:03PM +0900, Mitani wrote:
> Hi Rishi,
> 
> 
> "libcap-devel" was not installed in my system.
> 
> ------------
> [root@RHEL4-8 mitani]# rpm -qa | grep libcap
> libcap-1.10-20
> [root@RHEL4-8 mitani]#
> ------------
> 
> I'm trying to install libcap-devel now.

Ok, make sure you configure once again the source code after installing libcap-devel rpm.

-Rishi
> 
> 
> Thanks--
> 
> -Tomonori Mitani
> 
> > -----Original Message-----
> > From: Rishikesh K Rajak [mailto:risrajak@linux.vnet.ibm.com]
> > Sent: Thursday, April 01, 2010 5:35 PM
> > To: Mitani
> > Cc: ltp-list@lists.sourceforge.net
> > Subject: Re: [LTP] cap_bounds_r.c build failure
> > 
> > Hi  Mitani,
> > 
> > Can you confirm if you have installed libcap-devel ? As i see this is
> > defined
> > under linux/capability.h .
> > 
> > #define CAP_MAC_ADMIN        33
> > 
> > #define CAP_LAST_CAP         CAP_MAC_ADMIN
> > 
> > #define cap_valid(x) ((x) >= 0 && (x) <= CAP_LAST_CAP)
> > 
> > 
> > Which unltimately is being called by sys/capability.h .
> > 
> > 
> > FYI, I did not get any compilation error on SLES11GA where:
> > 
> > libcap2-2.11-2.15
> > libcap-devel-2.11-2.15
> > 
> > -Rishi
> > 
> > 
> > On Thu, Apr 01, 2010 at 05:13:39PM +0900, Mitani wrote:
> > > Hi,
> > >
> > > I tried to build by using yesterday's git.
> > >  (ltp-dev-02719d6f7e5cb252c0fcbfbaf26208d7196e46f2.tar.gz)
> > > But build failed in "cap_bounds_r.c" with following message.
> > >
> > > ------------
> > > gcc -g -O2 -g -O2 -fno-strict-aliasing -pipe -Wall
> > > -I/home/LTP/ltp-dev-20100401/testcases/kernel/include
> > -I../../../../include
> > > -I../../../../include   -L../../../../lib  cap_bounds_r.c
> > -lltp -lcap -o
> > > cap_bounds_r
> > > cap_bounds_r.c: In function `main':
> > > cap_bounds_r.c:46: error: `CAP_LAST_CAP' undeclared (first use in
> > this
> > > function)
> > > cap_bounds_r.c:46: error: (Each undeclared identifier is reported
> > only once
> > > cap_bounds_r.c:46: error: for each function it appears in.)
> > > make[4]: *** [cap_bounds_r] Error 1
> > > ------------
> > >
> > > I tried to today's git, but it failed, too.
> > >  (ltp-dev-44fba94453ca4f446cde4db08b0a760862b55cfa.tar.gz)
> > >
> > >
> > > I referd this source's diff in following URL.
> > >
> > http://ltp.git.sourceforge.net/git/gitweb.cgi?p=ltp/ltp-dev.git;a=
> > commitdiff
> > > ;h=6e3dd83d9f575d98d76b8b3f642ad6e8793dbdfc
> > >
> > > "CAP_LAST_CAP" definition is deleted with other definitions in this
> > > revision.
> > > But "CAP_LAST_CAP" is still used after edited version.
> > >
> > > "The editor may have deleted too much to make this source simple?"
> > > I think. ;-)
> > >
> > >
> > > There is same problem in "cap_bounds_rw.c", too.
> > >
> > >
> > > How about following patch?
> > >
> > >
> > > Signed-off-by: Tomonori Mitani <mitani@ryobi.co.jp>
> > >
> > > Index: ./testcases/kernel/security/cap_bound/cap_bounds_r.c
> > > ============
> > > --- ./testcases/kernel/security/cap_bound/cap_bounds_r.c
> > 2010-03-31
> > > 22:44:52.000000000 +0900
> > > +++ ./testcases/kernel/security/cap_bound/cap_bounds_r.c.new
> > 2010-04-01
> > > 15:43:01.000000000 +0900
> > > @@ -32,6 +32,13 @@
> > >  #include <sys/prctl.h>
> > >  #include <test.h>
> > >
> > > +#if HAVE_SYS_CAPABILITY_H
> > > +#ifndef CAP_LAST_CAP
> > > +#warning out-of-date capability.h does not define CAP_LAST_CAP
> > > +#define CAP_LAST_CAP 28  /* be ultra-conservative */
> > > +#endif
> > > +#endif
> > > +
> > >  char *TCID = "cap_bounds_r";
> > >  int TST_TOTAL=1;
> > >
> > > ============
> > >
> > > Index: ./testcases/kernel/security/cap_bound/cap_bounds_rw.c
> > > ============
> > > --- ./testcases/kernel/security/cap_bound/cap_bounds_rw.c
> > 2010-03-31
> > > 22:44:52.000000000 +0900
> > > +++ ./testcases/kernel/security/cap_bound/cap_bounds_rw.c.new
> > 2010-04-01
> > > 15:44:39.000000000 +0900
> > > @@ -31,6 +31,13 @@
> > >  #include <sys/prctl.h>
> > >  #include <test.h>
> > >
> > > +#if HAVE_SYS_CAPABILITY_H
> > > +#ifndef CAP_LAST_CAP
> > > +#warning out-of-date capability.h does not define CAP_LAST_CAP
> > > +#define CAP_LAST_CAP 28  /* be ultra-conservative */
> > > +#endif
> > > +#endif
> > > +
> > >  char *TCID = "cap_bounds_rw";
> > >  int TST_TOTAL=1;
> > >
> > > ============
> > >
> > >
> > > Regards--
> > >
> > > -Tomonori Mitani
> > >
> > >
> > >
> > >
> > ------------------------------------------------------------------
> > ------------
> > > Download Intel&#174; Parallel Studio Eval
> > > Try the new software tools for yourself. Speed compiling, find bugs
> > > proactively, and fine-tune applications for parallel performance.
> > > See why Intel Parallel Studio got high marks during beta.
> > > http://p.sf.net/sfu/intel-sw-dev
> > > _______________________________________________
> > > Ltp-list mailing list
> > > Ltp-list@lists.sourceforge.net
> > > https://lists.sourceforge.net/lists/listinfo/ltp-list
> > 
> > --
> > Thanks & Regards
> > Rishi
> > LTP Maintainer
> > IBM, LTC, Bangalore
> > Please join IRC #ltp @ irc.freenode.net
> 

-- 
Thanks & Regards
Rishi
LTP Maintainer
IBM, LTC, Bangalore
Please join IRC #ltp @ irc.freenode.net

------------------------------------------------------------------------------
Download Intel&#174; Parallel Studio Eval
Try the new software tools for yourself. Speed compiling, find bugs
proactively, and fine-tune applications for parallel performance.
See why Intel Parallel Studio got high marks during beta.
http://p.sf.net/sfu/intel-sw-dev
_______________________________________________
Ltp-list mailing list
Ltp-list@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/ltp-list

^ permalink raw reply	[flat|nested] 10+ messages in thread

* Re: [LTP] cap_bounds_r.c build failure
  2010-04-01  9:35     ` Rishikesh K Rajak
@ 2010-04-01 11:24       ` Mitani
  2010-04-01 15:26         ` Serge E. Hallyn
  0 siblings, 1 reply; 10+ messages in thread
From: Mitani @ 2010-04-01 11:24 UTC (permalink / raw)
  To: 'Rishikesh K Rajak'; +Cc: ltp-list

Hi Rishi,

I installed "libcap-devel", but after configure, build failed, too.

------------
[root@RHEL4-8 mitani]# rpm -qa | grep libcap
libcap-devel-1.10-20
libcap-1.10-20
[root@RHEL4-8 mitani]#
------------

"libcap-1.10-20" version is normal version in my system (RHEL4.8 
2.6.9-89.ELsmp).
In this version, capability.h doesn't have CAP_LAST_CAP definition.
I try to upgrade version "2.11".


Thanks--

-Tomonori Mitani


> -----Original Message-----
> From: Rishikesh K Rajak [mailto:risrajak@linux.vnet.ibm.com]
> Sent: Thursday, April 01, 2010 6:35 PM
> To: Mitani
> Cc: ltp-list@lists.sourceforge.net
> Subject: Re: [LTP] cap_bounds_r.c build failure
> 
> On Thu, Apr 01, 2010 at 06:23:03PM +0900, Mitani wrote:
> > Hi Rishi,
> >
> >
> > "libcap-devel" was not installed in my system.
> >
> > ------------
> > [root@RHEL4-8 mitani]# rpm -qa | grep libcap
> > libcap-1.10-20
> > [root@RHEL4-8 mitani]#
> > ------------
> >
> > I'm trying to install libcap-devel now.
> 
> Ok, make sure you configure once again the source code after installing
> libcap-devel rpm.
> 
> -Rishi
> >
> >
> > Thanks--
> >
> > -Tomonori Mitani
> >
> > > -----Original Message-----
> > > From: Rishikesh K Rajak [mailto:risrajak@linux.vnet.ibm.com]
> > > Sent: Thursday, April 01, 2010 5:35 PM
> > > To: Mitani
> > > Cc: ltp-list@lists.sourceforge.net
> > > Subject: Re: [LTP] cap_bounds_r.c build failure
> > >
> > > Hi  Mitani,
> > >
> > > Can you confirm if you have installed libcap-devel ? As i see this
> is
> > > defined
> > > under linux/capability.h .
> > >
> > > #define CAP_MAC_ADMIN        33
> > >
> > > #define CAP_LAST_CAP         CAP_MAC_ADMIN
> > >
> > > #define cap_valid(x) ((x) >= 0 && (x) <= CAP_LAST_CAP)
> > >
> > >
> > > Which unltimately is being called by sys/capability.h .
> > >
> > >
> > > FYI, I did not get any compilation error on SLES11GA where:
> > >
> > > libcap2-2.11-2.15
> > > libcap-devel-2.11-2.15
> > >
> > > -Rishi
> > >
> > >
> > > On Thu, Apr 01, 2010 at 05:13:39PM +0900, Mitani wrote:
> > > > Hi,
> > > >
> > > > I tried to build by using yesterday's git.
> > > >  (ltp-dev-02719d6f7e5cb252c0fcbfbaf26208d7196e46f2.tar.gz)
> > > > But build failed in "cap_bounds_r.c" with following message.
> > > >
> > > > ------------
> > > > gcc -g -O2 -g -O2 -fno-strict-aliasing -pipe -Wall
> > > > -I/home/LTP/ltp-dev-20100401/testcases/kernel/include
> > > -I../../../../include
> > > > -I../../../../include   -L../../../../lib  cap_bounds_r.c
> > > -lltp -lcap -o
> > > > cap_bounds_r
> > > > cap_bounds_r.c: In function `main':
> > > > cap_bounds_r.c:46: error: `CAP_LAST_CAP' undeclared (first use
> in
> > > this
> > > > function)
> > > > cap_bounds_r.c:46: error: (Each undeclared identifier is
> reported
> > > only once
> > > > cap_bounds_r.c:46: error: for each function it appears in.)
> > > > make[4]: *** [cap_bounds_r] Error 1
> > > > ------------
> > > >
> > > > I tried to today's git, but it failed, too.
> > > >  (ltp-dev-44fba94453ca4f446cde4db08b0a760862b55cfa.tar.gz)
> > > >
> > > >
> > > > I referd this source's diff in following URL.
> > > >
> > >
> http://ltp.git.sourceforge.net/git/gitweb.cgi?p=ltp/ltp-dev.git;a=
> > > commitdiff
> > > > ;h=6e3dd83d9f575d98d76b8b3f642ad6e8793dbdfc
> > > >
> > > > "CAP_LAST_CAP" definition is deleted with other definitions in
> this
> > > > revision.
> > > > But "CAP_LAST_CAP" is still used after edited version.
> > > >
> > > > "The editor may have deleted too much to make this source simple?"
> > > > I think. ;-)
> > > >
> > > >
> > > > There is same problem in "cap_bounds_rw.c", too.
> > > >
> > > >
> > > > How about following patch?
> > > >
> > > >
> > > > Signed-off-by: Tomonori Mitani <mitani@ryobi.co.jp>
> > > >
> > > > Index: ./testcases/kernel/security/cap_bound/cap_bounds_r.c
> > > > ============
> > > > --- ./testcases/kernel/security/cap_bound/cap_bounds_r.c
> > > 2010-03-31
> > > > 22:44:52.000000000 +0900
> > > > +++ ./testcases/kernel/security/cap_bound/cap_bounds_r.c.new
> > > 2010-04-01
> > > > 15:43:01.000000000 +0900
> > > > @@ -32,6 +32,13 @@
> > > >  #include <sys/prctl.h>
> > > >  #include <test.h>
> > > >
> > > > +#if HAVE_SYS_CAPABILITY_H
> > > > +#ifndef CAP_LAST_CAP
> > > > +#warning out-of-date capability.h does not define CAP_LAST_CAP
> > > > +#define CAP_LAST_CAP 28  /* be ultra-conservative */
> > > > +#endif
> > > > +#endif
> > > > +
> > > >  char *TCID = "cap_bounds_r";
> > > >  int TST_TOTAL=1;
> > > >
> > > > ============
> > > >
> > > > Index: ./testcases/kernel/security/cap_bound/cap_bounds_rw.c
> > > > ============
> > > > --- ./testcases/kernel/security/cap_bound/cap_bounds_rw.c
> > > 2010-03-31
> > > > 22:44:52.000000000 +0900
> > > > +++ ./testcases/kernel/security/cap_bound/cap_bounds_rw.c.new
> > > 2010-04-01
> > > > 15:44:39.000000000 +0900
> > > > @@ -31,6 +31,13 @@
> > > >  #include <sys/prctl.h>
> > > >  #include <test.h>
> > > >
> > > > +#if HAVE_SYS_CAPABILITY_H
> > > > +#ifndef CAP_LAST_CAP
> > > > +#warning out-of-date capability.h does not define CAP_LAST_CAP
> > > > +#define CAP_LAST_CAP 28  /* be ultra-conservative */
> > > > +#endif
> > > > +#endif
> > > > +
> > > >  char *TCID = "cap_bounds_rw";
> > > >  int TST_TOTAL=1;
> > > >
> > > > ============
> > > >
> > > >
> > > > Regards--
> > > >
> > > > -Tomonori Mitani
> > > >
> > > >
> > > >
> > > >
> > >
> ------------------------------------------------------------------
> > > ------------
> > > > Download Intel&#174; Parallel Studio Eval
> > > > Try the new software tools for yourself. Speed compiling, find
> bugs
> > > > proactively, and fine-tune applications for parallel
> performance.
> > > > See why Intel Parallel Studio got high marks during beta.
> > > > http://p.sf.net/sfu/intel-sw-dev
> > > > _______________________________________________
> > > > Ltp-list mailing list
> > > > Ltp-list@lists.sourceforge.net
> > > > https://lists.sourceforge.net/lists/listinfo/ltp-list
> > >
> > > --
> > > Thanks & Regards
> > > Rishi
> > > LTP Maintainer
> > > IBM, LTC, Bangalore
> > > Please join IRC #ltp @ irc.freenode.net
> >
> 
> --
> Thanks & Regards
> Rishi
> LTP Maintainer
> IBM, LTC, Bangalore
> Please join IRC #ltp @ irc.freenode.net



------------------------------------------------------------------------------
Download Intel&#174; Parallel Studio Eval
Try the new software tools for yourself. Speed compiling, find bugs
proactively, and fine-tune applications for parallel performance.
See why Intel Parallel Studio got high marks during beta.
http://p.sf.net/sfu/intel-sw-dev
_______________________________________________
Ltp-list mailing list
Ltp-list@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/ltp-list

^ permalink raw reply	[flat|nested] 10+ messages in thread

* Re: [LTP] cap_bounds_r.c build failure
  2010-04-01 11:24       ` Mitani
@ 2010-04-01 15:26         ` Serge E. Hallyn
  2010-04-02  2:20           ` Mitani
  0 siblings, 1 reply; 10+ messages in thread
From: Serge E. Hallyn @ 2010-04-01 15:26 UTC (permalink / raw)
  To: Mitani; +Cc: ltp-list

Quoting Mitani (mitani@ryobi.co.jp):
> Hi Rishi,
> 
> I installed "libcap-devel", but after configure, build failed, too.
> 
> ------------
> [root@RHEL4-8 mitani]# rpm -qa | grep libcap
> libcap-devel-1.10-20
> libcap-1.10-20
> [root@RHEL4-8 mitani]#
> ------------
> 
> "libcap-1.10-20" version is normal version in my system (RHEL4.8 
> 2.6.9-89.ELsmp).
> In this version, capability.h doesn't have CAP_LAST_CAP definition.
> I try to upgrade version "2.11".

Yeah, you need libcap2 for these tests.  I guess we could stand
to add a rule to m4/ltp-cap.m4 to check for the existance of
libcap.so.2.X, X > oh say 12.

-serge

------------------------------------------------------------------------------
Download Intel&#174; Parallel Studio Eval
Try the new software tools for yourself. Speed compiling, find bugs
proactively, and fine-tune applications for parallel performance.
See why Intel Parallel Studio got high marks during beta.
http://p.sf.net/sfu/intel-sw-dev
_______________________________________________
Ltp-list mailing list
Ltp-list@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/ltp-list

^ permalink raw reply	[flat|nested] 10+ messages in thread

* Re: [LTP] cap_bounds_r.c build failure
  2010-04-01 15:26         ` Serge E. Hallyn
@ 2010-04-02  2:20           ` Mitani
  2010-04-05 13:20             ` Serge E. Hallyn
  0 siblings, 1 reply; 10+ messages in thread
From: Mitani @ 2010-04-02  2:20 UTC (permalink / raw)
  To: 'Serge E. Hallyn', Rishikesh K Rajak; +Cc: ltp-list

Hi,


I tired to upgrade "libcap" from "libcap-1.0-20" to "libcap-2.11".
My system is RHEL4.8 (x86) and kernel version is 2.6.9-89.ELsmp.

I downloaded "libcap-2.11.tar.gz" from following URL :
ftp://ftp.kernel.org/pub/linux/libs/security/linux-privs/libcap2

I extended it, and I confirmed that there are ".../libcap/include/
linux/capability.h" and ".../libcap/include/sys/capability.h" .
".../libcap/include/linux/capability.h" has "CAP_LAST_CAP" definition.

I did "make" and "make install".
But "/usr/include/linux/capability.h" was not changed.

the "README" of "libcap-2.11" shows follows:
------------
# INSTALLATION

        Linux-Caps % make

                builds the library and the programs

        Linux-Caps % make install

                installs the library libcap.XX.Y in /lib/
                the binaries in /sbin/
                the <sys/capability.h> file in /usr/include
------------
It doesn't mention about "/usr/include/linux/capability.h" .
In fact, "/usr/include/sys/capability.h" was replaced, but 
"/usr/include/linux/capability.h" was not.


I checked where <linux/capability.h> came from, and knew that 
"/usr/include/linux/capability.h" is from "glibc-kernheaders" :
------------
[root@RHEL4-8 cap_bound]# rpm -qf /usr/include/linux/capability.h
glibc-kernheaders-2.4-9.1.103.EL
[root@RHEL4-8 cap_bound]#
------------


There are two ways to upgrade "/usr/include/linux/capability.h" in
RHEL system, I think.
1) Upgrade "glibc-kernheaders".
2) Replace manually "/usr/include/sys/capability.h" with 
   "linux/capability.h" of "libcap-2.11".

1) "glibc-kernheaders" is referenced from many modules of kernel.
   If I want to upgrade "glibc-kernheaders", kernel upgrade is needed, 
   I think.
   It deviates from an original purpose (I want to test RHEL4.8 system).
2) Manually replace is not an original way and it is dangerous.


First of all, I replaced manually "/usr/include/linux/capability.h" .
And I succeeded to build "cap_bounds_r.c" and "cap_bounds_r.c".


But upgrading "libcap" in RHEL system still includes the above 
problems, I think


------
After this, another build failed.
But it is different from above problems, I think.
Therfore, I will report it another thread.


Regards--

-Tomonori Mitani

> -----Original Message-----
> From: Serge E. Hallyn [mailto:serue@us.ibm.com]
> Sent: Friday, April 02, 2010 12:27 AM
> To: Mitani
> Cc: 'Rishikesh K Rajak'; ltp-list@lists.sourceforge.net
> Subject: Re: [LTP] cap_bounds_r.c build failure
> 
> Quoting Mitani (mitani@ryobi.co.jp):
> > Hi Rishi,
> >
> > I installed "libcap-devel", but after configure, build failed, too.
> >
> > ------------
> > [root@RHEL4-8 mitani]# rpm -qa | grep libcap
> > libcap-devel-1.10-20
> > libcap-1.10-20
> > [root@RHEL4-8 mitani]#
> > ------------
> >
> > "libcap-1.10-20" version is normal version in my system (RHEL4.8
> > 2.6.9-89.ELsmp).
> > In this version, capability.h doesn't have CAP_LAST_CAP definition.
> > I try to upgrade version "2.11".
> 
> Yeah, you need libcap2 for these tests.  I guess we could stand
> to add a rule to m4/ltp-cap.m4 to check for the existance of
> libcap.so.2.X, X > oh say 12.
> 
> -serge



------------------------------------------------------------------------------
Download Intel&#174; Parallel Studio Eval
Try the new software tools for yourself. Speed compiling, find bugs
proactively, and fine-tune applications for parallel performance.
See why Intel Parallel Studio got high marks during beta.
http://p.sf.net/sfu/intel-sw-dev
_______________________________________________
Ltp-list mailing list
Ltp-list@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/ltp-list

^ permalink raw reply	[flat|nested] 10+ messages in thread

* Re: [LTP] cap_bounds_r.c build failure
  2010-04-02  2:20           ` Mitani
@ 2010-04-05 13:20             ` Serge E. Hallyn
  2010-04-09  7:49               ` Mitani
  0 siblings, 1 reply; 10+ messages in thread
From: Serge E. Hallyn @ 2010-04-05 13:20 UTC (permalink / raw)
  To: Mitani; +Cc: ltp-list, Andrew Morgan

Quoting Mitani (mitani@ryobi.co.jp):
> Hi,
> 
> 
> I tired to upgrade "libcap" from "libcap-1.0-20" to "libcap-2.11".
> My system is RHEL4.8 (x86) and kernel version is 2.6.9-89.ELsmp.

Oh, I'm sorry, I misunderstood from the first.  I thought you wanted
to test a modern kernel on an older distro.  So the real problem in
your original email wasn't that cap_bounds_r.c wouldn't compile, but
that it tried to compile.

Maybe the attached ltp patch will do a better job of not trying
to compile.  Though I'm not sure what is the best way to detect
both 64-bit caps in kernel and libcap2 userspace.

-serge

Date: Mon, 5 Apr 2010 08:17:46 -0500
Subject: [PATCH ltp] don't compile cap_bounds on older systems

Only define HAVE_LIBCAP for libcap2 and 64-bit caps.

Signed-off-by: Serge Hallyn <serue@us.ibm.com>
---
 m4/ltp-cap.m4 |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/m4/ltp-cap.m4 b/m4/ltp-cap.m4
index caa436f..6248ff3 100644
--- a/m4/ltp-cap.m4
+++ b/m4/ltp-cap.m4
@@ -27,7 +27,7 @@ AH_TEMPLATE(HAVE_LIBCAP,
 [Define to 1 if you have libcap-2 installed.])
 AC_CHECK_HEADERS(sys/capability.h,[
 	LTP_CAPABILITY_SUPPORT=yes
-	AC_CHECK_LIB(cap,cap_compare,[AC_DEFINE(HAVE_LIBCAP) CAP_LIBS="-lcap"], [CAP_LIBS=""])
+	AC_CHECK_DECL(VFS_CAP_REVISION_2,[AC_DEFINE(HAVE_LIBCAP) CAP_LIBS="-lcap"],[CAP_LIBS=""],[#include "linux/capability.h"])
 	AC_CHECK_PROG(HAVE_SETCAP,setcap,setcap,false)
 ])]
 AC_SUBST(CAP_LIBS)
-- 
1.6.3.3


------------------------------------------------------------------------------
Download Intel&#174; Parallel Studio Eval
Try the new software tools for yourself. Speed compiling, find bugs
proactively, and fine-tune applications for parallel performance.
See why Intel Parallel Studio got high marks during beta.
http://p.sf.net/sfu/intel-sw-dev
_______________________________________________
Ltp-list mailing list
Ltp-list@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/ltp-list

^ permalink raw reply related	[flat|nested] 10+ messages in thread

* Re: [LTP] cap_bounds_r.c build failure
  2010-04-05 13:20             ` Serge E. Hallyn
@ 2010-04-09  7:49               ` Mitani
  2010-04-16 18:39                 ` Garrett Cooper
  0 siblings, 1 reply; 10+ messages in thread
From: Mitani @ 2010-04-09  7:49 UTC (permalink / raw)
  To: 'Serge E. Hallyn'; +Cc: ltp-list

Hi,

Thank you for your help.

I tried to "make" with Serge's patch in my system.
But, sorry, it failed.


---

I did with following procedure:

1) I did "make" and "make install" of "libcap-2.11" .

2) I confirmed about following files.
------------
[root@RHEL4-8 include]# pwd
/usr/include
[root@RHEL4-8 include]# ls -l sys/capability.h
-rw-r--r--  1 root root 3345 Apr  9 15:44 sys/capability.h
[root@RHEL4-8 include]# ls -l linux/capability.h
-rw-r--r--  1 root root 8273 May 14  2008 linux/capability.h
[root@RHEL4-8 include]#
------------
"sys/capability.h" replased by "libcap-2.11" .

3) I applied patch to "m4/ltp-cap.m4", and confirmed it.
------------
...
AC_DEFUN([LTP_CHECK_CAPABILITY_SUPPORT],[
AH_TEMPLATE(HAVE_LIBCAP,
[Define to 1 if you have libcap-2 installed.])
AC_CHECK_HEADERS(sys/capability.h,[
        LTP_CAPABILITY_SUPPORT=yes
        AC_CHECK_DECL(VFS_CAP_REVISION_2,[AC_DEFINE(HAVE_LIBCAP)
CAP_LIBS="-lcap"],[CAP_LIBS=""],[#include "linux/capability.h"])
        AC_CHECK_PROG(HAVE_SETCAP,setcap,setcap,false)
])]
AC_SUBST(CAP_LIBS)
)
------------

4) I did "./configure", and confirmed "configure.log" .
------------
...
| #define HAVE_SYS_CAPABILITY_H 1
| #define HAVE_LIBCAP 1
| #define HAVE_SYS_PRCTL_H 1
| #define HAVE_DECL_PR_CAPBSET_DROP 0
| #define HAVE_DECL_PR_CAPBSET_READ 0
...
------------
"HAVE_LIBCAP" define was ON.

5) I tried to "make", but it failed as foliows.
------------
cap_bounds_r.c: In function `main':
cap_bounds_r.c:46: error: `CAP_LAST_CAP' undeclared (first use in this
function)
cap_bounds_r.c:46: error: (Each undeclared identifier is reported only once
cap_bounds_r.c:46: error: for each function it appears in.)
make[4]: *** [cap_bounds_r] Error 1
------------


I don't know about configure well, and I examine it.


Thank you--

-Tomonori Mitani


> -----Original Message-----
> From: Serge E. Hallyn [mailto:serue@us.ibm.com]
> Sent: Monday, April 05, 2010 10:20 PM
> To: Mitani
> Cc: Rishikesh K Rajak; Andrew Morgan; Garrett Cooper;
> ltp-list@lists.sourceforge.net
> Subject: Re: [LTP] cap_bounds_r.c build failure
> 
> Quoting Mitani (mitani@ryobi.co.jp):
> > Hi,
> >
> >
> > I tired to upgrade "libcap" from "libcap-1.0-20" to "libcap-2.11".
> > My system is RHEL4.8 (x86) and kernel version is 2.6.9-89.ELsmp.
> 
> Oh, I'm sorry, I misunderstood from the first.  I thought you wanted
> to test a modern kernel on an older distro.  So the real problem in
> your original email wasn't that cap_bounds_r.c wouldn't compile, but
> that it tried to compile.
> 
> Maybe the attached ltp patch will do a better job of not trying
> to compile.  Though I'm not sure what is the best way to detect
> both 64-bit caps in kernel and libcap2 userspace.
> 
> -serge
> 
> Date: Mon, 5 Apr 2010 08:17:46 -0500
> Subject: [PATCH ltp] don't compile cap_bounds on older systems
> 
> Only define HAVE_LIBCAP for libcap2 and 64-bit caps.
> 
> Signed-off-by: Serge Hallyn <serue@us.ibm.com>
> ---
>  m4/ltp-cap.m4 |    2 +-
>  1 files changed, 1 insertions(+), 1 deletions(-)
> 
> diff --git a/m4/ltp-cap.m4 b/m4/ltp-cap.m4
> index caa436f..6248ff3 100644
> --- a/m4/ltp-cap.m4
> +++ b/m4/ltp-cap.m4
> @@ -27,7 +27,7 @@ AH_TEMPLATE(HAVE_LIBCAP,
>  [Define to 1 if you have libcap-2 installed.])
>  AC_CHECK_HEADERS(sys/capability.h,[
>  	LTP_CAPABILITY_SUPPORT=yes
> -	AC_CHECK_LIB(cap,cap_compare,[AC_DEFINE(HAVE_LIBCAP)
> CAP_LIBS="-lcap"], [CAP_LIBS=""])
> +	AC_CHECK_DECL(VFS_CAP_REVISION_2,[AC_DEFINE(HAVE_LIBCAP)
> CAP_LIBS="-lcap"],[CAP_LIBS=""],[#include "linux/capability.h"])
>  	AC_CHECK_PROG(HAVE_SETCAP,setcap,setcap,false)
>  ])]
>  AC_SUBST(CAP_LIBS)
> --
> 1.6.3.3



------------------------------------------------------------------------------
Download Intel&#174; Parallel Studio Eval
Try the new software tools for yourself. Speed compiling, find bugs
proactively, and fine-tune applications for parallel performance.
See why Intel Parallel Studio got high marks during beta.
http://p.sf.net/sfu/intel-sw-dev
_______________________________________________
Ltp-list mailing list
Ltp-list@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/ltp-list

^ permalink raw reply	[flat|nested] 10+ messages in thread

* Re: [LTP] cap_bounds_r.c build failure
  2010-04-09  7:49               ` Mitani
@ 2010-04-16 18:39                 ` Garrett Cooper
  0 siblings, 0 replies; 10+ messages in thread
From: Garrett Cooper @ 2010-04-16 18:39 UTC (permalink / raw)
  To: Mitani; +Cc: ltp-list

On Apr 9, 2010, at 12:49 AM, Mitani wrote:

> Hi,
> 
> Thank you for your help.
> 
> I tried to "make" with Serge's patch in my system.
> But, sorry, it failed.
> 
> 
> ---
> 
> I did with following procedure:
> 
> 1) I did "make" and "make install" of "libcap-2.11" .
> 
> 2) I confirmed about following files.
> ------------
> [root@RHEL4-8 include]# pwd
> /usr/include
> [root@RHEL4-8 include]# ls -l sys/capability.h
> -rw-r--r--  1 root root 3345 Apr  9 15:44 sys/capability.h
> [root@RHEL4-8 include]# ls -l linux/capability.h
> -rw-r--r--  1 root root 8273 May 14  2008 linux/capability.h
> [root@RHEL4-8 include]#
> ------------
> "sys/capability.h" replased by "libcap-2.11" .
> 
> 3) I applied patch to "m4/ltp-cap.m4", and confirmed it.
> ------------
> ...
> AC_DEFUN([LTP_CHECK_CAPABILITY_SUPPORT],[
> AH_TEMPLATE(HAVE_LIBCAP,
> [Define to 1 if you have libcap-2 installed.])
> AC_CHECK_HEADERS(sys/capability.h,[
>        LTP_CAPABILITY_SUPPORT=yes
>        AC_CHECK_DECL(VFS_CAP_REVISION_2,[AC_DEFINE(HAVE_LIBCAP)
> CAP_LIBS="-lcap"],[CAP_LIBS=""],[#include "linux/capability.h"])
>        AC_CHECK_PROG(HAVE_SETCAP,setcap,setcap,false)
> ])]
> AC_SUBST(CAP_LIBS)
> )
> ------------
> 
> 4) I did "./configure", and confirmed "configure.log" .
> ------------
> ...
> | #define HAVE_SYS_CAPABILITY_H 1
> | #define HAVE_LIBCAP 1
> | #define HAVE_SYS_PRCTL_H 1
> | #define HAVE_DECL_PR_CAPBSET_DROP 0
> | #define HAVE_DECL_PR_CAPBSET_READ 0
> ...
> ------------
> "HAVE_LIBCAP" define was ON.
> 
> 5) I tried to "make", but it failed as foliows.
> ------------
> cap_bounds_r.c: In function `main':
> cap_bounds_r.c:46: error: `CAP_LAST_CAP' undeclared (first use in this
> function)
> cap_bounds_r.c:46: error: (Each undeclared identifier is reported only once
> cap_bounds_r.c:46: error: for each function it appears in.)
> make[4]: *** [cap_bounds_r] Error 1
> ------------
> 
> 
> I don't know about configure well, and I examine it.
> 
> 
> Thank you--
> 
> -Tomonori Mitani
> 
> 
>> -----Original Message-----
>> From: Serge E. Hallyn [mailto:serue@us.ibm.com]
>> Sent: Monday, April 05, 2010 10:20 PM
>> To: Mitani
>> Cc: Rishikesh K Rajak; Andrew Morgan; Garrett Cooper;
>> ltp-list@lists.sourceforge.net
>> Subject: Re: [LTP] cap_bounds_r.c build failure
>> 
>> Quoting Mitani (mitani@ryobi.co.jp):
>>> Hi,
>>> 
>>> 
>>> I tired to upgrade "libcap" from "libcap-1.0-20" to "libcap-2.11".
>>> My system is RHEL4.8 (x86) and kernel version is 2.6.9-89.ELsmp.
>> 
>> Oh, I'm sorry, I misunderstood from the first.  I thought you wanted
>> to test a modern kernel on an older distro.  So the real problem in
>> your original email wasn't that cap_bounds_r.c wouldn't compile, but
>> that it tried to compile.
>> 
>> Maybe the attached ltp patch will do a better job of not trying
>> to compile.  Though I'm not sure what is the best way to detect
>> both 64-bit caps in kernel and libcap2 userspace.
>> 
>> -serge
>> 
>> Date: Mon, 5 Apr 2010 08:17:46 -0500
>> Subject: [PATCH ltp] don't compile cap_bounds on older systems
>> 
>> Only define HAVE_LIBCAP for libcap2 and 64-bit caps.
>> 
>> Signed-off-by: Serge Hallyn <serue@us.ibm.com>
>> ---
>> m4/ltp-cap.m4 |    2 +-
>> 1 files changed, 1 insertions(+), 1 deletions(-)
>> 
>> diff --git a/m4/ltp-cap.m4 b/m4/ltp-cap.m4
>> index caa436f..6248ff3 100644
>> --- a/m4/ltp-cap.m4
>> +++ b/m4/ltp-cap.m4
>> @@ -27,7 +27,7 @@ AH_TEMPLATE(HAVE_LIBCAP,
>> [Define to 1 if you have libcap-2 installed.])
>> AC_CHECK_HEADERS(sys/capability.h,[
>> 	LTP_CAPABILITY_SUPPORT=yes
>> -	AC_CHECK_LIB(cap,cap_compare,[AC_DEFINE(HAVE_LIBCAP)
>> CAP_LIBS="-lcap"], [CAP_LIBS=""])
>> +	AC_CHECK_DECL(VFS_CAP_REVISION_2,[AC_DEFINE(HAVE_LIBCAP)
>> CAP_LIBS="-lcap"],[CAP_LIBS=""],[#include "linux/capability.h"])
>> 	AC_CHECK_PROG(HAVE_SETCAP,setcap,setcap,false)
>> ])]
>> AC_SUBST(CAP_LIBS)
>> --
>> 1.6.3.3

	All of the necessary details are in INSTALL.
HTH,
-Garrett


------------------------------------------------------------------------------
Download Intel&#174; Parallel Studio Eval
Try the new software tools for yourself. Speed compiling, find bugs
proactively, and fine-tune applications for parallel performance.
See why Intel Parallel Studio got high marks during beta.
http://p.sf.net/sfu/intel-sw-dev
_______________________________________________
Ltp-list mailing list
Ltp-list@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/ltp-list

^ permalink raw reply	[flat|nested] 10+ messages in thread

end of thread, other threads:[~2010-04-16 18:39 UTC | newest]

Thread overview: 10+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2010-04-01  8:13 [LTP] cap_bounds_r.c build failure Mitani
2010-04-01  8:35 ` Rishikesh K Rajak
2010-04-01  9:23   ` Mitani
2010-04-01  9:35     ` Rishikesh K Rajak
2010-04-01 11:24       ` Mitani
2010-04-01 15:26         ` Serge E. Hallyn
2010-04-02  2:20           ` Mitani
2010-04-05 13:20             ` Serge E. Hallyn
2010-04-09  7:49               ` Mitani
2010-04-16 18:39                 ` Garrett Cooper

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox