I can't install plugin version 1.4.15 with the the mysql option:<br> ./configure --with-mysql=/mysql<br><br>Mysql was compiled with gnu.<br><br>I get:<br>[root@pl-db01 /home/mabuaita/nagios-plugins-<div id=":1cw">1.4.15]# grep mysql config.log<br>
$ ./configure --with-mysql=/mysql --with-gnu-ld<br>PATH: /mysql/bin<br>configure:15398: checking for mysql_init in -lmysqlclient<br>configure:15433:
gcc -o conftest -g -O2 -I/mysql/include -L. conftest.c -lmysqlclient
-R/usr/lib/64 -R/lib/64 -L/usr/sfw/lib/64 -L/usr/lib/64 -L/lib/64
-L/mysql/lib -lmysqlclient -lz -lposix4 -lresolv -lsocket -lnsl -lm
>&5<br>
ld: fatal: file /mysql/lib/libmysqlclient.so: wrong ELF class: ELFCLASS64<br>ld: fatal: file /mysql/lib/libmysqlclient.so: wrong ELF class: ELFCLASS64<br><br>My OS:<br>[root@pl-db01 /home/mabuaita/nagios-plugins-1.4.15]# uname -a<br>
SunOS <a href="http://pl-db01.piratelegacy.com/" target="_blank">pl-db01.piratelegacy.com</a> 5.11 snv_121 i86pc i386 i86pc<br><br>My mySQL:<br>[root@pl-db01 /home/mabuaita/nagios-plugins-1.4.15]# mysql -V<br>mysql Ver 14.14 Distrib 5.1.36, for pc-solaris2.10 (x86_64) using readline 5.1<br>
<br>My mysql_config:<br>[root@pl-db01 /home/mabuaita/nagios-plugins-1.4.15]# cat /mysql/bin/mysql_config<br>#!/bin/sh<br># Copyright (C) 2000-2006 MySQL AB<br>#<br># This program is free software; you can redistribute it and/or modify<br>
# it under the terms of the GNU General Public License as published by<br># the Free Software Foundation; version 2 of the License.<br>#<br># This program is distributed in the hope that it will be useful,<br># but WITHOUT ANY WARRANTY; without even the implied warranty of<br>
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the<br># GNU General Public License for more details.<br>#<br># You should have received a copy of the GNU General Public License<br># along with this program; if not, write to the Free Software<br>
# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA<br><br># This script reports various configuration settings that may be needed<br># when using the MySQL client library.<br><br>which ()<br>{<br>
IFS="${IFS= }"; save_ifs="$IFS"; IFS=':'<br> for file<br> do<br> for dir in $PATH<br> do<br> if test -f $dir/$file<br> then<br> echo "$dir/$file"<br> continue 2<br>
fi<br> done<br> echo "which: no $file in ($PATH)"<br> exit 1<br> done<br> IFS="$save_ifs"<br>}<br><br>#<br># If we can find the given directory relatively to where mysql_config is<br>
# we should use this instead of the incompiled one.<br>
# This is to ensure that this script also works with the binary MySQL<br># version<br><br>fix_path ()<br>{<br> var=$1<br> shift<br> for filename<br> do<br> path=$basedir/$filename<br> if [ -d "$path" ] ;<br>
then<br> eval "$var"=$path<br> return<br> fi<br> done<br>}<br><br>get_full_path ()<br>{<br> file=$1<br><br> # if the file is a symlink, try to resolve it<br> if [ -h $file ];<br> then<br> file=`ls -l $file | awk '{ print $NF }'`<br>
fi<br><br> case $file in<br> /*) echo "$file";;<br> */*) tmp=`pwd`/$file; echo $tmp | sed -e 's;/\./;/;' ;;<br> *) which $file ;;<br> esac<br>}<br><br>me=`get_full_path $0`<br><br>basedir=`echo $me | sed -e 's;/bin/mysql_config;;'`<br>
<br>ldata='/usr/local/mysql/data'<br>execdir='/usr/local/mysql/bin'<br>bindir='/usr/local/mysql/bin'<br><br># If installed, search for the compiled in directory first (might be "lib64")<br>
pkglibdir='/usr/local/mysql/lib'<br>pkglibdir_rel=`echo $pkglibdir | sed -e "s;^$basedir/;;"`<br>fix_path pkglibdir $pkglibdir_rel lib/mysql lib<br><br>plugindir='/usr/local/mysql/lib/plugin'<br>
<br>pkgincludedir='/usr/local/mysql/include'<br>fix_path pkgincludedir include/mysql include<br><br>version='5.1.36'<br>socket='/tmp/mysql.sock'<br>ldflags='-R/usr/lib/64 -R/lib/64 -L/usr/sfw/lib/64 -L/usr/lib/64 -L/lib/64 '<br>
<br>if [ 0 -eq 0 ]; then<br> port=0<br>else<br> port=3306<br>fi<br><br># Create options<br># We intentionally add a space to the beginning and end of lib strings, simplifies replace later<br>libs=" $ldflags -L$pkglibdir -lmysqlclient -lz -lposix4 -lresolv -lsocket -lnsl -lm "<br>
libs="$libs "<br>libs_r=" $ldflags -L$pkglibdir -lmysqlclient_r -lz
-lpthread -lthread -lposix4 -lresolv -lsocket -lnsl -lm -lpthread
-lthread "<br>embedded_libs=" $ldflags -L$pkglibdir -lmysqld -ldl -lz
-lpthread -lthread -lposix4 -lresolv -lsocket -lnsl -lm -lpthread
-lthread -lrt "<br>
<br>if [ -r "$pkglibdir/libmygcc.a" ]; then<br> # When linking against the static library with a different version of GCC<br> # from what was used to compile the library, some symbols may not be defined<br> # automatically. We package the libmygcc.a from the build host, to provide<br>
# definitions for those. Bugs 4921, 19561, 19817, 21158, etc.<br> libs="$libs -lmygcc "<br> libs_r="$libs_r -lmygcc "<br> embedded_libs="$embedded_libs -lmygcc "<br>fi<br><br>cflags="-I$pkgincludedir
-g -m64 -xO3 -mt -fsimple=1 -ftrap=%none -nofstore -xbuiltin=%all
-xlibmil -xlibmopt -xtarget=generic -DHAVE_RWLOCK_T -DUNIV_SOLARIS "
#note: end space!<br>
include="-I$pkgincludedir"<br><br># Remove some options that a client doesn't have to care about<br># FIXME until we have a --cxxflags, we need to remove -Xa<br># and -xstrconst to make --cflags usable for Sun Forte C++<br>
# FIXME until we have a --cxxflags, we need to remove -AC99<br># to make --cflags usable for HP C++ (aCC)<br>for remove in DDBUG_OFF DSAFEMALLOC USAFEMALLOC DSAFE_MUTEX \<br> DPEDANTIC_SAFEMALLOC DUNIV_MUST_NOT_INLINE DFORCE_INIT_OF_VARS \<br>
DEXTRA_DEBUG DHAVE_purify O 'O[0-9]' 'xO[0-9]' 'W[-A-Za-z]*' \<br> 'mtune=[-A-Za-z0-9]*' 'mcpu=[-A-Za-z0-9]*' 'march=[-A-Za-z0-9]*' \<br> Xa xstrconst "xc99=none" AC99 \<br>
unroll2 ip mp restrict<br>do<br> # The first option we might strip will always have a space before it because<br> # we set -I$pkgincludedir as the first option<br> cflags=`echo "$cflags"|sed -e "s/ -$remove */ /g"`<br>
done<br>cflags=`echo "$cflags"|sed -e 's/ *\$//'`<br><br># Same for --libs(_r)<br>for remove in lmtmalloc static-libcxa i-static static-intel<br>do<br> # We know the strings starts with a space<br> libs=`echo "$libs"|sed -e "s/ -$remove */ /g"`<br>
libs_r=`echo "$libs_r"|sed -e "s/ -$remove */ /g"`<br> embedded_libs=`echo "$embedded_libs"|sed -e "s/ -$remove */ /g"`<br>done<br><br># Strip trailing and ending space if any, and '+' (FIXME why?)<br>
libs=`echo "$libs" | sed -e 's; \+; ;g' | sed -e 's;^ *;;' | sed -e 's; *\$;;'`<br>libs_r=`echo "$libs_r" | sed -e 's; \+; ;g' | sed -e 's;^ *;;' | sed -e 's; *\$;;'`<br>
embedded_libs=`echo "$embedded_libs" | sed -e 's; \+; ;g' | sed -e 's;^ *;;' | sed -e 's; *\$;;'`<br><br>usage () {<br> cat <<EOF<br>Usage: $0 [OPTIONS]<br>Options:<br> --cflags [$cflags]<br>
--include [$include]<br> --libs [$libs]<br> --libs_r [$libs_r]<br> --plugindir [$plugindir]<br> --socket [$socket]<br> --port [$port]<br>
--version [$version]<br> --libmysqld-libs [$embedded_libs]<br>EOF<br> exit 1<br>}<br><br>if test $# -le 0; then usage; fi<br><br>while test $# -gt 0; do<br> case $1 in<br> --cflags) echo "$cflags" ;;<br>
--include) echo "$include" ;;<br> --libs) echo "$libs" ;;<br> --libs_r) echo "$libs_r" ;;<br> --plugindir) echo "$plugindir" ;;<br> --socket) echo "$socket" ;;<br>
--port) echo "$port" ;;<br> --version) echo "$version" ;;<br> --embedded-libs | --embedded | --libmysqld-libs) echo "$embedded_libs" ;;<br> *) usage ;;<br>
esac<br><br> shift<br>done<br><br>#echo "ldata: '"$ldata"'"<br>#echo "execdir: '"$execdir"'"<br>#echo "bindir: '"$bindir"'"<br>
#echo "pkglibdir: '"$pkglibdir"'"<br>#echo "pkgincludedir: '"$pkgincludedir"'"<br>#echo "version: '"$version"'"<br>#echo "socket: '"$socket"'"<br>
#echo "port: '"$port"'"<br>#echo "ldflags: '"$ldflags"'"<br>#echo "client_libs: '"$client_libs"'"<br><br>exit 0<br>[root@pl-db01 /home/mabuaita/nagios-plugins-1.4.15]#<br>
<br><br>Thanks you.</div>