compile nrpe on Solaris

Garrett, Matt M SITI-ITDIEEE matt.garrett at shell.com
Tue May 13 16:44:48 CEST 2003


> To: nagios-users at lists.sourceforge.net
> From: Jeff Mercer <mercer at btitelecom.net>
> Date: Tue, 13 May 2003 09:05:20 -0400
> Subject: [Nagios-users] Re: compile nrpe on Solaris
> 
> Joe Leone wrote:
> > I am trying to compile nrpe nrpe-2.0b3 on Solaris 7.
> 
> Wheee!
> 
> > I get an error  as below.
> > 
> > gcc -g -O2 -I/usr/local/ssl/include/openssl -DHAVE_CONFIG_H 
> -L/lib  -lssl -lcrypto -o nrpe -lnsl -lsocket nrpe.c utils.c
> > In file included from ../common/common.h:24,
> > ./common/config.h:54: syntax error before "typedef"
> > In file included from 
> /usr/local/lib/gcc-lib/sparc-sun-solaris2.7/3.2.3/include/sys/
> types.h:33,
> >                  from /usr/include/strings.h:11,
> >                  from ../common/config.h:74,
> >                  from ../common/common.h:24,
> >                  from nrpe.c:21:
> > /usr/include/sys/machtypes.h:33: syntax error before "typedef"
> > 
> > I have seen a number of people ask about compiling nrpe on 
> Solaris and HP but no solution to fix it.  People have 
> responded that they have compiled it successfully. I have 
> downloaded some of the binaries but they are older version 
> which do not have SSL. 
> > Can some one tell me how they achieved it. I suspect it has 
> something to do with u_int32_t
> 
> I had problems with NRPE 1.8 on Solaris 7 AND Solaris 8 
> boxes. I was annoyed 
> to find that on a few of my systems there was no problem, 
> while on others it 
> worked fine. I did indeed narrow it down to the typedef 
> declaration for 
> u_int32_t.
> 
>  From what I was able to determine, the systems where it 
> compiled fine had 
> Berkley DB installed. There was a /usr/include/db.h file 
> which happened to 
> define the u_int32_t type, and through some chain of includes 
> I can't recall 
> this would allow nrpe to compile.
> 
> Anyways, it's a very fix. Once you've done your ./configure 
> command sequence 
> in the NRPE source directory (Including whatever parameters 
> you may want to 
> pass to the configure script), you just need to modify the 
> common.h file in 
> the common directory and add:
> 
> 	typedef unsigned int u_int32_t;
> 
> right near the top, just after the first #include statement. 
> Then do a make 
> and it should compile fine.


Unfortanltly this does not seem to fix nrpe 2.0b3
May be it is the version of Berkley DB 4.1 that I am using is to New (that must be a first)

Tried different things like
CPPFLAGS=-I/usr/local/BerkeleyDB.4.1/include
LDFLAGS=-L/usr/local/BerkeleyDB.4.1/lib


Any other good idea's

Matt
Matthew Garrett
Unix System Support
Shell Information Technology International Limited
Seafield House, North Anderson Drive, Aberdeen AB15 6GZ, United Kingdom

Tel: +44 (0)1224 81 8373 Other Tel: Internal 630 8373
Email: Matt.M.Garrett at is.shell.com
Internet: http://www.shell.com


-------------------------------------------------------
Enterprise Linux Forum Conference & Expo, June 4-6, 2003, Santa Clara
The only event dedicated to issues related to Linux enterprise solutions
www.enterpriselinuxforum.com

_______________________________________________
Nagios-users mailing list
Nagios-users at lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/nagios-users
::: Please include Nagios version, plugin version (-v) and OS when reporting any issue. 
::: Messages without supporting info will risk being sent to /dev/null





More information about the Users mailing list