Page 1 of 1

Compiling nagios plugins on Solaris 10 with CSW

Posted: Tue Nov 22, 2011 6:54 pm
by forrie
I cannot get this lot to compile correctly on Solaris 10. I have my OpenSSL installation under /opt/csw/[lib|include] and while I can use the --with-openssl flag which seems to find the LIBS, the includes are another story. I end up with compile failures seeking various SSL calls. This is driving me nuts.

Setting LDFLAGS, CPPFLAGS, etc, causes configure to fail.

Code: Select all

 ./configure --prefix=/usr/local/nagios --with-cgiurl=/nagios --with-openssl=/opt/csw/lib --without-ipv6  --without-mysql
Anyone know how to get this lot to compile correctly without manually editing all the Makefiles for -L and -I.


Thanks.

Re: Compiling nagios plugins on Solaris 10 with CSW

Posted: Wed Nov 23, 2011 2:18 pm
by forrie
Furthermore, a bug here... if I include --without-openssl, why then is check_http still failing with this?

Code: Select all

/bin/bash ../libtool --tag=CC   --mode=link gcc -DNP_VERSION='"1.4.15"' -g -O2  -L. -o check_http check_http.o sslutils.o netutils.o utils.o ../lib/libnagiosplug.a ../gl/libgnu.a  -lnsl -lsocket -lresolv  -lpthread -ldl 
libtool: link: gcc -DNP_VERSION=\"1.4.15\" -g -O2 -o check_http check_http.o sslutils.o netutils.o utils.o  -L/usr/local/src/nagios-plugins-1.4.15/plugins ../lib/libnagiosplug.a ../gl/libgnu.a -lnsl -lsocket -lresolv -lpthread -ldl
Undefined                       first referenced
 symbol                             in file
SSL_load_error_strings              sslutils.o
SSL_write                           sslutils.o
OpenSSL_add_all_algorithms          sslutils.o
SSL_set_fd                          sslutils.o
SSL_free                            sslutils.o
SSL_read                            sslutils.o
SSLv23_client_method                sslutils.o
SSL_new                             sslutils.o
SSL_CTX_new                         sslutils.o
SSL_connect                         sslutils.o
SSL_shutdown                        sslutils.o
SSL_CTX_free                        sslutils.o
SSL_library_init                    sslutils.o
ld: fatal: symbol referencing errors. No output written to check_http
make[2]: *** [check_http] Error 1
make[2]: Leaving directory `/usr/local/src/nagios-plugins-1.4.15/plugins'
make[1]: *** [all-recursive] Error 1
make[1]: Leaving directory `/usr/local/src/nagios-plugins-1.4.15'
make: *** [all] Error 2

Re: Compiling nagios plugins on Solaris 10 with CSW

Posted: Sun Dec 18, 2011 5:38 pm
by crfriend
Did you do a "make clean" to get rid of old *.o files before the last try? It looks like something was left over with an external reference to the SSL bits from a previous compilation attempt.