Re: [ROOT] problem compiling rootd/src/rootd.cxx under linux RH9 gcc 3.2

From: Johann COHEN-TANUGI (johann.cohen@pi.infn.it)
Date: Tue Apr 29 2003 - 17:35:46 MEST


Hi Jiri,
it was ROOT 3.04/02:
concerning the preprocessor command, it is:
#if !defined(__hpux)
and not
#if !defined(__hpux) && !defined(linux) && !defined(__FreeBSD__)

Johann

On Tue, 29 Apr 2003, Jiri Masik wrote:

> Johann Cohen-Tanugi <johann.cohen@pi.infn.it> writes:
> 
> > Hi there,
> > root did not compile on my RH9 box. I have the following:
> > g++ -O -pipe -Wall -Woverloaded-virtual -fPIC -Iinclude -DHAVE_CONFIG 
> > -D_REENTRANT -DR__SHADOWPW    -DR__KRB5 -I/usr/kerberos/include  -o 
> > rootd/src/rootd.o -c rootd/src/rootd.cxx
> > rootd/src/rootd.cxx: In function `int setresgid(unsigned int, unsigned int,
> >     unsigned int)':
> > rootd/src/rootd.cxx:347: `int setresgid(unsigned int, unsigned int, unsigned
> >     int)' was declared `extern' and later `static'
> > /usr/include/unistd.h:658: previous declaration of `int 
> > setresgid(unsigned int,
> >     unsigned int, unsigned int)'
> > rootd/src/rootd.cxx: In function `int setresuid(unsigned int, unsigned int,
> >     unsigned int)':
> > rootd/src/rootd.cxx:354: `int setresuid(unsigned int, unsigned int, unsigned
> >     int)' was declared `extern' and later `static'
> > /usr/include/unistd.h:654: previous declaration of `int 
> > setresuid(unsigned int,
> >     unsigned int, unsigned int)'
> > gmake: *** [rootd/src/rootd.o] Error 1
> >
> 
> Hi,
> 
> what version of root are you trying to compile?  The existence of
> setresuid/setresgid prototypes is checked in the configure script. You
> should have 
> #define HAS_SETRESUID in your include/config.h
> 
> As for the error above it looks like this block of rootd.cxx is compiled 
> #if !defined(__hpux) && !defined(linux) && !defined(__FreeBSD__)
> static int setresgid(gid_t r, gid_t e, gid_t)
> ....
> 
> which should not happen on linux. You can try to comment the functions
> inside the block to test if it is the case.
> 
> cheers
> Jiri
> 



This archive was generated by hypermail 2b29 : Thu Jan 01 2004 - 17:50:11 MET