<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML><HEAD>
<META http-equiv=Content-Type content="text/html; charset=iso-8859-1">
<META content="MSHTML 6.00.2800.1400" name=GENERATOR>
<STYLE></STYLE>
</HEAD>
<BODY bgColor=#ffffff>
<DIV><FONT face=Arial>I am getting errors when I "make all" after configuring
Nagios (1.1) with mysql support (4.0). </FONT></DIV>
<DIV><FONT face=Arial></FONT> </DIV>
<DIV><FONT face=Arial>When I "configure" :</FONT></DIV>
<DIV><FONT face=Arial></FONT> </DIV>
<DIV><FONT face=Arial> <FONT size=2><FONT size=3>./configure
--prefix=/logiciels/nagios/ --with-gd-lib=/usr/local/lib
--with-gd-inc=/usr/local/include --with-mysql-status
--with-mysql-lib=/usr/lib/mysql
--with-mysql-inc=/usr/include/mysql</FONT></FONT></FONT></DIV>
<DIV><FONT face=Arial><FONT size=2><FONT
size=3></FONT></FONT></FONT> </DIV>
<DIV><FONT face=Arial><FONT size=2><FONT size=3>Everything is ok
:</FONT></FONT></FONT></DIV>
<DIV><FONT face=Arial><FONT size=2><FONT
size=3></FONT></FONT></FONT> </DIV>
<DIV><FONT face=Arial><FONT size=2><FONT size=3>...</FONT></FONT></FONT></DIV>
<DIV><FONT face=Arial></FONT> </DIV>
<DIV><FONT face=Arial><FONT size=2><FONT size=3>We'll use MySQL database
routines (in xdata/xsddb.*) for status data I/O...<BR>We'll use default routines
(in xdata/xcddefault.*) for comment data I/O...<BR>We'll use template-based
routines (in xdata/xedtemplate.*) for extended data I/O...<BR>We'll use default
routines (in xdata/xrddefault.*) for retention data I/O...<BR>We'll use
template-based routines (in xdata/xodtemplate.*) for object data I/O...<BR>We'll
use default routines (in xdata/xpddefault.*) for performance data
I/O...<BR>We'll use default routines (in xdata/xdddefault.*) for scheduled
downtime data I/O...<BR>checking for main in -lmysqlclient... yes<BR>MySQL
library was found!</FONT><BR>....</DIV>
<DIV><BR></DIV></FONT></FONT>
<DIV><FONT face=Arial>But when I "make all". I get the following
errors:<BR> <BR><FONT size=2><FONT
size=3>Undefined
first
referenced<BR> symbol
in
file<BR>mysql_init
/var/tmp//cc8QZRJY.o<BR>mysql_errno
/var/tmp//cc8QZRJY.o<BR>mysql_close
/var/tmp//cc8QZRJY.o<BR>mysql_query
/var/tmp//cc8QZRJY.o<BR>mysql_real_connect
/var/tmp//cc8QZRJY.o<BR>ld: fatal: Symbol referencing errors. No output written
to nagios<BR>collect2: ld returned 1 exit status<BR>*** Error code 1<BR>make:
Fatal error: Command failed for target `nagios'<BR>Current working directory
/logiciels/nagios/sources/nagios-1.1/base<BR>*** Error code 1<BR>make: Fatal
error: Command failed for target `all'</FONT><BR></FONT></FONT></DIV>
<DIV><FONT face=Arial><FONT size=2></FONT></FONT> </DIV>
<DIV><FONT face=Arial><FONT size=2><FONT size=3> I have seen references to
these errors on this mailing list and the fix was to put the LDFLAGS
statements:</FONT>
<DIV><FONT face=Arial></FONT> </DIV>
<DIV><FONT face=Arial><FONT size=2><FONT size=3> -L/usr/lib/mysql/lib
-lmysqlclient -lz<BR><BR>at the end of the compile statement after the file
names like so:<BR><BR>gcc -g -O2 -I/usr/include/mysql/include -DHAVE_CONFIG_H
-DNSCGI avail.c getcgi.o cgiutils.o auth.o popen.o ../common/objects.c
../xdata/xodtemplate.c ../common/statusdata.c ../xdata/xsddb.c -o avail.cgi
-L/usr/lib/mysql/lib -lmysqlclient
-lz</FONT><BR></FONT></FONT></FONT></FONT><FONT face=Arial><BR> A
user discovered this related to Nagios being unable to find the MySQL
libaries<BR> (<A href="http://www.mysql.com/doc/en/Link_errors.html"
target=_NEW>http://www.mysql.com/doc/en/Link_errors.html</A>).<BR> <BR><BR>
Anybody knows how to change the makefile to move the LDFLAGS stuff to the end of
the compilation statement or</FONT><FONT face=Arial> How to
compile manually each program ? Or something else to solve my
problem?</FONT></DIV>
<DIV><FONT face=Arial></FONT> </DIV>
<DIV><FONT face=Arial>I become crazy...Please, help me</FONT></DIV>
<DIV><FONT face=Arial></FONT> </DIV>
<DIV><FONT face=Arial> <BR></DIV></DIV></FONT></BODY></HTML>