<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML><HEAD><TITLE>Message</TITLE>
<META http-equiv=Content-Type content="text/html; charset=us-ascii">
<META content="MSHTML 6.00.2800.1400" name=GENERATOR></HEAD>
<BODY>
<DIV><FONT face=Arial size=2><SPAN
class=403553914-07072004>Hi,</SPAN></FONT></DIV>
<DIV><FONT face=Arial size=2><SPAN
class=403553914-07072004></SPAN></FONT> </DIV>
<DIV><FONT face=Arial size=2><SPAN class=403553914-07072004>I'm having problems
compiling with MySQL support. I've passed the appropriate flags to the compiler
(note that the db was installed as a binary distribution):</SPAN></FONT></DIV>
<DIV><FONT face=Arial size=2><SPAN
class=403553914-07072004></SPAN></FONT> </DIV>
<DIV><FONT face=Arial size=2><SPAN class=403553914-07072004>./configure
--with-mysql-xdata --with-mysql-lib=/usr/local/mysql/lib
--with-mysql-inc=/usr/local/mysql/include</SPAN></FONT></DIV>
<DIV><FONT face=Arial size=2><SPAN
class=403553914-07072004></SPAN></FONT> </DIV>
<DIV><FONT face=Arial size=2><SPAN class=403553914-07072004>I was getting this
error: ../xdata/xrddb.c:41: mysql/mysql.h: No such file or
directory</SPAN></FONT></DIV>
<DIV><FONT face=Arial size=2><SPAN
class=403553914-07072004></SPAN></FONT> </DIV>
<DIV><FONT face=Arial size=2><SPAN class=403553914-07072004>so I copied the
includes into a subdirectory named mysql within /usr/local/mysql/include. That
took care of the missing header files. The next problem was that gcc couldn't
seem to find the appropriate library files, even though I had specified them on
the config command line. As you can see the library directory is specified with
-L and the library itself is specified with -l. I tried removing these LDFLAGS
and just simply specifying the path to the library.. still no luck.
</SPAN></FONT></DIV>
<DIV><FONT face=Arial size=2><SPAN
class=403553914-07072004></SPAN></FONT> </DIV>
<DIV><FONT face=Arial size=2><SPAN class=403553914-07072004>Here is the current
error:</SPAN></FONT></DIV>
<DIV><FONT face=Arial size=2></FONT> </DIV>
<DIV><FONT face=Arial size=2># make all<BR></FONT><SPAN
class=403553914-07072004></SPAN><FONT face=Arial size=2>.<SPAN
class=403553914-07072004>..</SPAN></FONT></DIV>
<DIV><FONT><FONT face=Arial><FONT size=2><SPAN class=403553914-07072004>gcc -g
-O2 -I/usr/local/mysql/include -DHAVE_CONFIG_H -DNSCORE -L/usr/local/mysql/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 -lm -o
nagios<BR></SPAN>/tmp/ccokJN8q.o: In function
`xrddb_initialize':<BR>/usr/local/src/nagios-1.2/base/../xdata/xrddb.c:224:
undefined reference to `mysql_init'<BR>/tmp/ccokJN8q.o: In function
`xrddb_connect':<BR>/usr/local/src/nagios-1.2/base/../xdata/xrddb.c:286:
undefined reference to
`mysql_real_connect'<BR>/usr/local/src/nagios-1.2/base/../xdata/xrddb.c:256:
undefined reference to `mysql_close'<BR><SPAN
class=403553914-07072004></SPAN>.<SPAN
class=403553914-07072004>..</SPAN></FONT></FONT></FONT></DIV>
<DIV><FONT><FONT face=Arial><FONT size=2><SPAN
class=403553914-07072004></SPAN></FONT></FONT></FONT> </DIV>
<DIV><FONT><FONT><SPAN class=403553914-07072004><FONT face=Arial size=2>Why
can't Nagios find the MySQL library? During config it even claims it
can!</FONT></SPAN></FONT></FONT></DIV>
<DIV><FONT><FONT><SPAN class=403553914-07072004><FONT face=Arial
size=2></FONT></SPAN></FONT></FONT> </DIV>
<DIV><FONT><FONT><SPAN class=403553914-07072004><FONT face=Arial size=2>#
./configure --with-mysql-lib=/usr/local/mysql/lib
--with-mysql-inc=/usr/local/mysql/include
--with-mysql-xdata</FONT></SPAN></FONT></FONT></DIV>
<DIV><FONT><FONT><SPAN class=403553914-07072004><FONT face=Arial
size=2>...</FONT></SPAN></FONT></FONT></DIV>
<DIV><FONT><FONT face=Arial size=2><SPAN class=403553914-07072004>We'll use
MySQL database routines (in xdata/xsddb.*) for status data I/O...<BR>We'll use
MySQL database routines (in xdata/xcddb.*) for comment data I/O...<BR>We'll use
MySQL database routines (in xdata/xeddb.*) for extended data I/O...<BR>We'll use
MySQL database routines (in xdata/xrddb.*) 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 MySQL database routines (in xdata/xdddb.*) for
scheduled downtime data I/O...<BR>checking for main in -lmysqlclient...
yes<BR>MySQL library was
found!<BR></SPAN></FONT></FONT><FONT><FONT></FONT></FONT></DIV>
<DIV><FONT><FONT><FONT face=Arial size=2></FONT></FONT></FONT> </DIV>
<DIV><FONT><FONT><SPAN class=403553914-07072004><FONT face=Arial size=2>Thanks
in advance for the help,</FONT></SPAN></FONT></FONT></DIV>
<DIV><FONT><FONT><SPAN class=403553914-07072004><FONT face=Arial
size=2>Pat</FONT></SPAN></DIV>
<DIV><FONT face=Arial><BR><FONT
size=2></FONT></FONT></DIV></FONT></FONT></BODY></HTML>