NRPE on Mac OS X: make all error

Noah Leaman noah at mac.com
Thu Nov 13 08:24:32 CET 2003


Thank you very much Ton. This worked perfectly.

-- 
Noah


On Wednesday, November 12, 2003, at 11:10  PM, Voon, Ton wrote:

> Noah,
>
> I just submitted a fix to patch this at source, but NRPE 2.0 can be 
> patched
> for Mac OS X 10.2 by adding the following line into nrpe.c:
>
> #define socklen_t int
>
> Add it just after #define NASTY_METACHARS.
>
> Should then compile fine on Jaguar.
>
> The reason it is fixed in 10.3 is because the Darwin team added 
> socklen_t
> into /usr/include/sys/types.h.
>
> Ton
>
>> -----Original Message-----
>> From: Noah Leaman [mailto:noah at mac.com]
>> Sent: Thursday, November 13, 2003 6:28 AM
>> To: Noah Leaman
>> Cc: Brian Basgen; nagios-users at lists.sourceforge.net
>> Subject: Re: [Nagios-users] NRPE on Mac OS X: make all error
>>
>>
>> Some more info: NRPE 2.0 compiled fine in Mac OS X 10.3.0. Here is
>> version info on OpenSSH installed on both OSes in case that's
>> an issue:
>>
>> 10.2.8
>> OpenSSH_3.6.1p1+CAN-2003-0693, SSH protocols 1.5/2.0, OpenSSL
>> 0x0090702f
>>
>> 10.3.0
>> OpenSSH_3.4p1+CAN-2003-0693, SSH protocols 1.5/2.0, OpenSSL 0x0090609f
>>
>> And here is a diff of the ./configure output between 10.2.8
>> and 10.3.0
>> (again, 10.3 builds fine, 10.2.8 doesn't)"
>>
>> [MyHost:/tmp/nrpe-2.0] nleaman% diff 10.2.8 10.3.0
>> 8c8
>> < checking how to run the C preprocessor... gcc -E -traditional-cpp
>> ---
>>> checking how to run the C preprocessor... gcc -E
>> 16c16
>> < checking for getopt.h... no
>> ---
>>> checking for getopt.h... yes
>> 59d58
>> < warning, not much extra random data, consider using the -rand option
>> 62c61
>> <
>> ........+..................................................+..
>> ..........
>> ................+....+.......+................................
>> +........+
>> .........+.....................................+..............
>> .+........
>> ............................+.............................+...
>> ..........
>> ..........+......................+.......+..+....+............
>> ......+...
>> ............+................+....+...........................
>> ..........
>> .................+.................+..........................
>> ...+......
>> ............................+.......+.........++*++*++*++*++*++*
>> ---
>>> ..................+.................++*++*++*++*++*++*
>>
>>
>> On Wednesday, November 12, 2003, at 09:53  PM, Noah Leaman wrote:
>>
>>> Brian,
>>>
>>> DId you ever get a fix for this? I am having the exact same problem.
>>>
>>> Mac OS 10.2.8 (w/ Dev Tools installed)
>>> NRPE 2.0
>>>
>>> -- 
>>> Noah
>>>
>>> On Monday, October 13, 2003, at 12:12  PM, Brian Basgen wrote:
>>>
>>>> Hello,
>>>>
>>>>  I'm trying to get NRPE 2 to work on Mac OS X. I'm running
>> Nagios 1.1
>>>> on Red
>>>> Hat 9, and am successfully monitoring Windows boxes
>> (NSClient), but
>>>> have a
>>>> bunch of Mac OS X machines that I need to monitor for internal
>>>> services such
>>>> as disk usage, etc. The error occurs during make all, after
>>>> ./configure goes
>>>> well:
>>>>
>>>> |BBasgen:~/Desktop/nrpe-2.0| bbasgen# make all
>>>> cd ./src/; make ; cd ..
>>>> gcc -g -O2 -I/usr/include/openssl -I/usr/include
>> -DHAVE_CONFIG_H -o
>>>> nrpe
>>>> nrpe.c utils.c -L/usr/lib  -lssl -lcrypto
>>>> nrpe.c:520: undefined type, found `socklen_t'
>>>> cpp-precomp: warning: errors during smart preprocessing,
>> retrying in
>>>> basic
>>>> mode
>>>> nrpe.c: In function `wait_for_connections':
>>>> nrpe.c:520: `socklen_t' undeclared (first use in this function)
>>>> nrpe.c:520: (Each undeclared identifier is reported only once
>>>> nrpe.c:520: for each function it appears in.)
>>>> nrpe.c:520: parse error before "addrlen"
>>>> nrpe.c:619: `addrlen' undeclared (first use in this function)
>>>> make[1]: *** [nrpe] Error 1
>>>>
>>>> *** Compile finished ***
>>>>
>>>>
>>>>
>>>>  For reference, if it helps, here is the ./configure. I'm
>> running Mac
>>>> OS X
>>>> 10.2.8; with the Developer Tools Installed.
>>>>
>>>>
>>>>
>>>> |BBasgen:~/Desktop/nrpe-2.0| bbasgen# ./configure
>>>> checking for a BSD compatible install... /usr/bin/install -c
>>>> checking for gcc... gcc
>>>> checking whether the C compiler (gcc  ) works... yes
>>>> checking whether the C compiler (gcc  ) is a cross-compiler... no
>>>> checking whether we are using GNU C... yes
>>>> checking whether gcc accepts -g... yes
>>>> checking whether make sets ${MAKE}... yes
>>>> checking how to run the C preprocessor... gcc -E -traditional-cpp
>>>> checking for ANSI C header files... yes
>>>> checking whether time.h and sys/time.h may both be included... yes
>>>> checking for sys/wait.h that is POSIX.1 compatible... yes
>>>> checking for ctype.h... yes
>>>> checking for dirent.h... yes
>>>> checking for errno.h... yes
>>>> checking for fcntl.h... yes
>>>> checking for getopt.h... no
>>>> checking for grp.h... yes
>>>> checking for inttypes.h... yes
>>>> checking for netdb.h... yes
>>>> checking for pwd.h... yes
>>>> checking for signal.h... yes
>>>> checking for stdint.h... yes
>>>> checking for strings.h... yes
>>>> checking for string.h... yes
>>>> checking for syslog.h... yes
>>>> checking for unistd.h... yes
>>>> checking for arpa/inet.h... yes
>>>> checking for netinet/in.h... yes
>>>> checking for sys/types.h... yes
>>>> checking for sys/time.h... yes
>>>> checking for sys/resource.h... yes
>>>> checking for sys/wait.h... (cached) yes
>>>> checking for sys/socket.h... yes
>>>> checking for sys/stat.h... yes
>>>> checking for working const... yes
>>>> checking whether struct tm is in sys/time.h or time.h... time.h
>>>> checking for mode_t... yes
>>>> checking for pid_t... yes
>>>> checking for size_t... yes
>>>> checking return type of signal handlers... void
>>>> checking for uid_t in sys/types.h... yes
>>>> checking type of array argument to getgroups... gid_t
>>>> checking size of int... 4
>>>> checking size of short... 2
>>>> checking size of long... 4
>>>> checking for uint32_t... no
>>>> checking for u_int32_t... yes
>>>> checking for int32_t... yes
>>>> checking for main in -lnsl... no
>>>> checking for socket in -lsocket... no
>>>> checking for strdup... yes
>>>> checking for strstr... yes
>>>> checking for strtoul... yes
>>>> checking for initgroups... yes
>>>> checking for type of socket size... size_t
>>>> checking for SSL... SSL found in /usr
>>>>
>>>> *** Generating DH Parameters for SSL/TLS ***
>>>> warning, not much extra random data, consider using the
>> -rand option
>>>> Generating DH parameters, 512 bit long safe prime, generator 2
>>>> This is going to take a long time
>>>> +*++*++*++*++*++*
>>>> checking for Kerberos include files... could not find include files
>>>> checking for perl... /usr/bin/perl
>>>> creating ./config.status
>>>> creating Makefile
>>>> creating src/Makefile
>>>> creating subst
>>>> creating common/config.h
>>>>
>>>>
>>>> *** Configuration summary for nrpe 2.0 09-08-2003 ***:
>>>>
>>>>  General Options:
>>>>  -------------------------
>>>>  NRPE port:  5666
>>>>  NRPE user:  nagios
>>>>  NRPE group: nagios
>>>>
>>>>
>>>> Review the options above for accuracy.  If they look okay,
>>>> type 'make all' to compile the NRPE daemon and client.
>>>>
>>>>
>>>> Regards,
>>>> ........................................
>>>>  Brian Basgen
>>>>  Systems Administrator
>>>>  EPIX Medical
>>>>  71 Rogers St
>>>>  Cambridge MA, 02142
>>>> ..........................................
>
>
> This private and confidential e-mail has been sent to you by Egg.
> The Egg group of companies includes Egg Banking plc
> (registered no. 2999842), Egg Financial Products Ltd (registered
> no. 3319027) and Egg Investments Ltd (registered no. 3403963) which
> carries out investment business on behalf of Egg and is regulated
> by the Financial Services Authority.
> Registered in England and Wales. Registered offices: 1 Waterhouse 
> Square,
> 138-142 Holborn, London EC1N 2NA.
> If you are not the intended recipient of this e-mail and have
> received it in error, please notify the sender by replying with
> 'received in error' as the subject and then delete it from your
> mailbox.
>



-------------------------------------------------------
This SF.Net email sponsored by: ApacheCon 2003,
16-19 November in Las Vegas. Learn firsthand the latest
developments in Apache, PHP, Perl, XML, Java, MySQL,
WebDAV, and more! http://www.apachecon.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