From: Serge E. H. <se...@us...> - 2010-04-07 13:39:26
|
Quoting Mitani (mi...@ry...): > Hi, > > > -----Original Message----- > > From: Serge E. Hallyn [mailto:se...@us...] > > Sent: Monday, April 05, 2010 10:22 PM > > To: Mitani > > Cc: ltp...@li... > > Subject: Re: [LTP] cap_bset_inh_bounds.c build failure > > > > Quoting Mitani (mi...@ry...): > > > Hi, > > > > > > I tried to build by using yesterday's git in my system (RHEL4.8 x86). > > > (ltp-dev-4837fee8a7c2de6a83c8927a574c792ca6dabe4e.tar.gz) > > > But build failed in "cap_bset_inh_bounds.c" with following message. > > > This is different from "cap_bounds_r.c"'s problem (another thread), > > I think > > > > > > ------------ > > > gcc -g -O2 -g -O2 -fno-strict-aliasing -pipe -Wall > > > -I/home/LTP/ltp-dev-20100401-3/testcases/kernel/include > > > -I../../../../include -I../../../../include -L../../../../lib > > > cap_bset_inh_bounds.c -lltp -lcap -o cap_bset_inh_bounds > > > cap_bset_inh_bounds.c:124: error: syntax error before numeric > > constant > > > cap_bset_inh_bounds.c:124: warning: type defaults to `int' in > > declaration of > > > `tst_resm' > > > cap_bset_inh_bounds.c:124: error: conflicting types for 'tst_resm' > > > ../../../../include/test.h:192: error: previous declaration of > > 'tst_resm' > > > was here > > > cap_bset_inh_bounds.c:124: error: conflicting types for 'tst_resm' > > > ../../../../include/test.h:192: error: previous declaration of > > 'tst_resm' > > > was here > > > cap_bset_inh_bounds.c:124: warning: data definition has no type or > > storage > > > class > > > cap_bset_inh_bounds.c:129: warning: type defaults to `int' in > > declaration of > > > `tst_exit' > > > cap_bset_inh_bounds.c:129: error: conflicting types for 'tst_exit' > > > ../../../../include/test.h:203: error: previous declaration of > > 'tst_exit' > > > was here > > > cap_bset_inh_bounds.c:129: error: conflicting types for 'tst_exit' > > > ../../../../include/test.h:203: error: previous declaration of > > 'tst_exit' > > > was here > > > cap_bset_inh_bounds.c:129: warning: data definition has no type or > > storage > > > class > > > cap_bset_inh_bounds.c:130: error: syntax error before '}' token > > > ------------ > > > > > > In this source, the pair of "ifdef" start/end and the pair of > > > main() function's "parenthesis" are alternate, I think. > > > > > > > > > How about following patch? > > > > > > Signed-off-by : Tomonori Mitani <mi...@ry...> > > > > Yup - although really the #ifdef HAVE_LIBCAP should be redundant as > > the testcases/kernel/security/cap_bound/Makefile shouldn't compile > > cap_bounds at all if HAVE_LIBCAP is not defined. > > > > Yes. - In my system, this source is not problem. Your indication is > right. :-) > But, I manually had updated "libcap2" once. And after "./configure", > HAVE_LIBCAP is defined. Therefore, I noticed this error. > > The system which updated to "libcap2" will need solution of this > problem, I think. Agreed, since this is LTP it's not right to expect "sane" userspace-kernel combos. So we need to check both. Unfortunately I won't have time to work with that this week. Even if I did, I'd have a guidance question for Garrett: Do we want to assume that people will change kernels, but not libraries, between compile/install and run of ltp? If so, then we can stick with the autoconf checks for libraries+includes, and add a check at runtime (as I believe was there originally) for the requisite kernel support - file capabilities, bounding sets, and 64-bit capabilities. OTOH if you're ok with assuming kernel is same at ltp configure and run, then we can do a test in autoconf which makes for a cleaner run. thanks, -serge |