[Nagios-users] check_mysql compile issue - x86_64
Hi I seems to be having an issue compiling the check_mysql plugin on a x86_64 box. I have MySQL installed and running and my compile line looks like... ./configure --prefix=/opt/nagios-2.0 --with-nagios-user=nagios --with-nagios-group=nagios --with-cgiurl=/cgi-bin --with-mysql=/opt/mysql however as you can see from the error below mysql libs are not found configure:9368: checking for mysql_init in -lmysqlclient configure:9398: gcc -o conftest -g -O2 -I/opt/mysql/include -L. conftest.c -lmysqlclient -L/opt/mysql/lib/mysql -lz 5 /usr/bin/ld: cannot find -lmysqlclient | char mysql_init (); | mysql_init (); configure:9436: checking for mysql_close in -lmysqlclient configure:9466: gcc -o conftest -g -O2 -I/opt/mysql/include -L. conftest.c -lmysqlclient 5 /usr/bin/ld: cannot find -lmysqlclient | char mysql_close (); | mysql_close (); configure:10217: WARNING: Skipping mysql plugin configure:10219: WARNING: install mysql client libs to compile this plugin (see REQUIREMENTS). ac_cv_lib_mysqlclient_mysql_close=no ac_cv_lib_mysqlclient_mysql_init=no however $ ls -l /opt/mysql/lib/ total 6160 -rw-rw-r-- 1 8972 8972 11790 Sep 2 23:55 libdbug.a -rw-r--r-- 1 8972 8972 57872 Feb 28 2005 libmygcc.a -rw-rw-r-- 1 8972 8972 312020 Sep 2 23:55 libmysqlclient.a -rw-rw-r-- 1 8972 8972 321234 Sep 2 23:54 libmysqlclient_r.a -rw-rw-r-- 1 8972 8972 5201886 Sep 3 00:05 libmysqld.a -rw-r--r-- 1 8972 89721685 Sep 2 23:38 libmysql.imp -rw-rw-r-- 1 8972 8972 112282 Sep 2 23:55 libmystrings.a -rw-rw-r-- 1 8972 8972 241102 Sep 2 23:55 libmysys.a any ideas?? this is using mysql 4.0.26 --- This SF.net email is sponsored by: Splunk Inc. Do you grep through log files for problems? Stop! Download the new AJAX search engine that makes searching your log files as easy as surfing the web. DOWNLOAD SPLUNK! http://sel.as-us.falkag.net/sel?cmd=lnkkid=103432bid=230486dat=121642 ___ 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
Re: [Nagios-users] check_mysql compile issue - x86_64
It's not the *best* solution but a work around to this is to manually edit the configure file before doing your ./configure as the configure file has /usr/lib hard-coded and won't figure out /usr/lib64 without some help *note* all this is from a Red Hat point of view, may require some modification for your build find MYSQLLIBDIR=$MYSQL/lib chage it to MYSQLLIBDIR=$MYSQL/lib64 hmmm mine looked a bit different but the process was similar - however it seems that now it is not happy about the version configure:9368: checking for mysql_init in -lmysqlclient configure:9398: gcc -o conftest -g -O2 -I/opt/mysql/include -L. conftest.c -lmysqlclient -L/opt/mysql/lib -lz 5 /usr/bin/ld: skipping incompatible /opt/mysql/lib/libmysqlclient.a when searching for -lmysqlclient /usr/bin/ld: cannot find -lmysqlclient | char mysql_init (); | mysql_init (); configure:9436: checking for mysql_close in -lmysqlclient configure:9466: gcc -o conftest -g -O2 -I/opt/mysql/include -L. conftest.c -lmysqlclient 5 /usr/bin/ld: cannot find -lmysqlclient | char mysql_close (); | mysql_close (); configure:10217: WARNING: Skipping mysql plugin this is on a CentOS 4.2 box (RHEL4) - it can now find the lib but any ideas on the version issue? thanks --- This SF.net email is sponsored by: Splunk Inc. Do you grep through log files for problems? Stop! Download the new AJAX search engine that makes searching your log files as easy as surfing the web. DOWNLOAD SPLUNK! http://sel.as-us.falkag.net/sel?cmd=lnkkid=103432bid=230486dat=121642 ___ 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
Re: [Nagios-users] check_mysql compile issue - x86_64
this is on a CentOS 4.2 box (RHEL4) - it can now find the lib but any ideas on the version issue? Slightly off topic but... Why are you building this from source? It's already been built and packaged in rpm form for use on RHEL/CentOS. I run these packages on centos regularly with no problem at all. http://dag.wieers.com/packages/nagios-plugins/ http://dag.wieers.com/packages/nagios/ If nothing else, take a look at the spec file to see how dag handles the builds for x86_64. -- They that can give up essential liberty to obtain a little temporary safety deserve neither liberty nor safety'' Benjamin Franklin 1775 --- This SF.net email is sponsored by: Splunk Inc. Do you grep through log files for problems? Stop! Download the new AJAX search engine that makes searching your log files as easy as surfing the web. DOWNLOAD SPLUNK! http://sel.as-us.falkag.net/sel?cmd=lnkkid3432bid#0486dat1642 ___ 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