[Nagiosplug-help] Failing to compile nrpe against OpenSSL on HP-UX

Ralph.Grothe at itdz-berlin.de Ralph.Grothe at itdz-berlin.de
Thu Aug 28 16:22:12 CEST 2008


Hi Nagiosi,

I am desperately try to compile an nrpe with TLS/SSL support on one of our 
PARISC2.0 HP-UX B.11.11 boxes.

I am using HP's ANSI C compiler and GNU Make for the build.

Here my versions:

# uname -srv
HP-UX B.11.11 U

# model
9000/800/L3000-5x

# getconf KERNEL_BITS
64

# swlist -l product OpenSSL|grep ^[^#]
  OpenSSL.openssl       A.00.09.07l    Secure Network Communications Protocol 

# swlist -l file OpenSSL.openssl.OPENSSL-LIB|grep ^[^#].*libssl|head -5
  /opt/openssl/0.9.7/lib/libssl.0.9.7l.a                       
  /opt/openssl/0.9.7/lib/libssl.sl                     
  /opt/openssl/0.9.7/lib/libssl.sl.0                   
  /opt/openssl/0.9.7/lib/pa20_64/libssl.0.9.7l.a                       
  /opt/openssl/0.9.7/lib/pa20_64/libssl.sl                     


I got nrpe from here
wget -Y1 http://switch.dl.sourceforge.net/sourceforge/nagios/nrpe-2.12.tar.gz


I invoked configure like so 
(assuming that it only was written for 32bit builds,
why I didn't care to set LD_LIBRARY_PATH, but made no difference when set anyway)

# SHLIB_PATH=/opt/openssl/lib ./configure --prefix=/opt/nagios \
							--enable-ssl --with-ssl=/opt/openssl \
							--with-ssl-lib=/opt/openssl/lib \
							--without-kerberos \
							--with-nrep-user=nagios \
							--with-nrep-group=nagios \
							--with-nrpe-port=5666

It then took me about an hour to realize
why the ruddy configure script wouldn't find my shared OpenSSL libs.

So this was the workaround to get over this hurdle
(I think the developer(s) should be notified of this)

# diff configure{.dist,}
6673c6673
<                       if test -f "$dir/libssl.so"; then
---
>                       if test -f "$dir/libssl.sl"; then


After that change the configure completed and I could run make where I am currently stuck here:

# make
cd ./src/; /usr/local/bin/gmake ; cd ..
gmake[1]: Entering directory `/usr/local/src/nrpe-2.12/src'
/opt/ansic/bin/cc -g -I/opt/openssl/include/openssl -I/opt/openssl/include -DHAVE_CONFIG_H -o nrpe nrpe.c utils.c -L/opt/openssl/lib  -lssl -lcrypto -lnsl  ./snprintf.o 
nrpe.c:
cc: "nrpe.c", line 617: error 1588: "LOG_AUTHPRIV" undefined.
cc: "nrpe.c", line 619: error 1588: "LOG_FTP" undefined.
cc: "nrpe.c", line 852: warning 604: Pointers are not assignment-compatible.
cc: "nrpe.c", line 852: warning 563: Argument #3 is not the correct type.
utils.c:
gmake[1]: *** [nrpe] Error 1
gmake[1]: Leaving directory `/usr/local/src/nrpe-2.12/src'

*** Compile finished ***

If the NRPE daemon and client compiled without any errors, you
can continue with the installation or upgrade process.

Read the PDF documentation (NRPE.pdf) for information on the next
steps you should take to complete the installation or upgrade.


Hm, obviously the compile *did not* finish

# find . -type f -name nrpe -exec ll {} +|wc -l
0


This is the line with the incorrect type of 3rd arg function call:

# sed -n 852p src/nrpe.c
                                rc=getpeername(new_sd,&addr,&addrlen);


Sounds like a standard Socket syscall?

Here's the SYNOPSIS of HP-UX's getpeername implementation


 SYNOPSIS
      #include <sys/socket.h>

    AF_CCITT only:
      #include <x25/x25addrstr.h>

      int getpeername(int s, void *addr, int *addrlen);

    _XOPEN_SOURCE_EXTENDED only (UNIX 98)
      int getpeername(int s, struct sockaddr *addr, socklen_t *addrlen);

    Obsolescent _XOPEN_SOURCE_EXTENDED only (UNIX 95)
      int getpeername(int s, struct sockaddr *addr, size_t *addrlen);




Can anybody help?


Thanks for your attention

Ralph











More information about the Help mailing list