compile nrpe on Solaris
Joe Leone
Joe.Leone at Beacon.com.au
Tue May 13 20:37:21 CEST 2003
Thank you for the help, BUT still not complete.
I have followed the various suggestion on the list and have made progress.
This is the procedure I have followed so far.
1 make distclean
2 ./configure --enable-ssl --with-nrpe-user=netsaint --with-nrpe-group=netsaint --with-nrpe-port=8086
3 Edit src/Makefile to add the second -I
eg CFLAGS=-g -O2 -I/usr/local/ssl/include/openssl -I/usr/local/ssl/include -DHAVE_CONFIG_H
4 Edit common/common.h and added the typedef just under the #include
typedef unsigned int u_int32_t;
5 Edit common/config.h Here I uncomment the two "unde"f and comment out the "define" lines. Without these changed I got the errors show below.
/* stupid stuff for u_int32_t */
#undef U_INT32_T_IS_USHORT
#undef U_INT32_T_IS_UINT
/* #define U_INT32_T_IS_ULONG 1 */
In file included from ../common/common.h:24,
from nrpe.c:21:
../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,
6 cd src and run the command shown to compile. This got rid of all the "Undefined symbol" errors with SSL. The only Undefined symbol is with strsep does not exist in Solaris.
gcc -g -O2 -o nrpe nrpe.c utils.c -I/usr/local/ssl/include/openssl -I/usr/local/ssl/include -DHAVE_CONFIG_H -L/usr/local/ssl/lib -lssl -lcrypto -lnsl -lsocket
There are several mails about it and replacement code. http://www.winehq.com/hypermail/wine-patches/2001/11/0024.html
http://groups.google.com/groups?hl=en&lr=lang_en&ie=UTF-8&newwindow=1&threadm=ThWK7.4%249s2.192%40vicpull1.telstra.net&rnum=6&prev=/groups%3Fq%3Dstrsep%2Bsolaris%26hl%3Den%26lr%3Dlang_en%26ie%3DUTF-8%26newwindow%3D1%26start%3D0%26sa%3DN
I gather that the function needs to be added to nrpe.c???. I'll have a go at that tomorrow.
Joe Leone
-----Original Message-----
From: Garrett, Matt M SITI-ITDIEEE [mailto:matt.garrett at shell.com]
Sent: Tuesday, 13 May 2003 10:45
To: nagios-users at lists.sourceforge.net
Cc: mercer at btitelecom.net
Subject: [Nagios-users] Re: compile nrpe on Solaris
> 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
-------------------------------------------------------
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