Nagios MySQL Solaris

Andreas Ericsson ae at op5.se
Wed Dec 8 00:04:57 CET 2004


Leon A. Davis wrote:
> Andreas,
> 
> Please pardon my direct email to you.  My name is Leon Davis and I'm 
> contacting you
> because I regard you as one of the leading knowledgeable people of 
> Nagios on the forums.
> 

Thank you for the kind words, but please refrain from doing so in the 
future. I'm currently swanked in work as it is and have no time to debug 
your mysql devel environment for you.

I'll send this reply to the nagios-users list as well. Hopefully someone 
with more time on their hands to ask you the proper follow-up questions 
will be able to give you an answer.

By the first look of it, it seems like you don't have the shared mysql 
libraries installed in a path where your dso-symbol-resolver (that's ld 
for most unices) expects to find them but I'd need to know more before 
getting definitive.

> I am about to jump off the roof with this one, and I am franticly in 
> need of some help. Please.
> 
> I can compile Nagios 1.2 with MySQL fine. However, when doing the "make 
> all" I get errors.
> 
> *ld: fatal: Symbol referencing errors. No output written to nagios
> collect2: ld returned 1 exit status
> make[1]: *** [nagios] Error 1
> make[1]: Leaving directory `/home/jennifer/nagios-1.2/base'
> make: *** [all] Error 2*
> 
> # ./configure --prefix=/usr/local/nagios --with-PACKAGE=yes 
> --with-cgiurl=/nagios/cgi-bin --with-htmurl=/nagios/ 
> --with-nagios-user=nagios --with-nagios-grp=nagios --with-mysql-xdata 
> --with-mysql-status --with-mysql-comments --with-mysql-extinfo 
> --with-mysql-retention --with-mysql-downtime 
> --with-mysql-inc=/usr/local/mysql/include 
> --with-mysql-lib=/usr/local/mysql/lib --enable-statusmap 
> --with-gd-lib=/usr/local/lib --with-gd-inc=/usr/local/include 
> --enable-DEBUG2 --enable-embedded-perl --with-perlcache 
> --with-gd-inc=/usr/local/include --with-gd-lib=/usr/local/lib
> creating cache ./config.cache
> checking for a BSD compatible install... ./install-sh -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 for strip... /usr/ccs/bin/strip
> checking how to run the C preprocessor... gcc -E
> 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 limits.h... yes
> checking for math.h... yes
> checking for pwd.h... yes
> checking for signal.h... yes
> checking for strings.h... yes
> checking for string.h... yes
> checking for syslog.h... yes
> checking for unistd.h... yes
> checking for uio.h... no
> 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/stat.h... yes
> checking for sys/ipc.h... yes
> checking for sys/msg.h... yes
> checking for working const... yes
> checking whether struct tm is in sys/time.h or time.h... time.h
> checking for tm_zone in struct tm... no
> checking for tzname... yes
> 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 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 mail... /usr/bin/mail
> Init script directory:  /etc/init.d
> We'll use MySQL database routines (in xdata/xsddb.*) for status data I/O...
> We'll use MySQL database routines (in xdata/xcddb.*) for comment data 
> I/O...
> We'll use MySQL database routines (in xdata/xeddb.*) for extended data 
> I/O...
> We'll use MySQL database routines (in xdata/xrddb.*) for retention data 
> I/O...
> We'll use template-based routines (in xdata/xodtemplate.*) for object 
> data I/O...
> We'll use default routines (in xdata/xpddefault.*) for performance data 
> I/O...
> We'll use MySQL database routines (in xdata/xdddb.*) for scheduled 
> downtime data I/O...
> checking for main in -lmysqlclient... yes
> MySQL library was found!
> checking for main in -liconv... no
> checking for gdImagePng in -lgd (order 1)... yes
> GD library was found!
> Note (probably harmless): No library found for -lbind
> Embedded Perl interpreter will be compiled in...
> Internally compiled Perl scripts will be cached...
> checking for traceroute... /usr/sbin/traceroute
> checking for snprintf... yes
> checking for type va_list... yes
> checking for perl... /usr/local/bin/perl
> updating cache ./config.cache
> creating ./config.status
> creating Makefile
> creating subst
> creating pkginfo
> creating base/Makefile
> creating common/Makefile
> creating contrib/Makefile
> creating cgi/Makefile
> creating html/Makefile
> creating xdata/Makefile
> creating daemon-init
> creating html/index.html
> creating html/side.html
> creating common/config.h
> creating common/snprintf.h
> creating base/nagios.h
> creating cgi/cgiutils.h
> 
> Creating sample config files in sample-config/ ...
> 
> 
> *** Configuration summary for nagios 1.2 02-02-2004 ***:
> 
> General Options:
> -------------------------
>        Nagios executable:  nagios
>        Nagios user/group:  nagios,nagios
>       Command user/group:  nagios,nagios
>            Embedded Perl:  yes, with caching
>        Install ${prefix}:  /usr/local/nagios
>                Lock file:  ${prefix}/var/nagios.lock
>           Init directory:  /etc/init.d
> 
> Web Interface Options:
> ------------------------
>                 HTML URL:  http://localhost/nagios//
>                  CGI URL:  http://localhost/nagios/cgi-bin/
> Traceroute (used by WAP):  /usr/sbin/traceroute
> 
> External Data Routines:
> ------------------------
>              Status data:  Database (MySQL)
>              Object data:  Template-based (text file)
>             Comment data:  Database (MySQL)
>            Downtime data:  Database (MySQL)
>           Retention data:  Database (MySQL)
>          Peformance data:  Default (external commands)
>       Extended info data:  Database (MySQL)
> 
> 
> Review the options above for accuracy.  If they look okay,
> type 'make all' to compile the main program and CGIs.
> 
> #
> *# make all*
> cd ./base && make
> make[1]: Entering directory `/home/jennifer/nagios-1.2/base'
> gcc -g -O2 -I/usr/local/mysql/include -I/usr/local/include  
> -fno-strict-aliasing -I/usr/local/include -D_LARGEFILE_SOURCE 
> -D_FILE_OFFSET_BITS=64  -I/usr/local/lib/perl5/5.8.3/sun4-solaris/CORE  
> -DHAVE_CONFIG_H -DNSCORE   -c -o checks.o checks.c
> gcc -g -O2 -I/usr/local/mysql/include -I/usr/local/include  
> -fno-strict-aliasing -I/usr/local/include -D_LARGEFILE_SOURCE 
> -D_FILE_OFFSET_BITS=64  -I/usr/local/lib/perl5/5.8.3/sun4-solaris/CORE  
> -DHAVE_CONFIG_H -DNSCORE   -c -o config.o config.c
> gcc -g -O2 -I/usr/local/mysql/include -I/usr/local/include  
> -fno-strict-aliasing -I/usr/local/include -D_LARGEFILE_SOURCE 
> -D_FILE_OFFSET_BITS=64  -I/usr/local/lib/perl5/5.8.3/sun4-solaris/CORE  
> -DHAVE_CONFIG_H -DNSCORE   -c -o commands.o commands.c
> gcc -g -O2 -I/usr/local/mysql/include -I/usr/local/include  
> -fno-strict-aliasing -I/usr/local/include -D_LARGEFILE_SOURCE 
> -D_FILE_OFFSET_BITS=64  -I/usr/local/lib/perl5/5.8.3/sun4-solaris/CORE  
> -DHAVE_CONFIG_H -DNSCORE   -c -o flapping.o flapping.c
> gcc -g -O2 -I/usr/local/mysql/include -I/usr/local/include  
> -fno-strict-aliasing -I/usr/local/include -D_LARGEFILE_SOURCE 
> -D_FILE_OFFSET_BITS=64  -I/usr/local/lib/perl5/5.8.3/sun4-solaris/CORE  
> -DHAVE_CONFIG_H -DNSCORE   -c -o logging.o logging.c
> gcc -g -O2 -I/usr/local/mysql/include -I/usr/local/include  
> -fno-strict-aliasing -I/usr/local/include -D_LARGEFILE_SOURCE 
> -D_FILE_OFFSET_BITS=64  -I/usr/local/lib/perl5/5.8.3/sun4-solaris/CORE  
> -DHAVE_CONFIG_H -DNSCORE   -c -o notifications.o notifications.c
> gcc -g -O2 -I/usr/local/mysql/include -I/usr/local/include  
> -fno-strict-aliasing -I/usr/local/include -D_LARGEFILE_SOURCE 
> -D_FILE_OFFSET_BITS=64  -I/usr/local/lib/perl5/5.8.3/sun4-solaris/CORE  
> -DHAVE_CONFIG_H -DNSCORE   -c -o sehandlers.o sehandlers.c
> gcc -g -O2 -I/usr/local/mysql/include -I/usr/local/include  
> -fno-strict-aliasing -I/usr/local/include -D_LARGEFILE_SOURCE 
> -D_FILE_OFFSET_BITS=64  -I/usr/local/lib/perl5/5.8.3/sun4-solaris/CORE  
> -DHAVE_CONFIG_H -DNSCORE   -c -o utils.o utils.c
> gcc -g -O2 -I/usr/local/mysql/include -I/usr/local/include  
> -fno-strict-aliasing -I/usr/local/include -D_LARGEFILE_SOURCE 
> -D_FILE_OFFSET_BITS=64  -I/usr/local/lib/perl5/5.8.3/sun4-solaris/CORE  
> -DHAVE_CONFIG_H -DNSCORE   -c -o sretention.o sretention.c
> gcc -g -O2 -I/usr/local/mysql/include -I/usr/local/include  
> -fno-strict-aliasing -I/usr/local/include -D_LARGEFILE_SOURCE 
> -D_FILE_OFFSET_BITS=64  -I/usr/local/lib/perl5/5.8.3/sun4-solaris/CORE  
> -DHAVE_CONFIG_H -DNSCORE   -c -o perfdata.o perfdata.c
> gcc -g -O2 -I/usr/local/mysql/include -I/usr/local/include  
> -fno-strict-aliasing -I/usr/local/include -D_LARGEFILE_SOURCE 
> -D_FILE_OFFSET_BITS=64  -I/usr/local/lib/perl5/5.8.3/sun4-solaris/CORE  
> -DHAVE_CONFIG_H -DNSCORE -L/usr/local/mysql/lib -L/usr/local/lib 
> -lmysqlclient  nagios.c checks.o config.o commands.o flapping.o 
> logging.o notifications.o sehandlers.o utils.o sretention.o 
> ../xdata/xrddb.c ../common/comments.c ../xdata/xcddb.c 
> ../common/objects.c ../xdata/xodtemplate.c ../common/statusdata.c 
> ../xdata/xsddb.c perfdata.o ../xdata/xpddefault.c ../common/downtime.c 
> ../xdata/xdddb.c   -L/usr/local/lib  
> /usr/local/lib/perl5/5.8.3/sun4-solaris/auto/DynaLoader/DynaLoader.a 
> -L/usr/local/lib/perl5/5.8.3/sun4-solaris/CORE -lperl -lsocket -lnsl 
> -ldl -lm -lc -lm -o nagios
> Undefined                       first referenced
> symbol                             in file
> mysql_close                         /var/tmp//ccsd67N8.o
> mysql_real_connect                  /var/tmp//ccsd67N8.o
> mysql_insert_id                     /var/tmp//ccqrbSj9.o
> mysql_free_result                   /var/tmp//ccsd67N8.o
> mysql_store_result                  /var/tmp//ccsd67N8.o
> mysql_fetch_row                     /var/tmp//ccsd67N8.o
> mysql_errno                         /var/tmp//cc914BQ3.o
> mysql_query                         /var/tmp//ccsd67N8.o
> mysql_init                          /var/tmp//ccsd67N8.o
> ld: fatal: Symbol referencing errors. No output written to nagios
> collect2: ld returned 1 exit status
> make[1]: *** [nagios] Error 1
> make[1]: Leaving directory `/home/jennifer/nagios-1.2/base'
> make: *** [all] Error 2
> #
> 
> 
> *My ENV*
> # env
> GROUP=staff
> HOME=/home/leon
> HOST=ant
> HOSTTYPE=sun4
> LOGNAME=leon
> MACHTYPE=sparc
> MAIL=/var/mail//leon
> OSTYPE=solaris
> PATH=/usr/bin:/usr/local/bin:/usr/ccs/bin:/bin:/usr/local/sbin:/usr/sbin:/sbin:/usr/local/mysql/bin 
> 
> PS1=#
> PWD=/home/jennifer/nagios-1.2
> REMOTEHOST=fw
> SHELL=/bin/sh
> SHLVL=4
> TERM=vt100
> TZ=US/Eastern
> USER=leon
> VENDOR=sun
> LD_LIBRARY_PATH=/usr/local/pgsql/lib:/usr/lib:/usr/local/lib:/lib:/usr/local/ssl/lib:/usr/local/myqsl/libTH=/usr/bin:/usr/local/bin:/usr/ccs/bin:/bin:/usr/local/sbin:/usr/sbin: 
> 
> /sbin:/usr/local/mysql/bin:/usr/local/pgsql/lib:/usr/lib:/usr/local/lib:/lib:/usr/local/ssl/lib:/usr/local/myqsl/lib:/usr/local/lib:/usr/local/mysql/lib:/usr/lib:/var/lib:/usr/share/lib: 
> 
> /usr/perl5/5.6.1/lib:/usr/local/mysql/lib/lib:/etc/lib:/home/jennifer/mrtg-2.10.5/lib:/home/jennifer/nagios-plugins-1.3.1/lib:/home/jennifer/CPAN-1.76/lib 
> 
> 

-- 
Andreas Ericsson                   andreas.ericsson at op5.se
OP5 AB                             www.op5.se
Lead Developer


-------------------------------------------------------
SF email is sponsored by - The IT Product Guide
Read honest & candid reviews on hundreds of IT Products from real users.
Discover which products truly live up to the hype. Start reading now. 
http://productguide.itmanagersjournal.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