public inbox for ltp@lists.linux.it
 help / color / mirror / Atom feed
From: "Mitani" <mitani@ryobi.co.jp>
To: "'Serge E. Hallyn'" <serue@us.ibm.com>
Cc: ltp-list@lists.sourceforge.net
Subject: Re: [LTP] cap_bounds_r.c build failure
Date: Fri, 9 Apr 2010 16:49:22 +0900	[thread overview]
Message-ID: <000a01cad7b9$2b1be350$8153a9f0$@co.jp> (raw)
In-Reply-To: <20100405132004.GA32049@us.ibm.com>

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

  reply	other threads:[~2010-04-09  7:49 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
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 [this message]
2010-04-16 18:39                 ` Garrett Cooper

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to='000a01cad7b9$2b1be350$8153a9f0$@co.jp' \
    --to=mitani@ryobi.co.jp \
    --cc=ltp-list@lists.sourceforge.net \
    --cc=serue@us.ibm.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox