Problem compiling Nagios with mysql support on Solaris 9

Ian Holsman kryton at gmail.com
Fri Sep 10 23:45:16 CEST 2004


hi bill.
you need to much around with the makefile and move -lmysqlclient to
the end i thinjk


----- Original Message -----
From: Winkles, William (Bill) <billwinkles at lucent.com>
Date: Fri, 10 Sep 2004 14:36:52 -0600
Subject: [Nagios-devel] Problem compiling Nagios with mysql support on Solaris 9
To: nagios-devel at lists.sourceforge.net

 
 

All, 

  

I am trying to compile Nagios 1.2 with mysql support on a Solaris 9
box and keep getting the following error:

  

 ld: fatal: Symbol referencing errors. No output written to nagios 

collect2: ld returned 1 exit status 

  

Nagios compiles fine if I don't use mysql. 

  

I am using the following to configure Nagios: 

./configure --with-mysql-xdata
--with-mysql-inc=/usr/local/mysql/include
--with-mysql-lib=/usr/local/mysql/lib

  

No errors on the configure, just when I make. 

  

Any suggestions on what I need to do to resolve this issue?  I'm using
mysql V 4.0.21.  I included the complete make output below.

  

Thanks. 

  

Bill 

  


Bill Winkles 


Lucent Technologies 
m 

Sr. Technical Engineer 

Global Network Operations Center - Denver 

( +1 720/482-6528 (Voice) 

( +1 303/941-2455 (Mobile) 

  

  

# make all 

cd ./base && make 

make[1]: Entering directory `/billy/nagios/nagios-1.2/base' 

gcc -g -O2 -I/usr/local/mysql/include -DHAVE_CONFIG_H -DNSCORE
-L/usr/local/mysq

l/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/com

ments.c ../xdata/xcddb.c ../common/objects.c ../xdata/xodtemplate.c
../common/st

atusdata.c ../xdata/xsddb.c perfdata.o ../xdata/xpddefault.c
../common/downtime.

c ../xdata/xdddb.c    -lm -o nagios 

Undefined                       first referenced 

 symbol                             in file 

mysql_fetch_row                     /var/tmp//cceGv5Hq.o 

mysql_query                         /var/tmp//cceGv5Hq.o 

mysql_errno                         /var/tmp//ccDJD4XD.o 

mysql_close                         /var/tmp//cceGv5Hq.o 

mysql_insert_id                     /var/tmp//ccQzsQ08.o 

mysql_free_result                   /var/tmp//cceGv5Hq.o 

mysql_store_result                  /var/tmp//cceGv5Hq.o 

mysql_init                          /var/tmp//cceGv5Hq.o 

mysql_real_connect                  /var/tmp//cceGv5Hq.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 `/billy/nagios/nagios-1.2/base' 

make: *** [all] Error 2


-------------------------------------------------------
This SF.Net email is sponsored by: YOU BE THE JUDGE. Be one of 170
Project Admins to receive an Apple iPod Mini FREE for your judgement on
who ports your project to Linux PPC the best. Sponsored by IBM. 
Deadline: Sept. 13. Go here: http://sf.net/ppc_contest.php




More information about the Developers mailing list