[Nagiosplug-help] Problems with mysql when compiling plugins

Lars Stavholm stava at telcotec.se
Wed Feb 7 13:41:27 CET 2007


It would appear that the mysql header files are missing on your system.
Try installing mysql-devel rpm (if you have rpm system). Otherwise, grab
the source code for mysql and tell nagios-plugins where it is by using
one of the configure --with options.
/Lars

jocke khazad wrote:
> First of all I cant use --with-nagios-user=nagios, it says the command is
> depricated. Deleted it and is hoping it uses both nagios as user and group
> as default.
> 
> Main problem is that I get errors when compiling plugins for mysql. Compile
> seems fine until I get this error:
> 
> Making all in plugins
> make[2]: Entering directory `/usr/local/nagios/libexec/nagios-plugins-1.4.6
> /plugins'
> if gcc -DLOCALEDIR=\"/usr/local/nagios/share/locale\" -DHAVE_CONFIG_H -I.
> -I. -I.. -I.. -I../lib -I../gl -I../intl -I/usr/include/ldap
> -I/usr/include  -I/usr/kerberos/include -I'/usr/include' -g -O2 -MT
> check_mysql-check_mysql.o -MD -MP -MF
> ".deps/check_mysql-check_mysql.Tpo" -c
> -o check_mysql-check_mysql.o `test -f 'check_mysql.c' || echo
> './'`check_mysql.c; \
> then mv -f ".deps/check_mysql-check_mysql.Tpo"
> ".deps/check_mysql-check_mysql.Po"; else rm -f
> ".deps/check_mysql-check_mysql.Tpo"; exit 1; fi
> check_mysql.c:51:19: mysql.h: No such file or directory
> check_mysql.c:52:20: errmsg.h: No such file or directory
> check_mysql.c:58: `MYSQL_PORT' undeclared here (not in a function)
> check_mysql.c: In function `main':
> check_mysql.c:73: `MYSQL' undeclared (first use in this function)
> check_mysql.c:73: (Each undeclared identifier is reported only once
> check_mysql.c:73: for each function it appears in.)
> check_mysql.c:73: parse error before "mysql"
> check_mysql.c:74: `MYSQL_RES' undeclared (first use in this function)
> check_mysql.c:74: `res' undeclared (first use in this function)
> check_mysql.c:75: `MYSQL_ROW' undeclared (first use in this function)
> check_mysql.c:75: parse error before "row"
> check_mysql.c:91: `mysql' undeclared (first use in this function)
> check_mysql.c:93: `MYSQL_READ_DEFAULT_GROUP' undeclared (first use in this
> function)
> check_mysql.c:97: `CR_UNKNOWN_HOST' undeclared (first use in this function)
> check_mysql.c:99: `CR_VERSION_ERROR' undeclared (first use in this
> function)
> check_mysql.c:101: `CR_OUT_OF_MEMORY' undeclared (first use in this
> function)
> check_mysql.c:103: `CR_IPSOCK_ERROR' undeclared (first use in this
> function)
> check_mysql.c:105: `CR_SOCKET_CREATE_ERROR' undeclared (first use in this
> function)
> check_mysql.c:112: warning: passing arg 1 of `strlen' makes pointer from
> integer without a cast
> check_mysql.c:112: warning: passing arg 2 of `memcpy' makes pointer from
> integer without a cast
> check_mysql.c:112: warning: passing arg 1 of `__strdup' makes pointer from
> integer without a cast
> check_mysql.c:116: `CR_SERVER_GONE_ERROR' undeclared (first use in this
> function)
> check_mysql.c:118: `CR_SERVER_LOST' undeclared (first use in this function)
> check_mysql.c:120: `CR_UNKNOWN_ERROR' undeclared (first use in this
> function)
> check_mysql.c:127: warning: passing arg 1 of `strlen' makes pointer from
> integer without a cast
> check_mysql.c:127: warning: passing arg 2 of `memcpy' makes pointer from
> integer without a cast
> check_mysql.c:127: warning: passing arg 1 of `__strdup' makes pointer from
> integer without a cast
> check_mysql.c:134: warning: passing arg 1 of `strlen' makes pointer from
> integer without a cast
> check_mysql.c:134: warning: passing arg 2 of `memcpy' makes pointer from
> integer without a cast
> check_mysql.c:134: warning: passing arg 1 of `__strdup' makes pointer from
> integer without a cast
> check_mysql.c:146: `row' undeclared (first use in this function)
> check_mysql.c:147: warning: passing arg 1 of `strlen' makes pointer from
> integer without a cast
> check_mysql.c:147: warning: passing arg 2 of `memcpy' makes pointer from
> integer without a cast
> check_mysql.c:147: warning: passing arg 1 of `__strdup' makes pointer from
> integer without a cast
> check_mysql.c:165: `MYSQL_FIELD' undeclared (first use in this function)
> check_mysql.c:165: `fields' undeclared (first use in this function)
> check_mysql.c: In function `print_help':
> check_mysql.c:367: `MYSQL_PORT' undeclared (first use in this function)
> make[2]: *** [check_mysql-check_mysql.o] Error 1
> make[2]: Leaving directory `/usr/local/nagios/libexec/nagios-plugins-1.4.6
> /plugins'
> make[1]: *** [all-recursive] Error 1
> make[1]: Leaving directory `/usr/local/nagios/libexec/nagios-plugins-1.4.6'
> make: *** [all] Error 2
> 
> 
> 
> 
> Anyone have any ideas how to get this working?
> 
> 
> ------------------------------------------------------------------------
> 
> -------------------------------------------------------------------------
> Using Tomcat but need to do more? Need to support web services, security?
> Get stuff done quickly with pre-integrated technology to make your job easier.
> Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo
> http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642
> 
> 
> ------------------------------------------------------------------------
> 
> _______________________________________________
> Nagiosplug-help mailing list
> Nagiosplug-help at lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/nagiosplug-help
> ::: Please include plugins version (-v) and OS when reporting any issue. 
> ::: Messages without supporting info will risk being sent to /dev/null





More information about the Help mailing list