<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
  <title></title>
</head>
<body>
Look at this:<br>
<a class="moz-txt-link-freetext" href="http://article.gmane.org/gmane.network.nagios.user/14423">http://article.gmane.org/gmane.network.nagios.user/14423</a><br>
<br>
<br>
Donahue, Pat wrote:<br>
<blockquote type="cite"
 cite="mid32871003F0BDC84E99E69EB6E9AE3AB410F93B@HQ-MAIL">
  <title>Message</title>
  <meta http-equiv="Content-Type" content="text/html; ">
  <meta content="MSHTML 6.00.2800.1400" name="GENERATOR">
  <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> </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"></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></div>
  <div> </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></font></font></div>
  <div><font><font><font face="Arial"><br>
  </font></font></font></div>
</blockquote>
<br>
<pre class="moz-signature" cols="72">-- 
**********************************
VERDON Carole
Ingénieur Système
CICT - Université Paul Sabatier
118, route de Narbonne
31062 Toulouse Cedex
Tél.: 05.61.36.60.44
Fax: 05.61.52.14.58
Mail: <a class="moz-txt-link-abbreviated" href="mailto:verdon@cict.fr">verdon@cict.fr</a>
**********************************      
</pre>
</body>
</html>