[EMAIL PROTECTED] wrote: > Hi Andreas, > > Thanks for coming back to me on this. > > Mysql was installed from source > > mysql 5.0.45 > ./configure --prefix=/usr/local/mysql > > I believe that that is the default install location anyway. >
Yup. > I ran ldd, I completely forgot about that and I get the following > > /usr/local/nagios/var # ldd /usr/local/nagios/bin/ndo2db > linux-gate.so.1 => (0xffffe000) > libz.so.1 => /lib/libz.so.1 (0x4001f000) > libnsl.so.1 => /lib/libnsl.so.1 (0x40030000) > libmysqlclient.so.15 => not found > > As you can see its not found the libmysqlclient even though it says it > has. If I run a find I can see it. > Righto. This tells us two things: * It's been successfully linked to libmsysqlclient.so.15 at compile-time. * It doesn't know where to find that lib. There are multiple fixes to this problem. You can do "cp /usr/local/mysql/lib/mysql/libmysqlclient.so.15 /usr/lib; ldconfig" (easiest, but it's got a dirty feel about it) You can add /usr/local/mysql/lib/mysql to your /etc/ld.so.conf and re-run ldconfig. If you don't have an /etc/ld.so.conf your linker isn't new enough and this option won't work. > # find / -name libmysqlclient.so.15 > /usr/local/mysql/lib/mysql/libmysqlclient.so.15 > > I use the following command_line to configure ndo utils > > NDO-Utils 1.4b5 > ./configure --enable-mysql > --with-mysql-lib=/usr/local/mysql/lib/mysql > --with-mysql-inc=/usr/local/mysql/include > > When I run make I get the following error. > > make > cd ./src/; make ; cd .. > make[1]: Entering directory `/home/w/ndoutils-1.4b5/src' > gcc -fPIC -O0 -g -DHAVE_CONFIG_H -c -o io.o io.c > In file included from io.c:10: > ../include/config.h:250:25: mysql/mysql.h: No such file or > directory > ../include/config.h:251:26: mysql/errmsg.h: No such file or > directory > make[1]: *** [io.o] Error 1 > make[1]: Leaving directory `/home/welsht2/ndoutils-1.4b5/src' > Try "make CPPFLAGS=-I/usr/local/mysql/include" instead of the config.h hackery you described (for next time, that is). That will tell the pre-processor to look for include-files in /usr/local/mysql/include as well as the standard /usr/include. > > make ndo2db-2x > make[2]: Entering directory `/home/welsht2/ndoutils-1.4b5/src' > gcc -O0 -g -DHAVE_CONFIG_H -c -o db.o db.c > gcc -O0 -g -DHAVE_CONFIG_H -D BUILD_NAGIOS_2X -c -o > dbhandlers-2x.o dbhandlers.c > gcc -O0 -g -DHAVE_CONFIG_H -I/usr/local/mysql/include -D > BUILD_NAGIOS_2X -o ndo2db-2x ndo2db.c dbhandlers-2x.o io.o utils.o > db.o -L/usr/local/mysql/lib/mysql -lz -lnsl -lmysqlclient -lm Here is actually a problem. Since libmysqlclient.so.15 doesn't exist in the normal ld.so.conf search-path, it should also have added -Wl,r/usr/local/mysql/lib/mysql to the linker options, which would have added /usr/local/mysql/lib/mysql to the search-path for this particular binary only. > > Any more ideas off how I can get this working. Im not very good with > hunting down software compilation problems :( > See above ;-) Inline posting helps a bit when explaining. May I suggest you try it out in your answers? It makes helping out so much easier. You should also try Ton Voon's suggestion, just to see if it fixes the problem permanently. Please report back the results of that particular exercise so we know if it's a real fix or not. Thanks. -- Andreas Ericsson [EMAIL PROTECTED] OP5 AB www.op5.se Tel: +46 8-230225 Fax: +46 8-230231 ------------------------------------------------------------------------- This SF.net email is sponsored by: Microsoft Defy all challenges. Microsoft(R) Visual Studio 2005. http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/ _______________________________________________ Nagios-users mailing list Nagios-users@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