Seeking Help Compiling Nagios 1.1 with MySql 4.0.17 max on Solaris 8
lwa at att.net
lwa at att.net
Sat Dec 27 09:05:56 CET 2003
Please forgive for the length of this email....
While I have seen this topic adddresed I have searched the archives and have
not found a solution to this issue.
I can configure and compile NAGIOS 1.1 fine without MySql support. But when I
attempt to configure and compile with MySql Support I get the error claiming
that the following....
../xdata/xrddb.c:41:25: mysql/mysql.h: No such file or directory
../xdata/xrddb.c:42:26: mysql/errmsg.h: No such file or directory
../xdata/xrddb.c:59: error: parse error before "xrddb_mysql"
../xdata/xrddb.c:59: warning: data definition has no type or storage class
../xdata/xrddb.c: In function `xrddb_read_program_information':
../xdata/xrddb.c:823: error: `MYSQL_RES' undeclar....
and on....
The interesting thing is that even though I use the proper configure
directives the configure will not work unless i have
/usr/local/mysql/lib:/use/local/mysql/include in my LD_LIBRARY_PATH.
I have attached output from each step and included my environment.
I have installed the Binary from the MySQl site, 4.0.17 max.
all of the "missing files" are on the file system as part of the install...i
have tried numerous permutations of file/path in the configure invocation and
LD_LIBRARY_PATH to no avail..
I am at a dead end...
Any help would be most appreciated.
######################
GCC version
#######################
Reading specs from /usr/local/lib/gcc-lib/sparc-sun-solaris2.8/3.3.2/specs
Configured with: ../configure --with-as=/usr/ccs/bin/as
--with-ld=/usr/ccs/bin/ld --disable-nls
Thread model: posix
gcc version 3.3.2
##################
make is gmake 3.80
##################
##############################
Here is my configure syntax for nagios...
##############################
./configure --with-mysql-xdata \
--with-mysql-status \
--with-mysql-comments \
--with-mysql-extinfo \
--with-mysql-retention \
--with-mysql-downtime \
--with-mysql-lib=/usr/local/mysql/lib \
--with-mysql-inc=/usr/local/mysql/include \
##############################
Here is my environment..
##############################
DISPLAY=viper:15.0
HOME=/
LD_LIBRARY_PATH=/usr/local/lib:/usr/local/ssl/lib:/usr/local/ssl/bin:/usr/local/mysql/lib:/usr/local/mysql/include
LOGNAME=root
MAIL=/var/mail/root
MANPATH=/usr/man:/usr/local/man:/usr/local/ssl/man:/usr/local/apache/man:/usr/local/OldApacheSSL/man:/usr/share/man:/usr/openwin/share/man:/usr/openwin/man:/usr/dt/share/man:/usr/dt/man:/usr/bin/man:/usr/demo/SOUND/man:/usr/demo/link_audit/man:/usr/java1.2/man:/usr/perl5/man/usr/j2se/man:/opt/SUNWrtvc/man:/opt/ssh2/man:/opt/ipf/man:/pub/Ipfilter/ip_fil3.4.32/SunOS5/sparc-5.8/root/opt/ipf/man:/pub/Ipfilter/ip_fil3.4.32/man
PATH=/usr/local/bin:/bin:/usr/bin:/usr/ucb:/usr/bin/X11:/opt/ssh2:/usr/ccs/bin:/usr/local/ssl/bin:/usr/sbin:/usr/local/sbin
SHELL=/sbin/sh
SSH2_CLIENT=10.94.201.2 2101 10.94.199.151 22
TERM=vt100
TZ=US/Mountain
USER=root
############################
output of crle....
############################
Configuration file [3]: /var/ld/ld.config
Default Library Path (ELF): /usr/lib:/usr/local/lib:/usr/local/mysql/lib
Trusted Directories (ELF): /usr/lib/secure (system default)
Command line:
crle -c /var/ld/ld.config -l /usr/lib:/usr/local/lib:/usr/local/mysql/lib
##########################
OUTPUT of configure....
##########################
creating cache ./config.cache
checking for a BSD compatible install... ./install-sh -c
checking for gcc... gcc
checking whether the C compiler (gcc ) works... yes
checking whether the C compiler (gcc ) is a cross-compiler... no
checking whether we are using GNU C... yes
checking whether gcc accepts -g... yes
checking whether make sets ${MAKE}... yes
checking for strip... /usr/ccs/bin/strip
checking how to run the C preprocessor... gcc -E
checking for ANSI C header files... yes
checking whether time.h and sys/time.h may both be included... yes
checking for sys/wait.h that is POSIX.1 compatible... yes
checking for ctype.h... yes
checking for dirent.h... yes
checking for errno.h... yes
checking for fcntl.h... yes
checking for getopt.h... no
checking for grp.h... yes
checking for limits.h... yes
checking for math.h... yes
checking for pwd.h... yes
checking for signal.h... yes
checking for strings.h... yes
checking for string.h... yes
checking for syslog.h... yes
checking for unistd.h... yes
checking for uio.h... no
checking for sys/types.h... yes
checking for sys/time.h... yes
checking for sys/resource.h... yes
checking for sys/wait.h... (cached) yes
checking for sys/stat.h... yes
checking for sys/ipc.h... yes
checking for sys/msg.h... yes
checking for working const... yes
checking whether struct tm is in sys/time.h or time.h... time.h
checking for tm_zone in struct tm... no
checking for tzname... yes
checking for mode_t... yes
checking for pid_t... yes
checking for size_t... yes
checking return type of signal handlers... void
checking for uid_t in sys/types.h... yes
checking type of array argument to getgroups... gid_t
checking for strdup... yes
checking for strstr... yes
checking for strtoul... yes
checking for initgroups... yes
checking for type of socket size... size_t
checking for mail... /bin/mail
Init script directory: /etc/init.d
We'll use MySQL database routines (in xdata/xsddb.*) for status data I/O...
We'll use MySQL database routines (in xdata/xcddb.*) for comment data I/O...
We'll use MySQL database routines (in xdata/xeddb.*) for extended data I/O...
We'll use MySQL database routines (in xdata/xrddb.*) for retention data I/O...
We'll use template-based routines (in xdata/xodtemplate.*) for object data I/O...
We'll use default routines (in xdata/xpddefault.*) for performance data I/O...
We'll use MySQL database routines (in xdata/xdddb.*) for scheduled downtime
data I/O...
checking for main in -lmysqlclient... yes
MySQL library was found!
checking for gdImagePng in -lgd (order 1)... yes
GD library was found!
checking for traceroute... /usr/sbin/traceroute
checking for snprintf... yes
checking for type va_list... yes
checking for perl... /usr/local/bin/perl
updating cache ./config.cache
creating ./config.status
creating Makefile
creating subst
creating pkginfo
creating base/Makefile
creating common/Makefile
creating contrib/Makefile
creating cgi/Makefile
creating html/Makefile
creating xdata/Makefile
creating daemon-init
creating html/index.html
creating html/side.html
creating common/config.h
creating common/snprintf.h
creating base/nagios.h
creating cgi/cgiutils.h
Creating sample config files in sample-config/ ...
*** Configuration summary for nagios 1.1 06-02-2003 ***:
General Options:
-------------------------
Nagios executable: nagios
Nagios user/group: nagios,nagios
Command user/group: nagios,nagios
Embedded Perl: no
Install ${prefix}: /usr/local/nagios
Lock file: ${prefix}/var/nagios.lock
Init directory: /etc/init.d
Web Interface Options:
------------------------
HTML URL: http://localhost/nagios/
CGI URL: http://localhost/nagios/cgi-bin/
Traceroute (used by WAP): /usr/sbin/traceroute
External Data Routines:
------------------------
Status data: Database (MySQL)
Object data: Template-based (text file)
Comment data: Database (MySQL)
Downtime data: Database (MySQL)
Retention data: Database (MySQL)
Peformance data: Default (external commands)
Extended info data: Database (MySQL)
Review the options above for accuracy. If they look okay,
type 'make all' to compile the main program and CGIs.
########################
OUTPUT from make all...
########################
# make all
cd ./base && make
make[1]: Entering directory `/pub/Nagios/nagios-1.1/base'
gcc -g -O2 -DHAVE_CONFIG_H -DNSCORE -c -o checks.o checks.c
gcc -g -O2 -DHAVE_CONFIG_H -DNSCORE -c -o config.o config.c
gcc -g -O2 -DHAVE_CONFIG_H -DNSCORE -c -o commands.o commands.c
gcc -g -O2 -DHAVE_CONFIG_H -DNSCORE -c -o flapping.o flapping.c
gcc -g -O2 -DHAVE_CONFIG_H -DNSCORE -c -o logging.o logging.c
gcc -g -O2 -DHAVE_CONFIG_H -DNSCORE -c -o notifications.o notifications.c
gcc -g -O2 -DHAVE_CONFIG_H -DNSCORE -c -o sehandlers.o sehandlers.c
gcc -g -O2 -DHAVE_CONFIG_H -DNSCORE -c -o utils.o utils.c
gcc -g -O2 -DHAVE_CONFIG_H -DNSCORE -c -o sretention.o sretention.c
gcc -g -O2 -DHAVE_CONFIG_H -DNSCORE -c -o perfdata.o perfdata.c
gcc -g -O2 -DHAVE_CONFIG_H -DNSCORE -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
../xdata/xrddb.c:41:25: mysql/mysql.h: No such file or directory
../xdata/xrddb.c:42:26: mysql/errmsg.h: No such file or directory
../xdata/xrddb.c:59: error: parse error before "xrddb_mysql"
../xdata/xrddb.c:59: warning: data definition has no type or storage class
../xdata/xrddb.c: In function `xrddb_read_program_information':
../xdata/xrddb.c:823: error: `MYSQL_RES' undeclared (first use in this function)
../xdata/xrddb.c:823: error: (Each undeclared identifier is reported only once
../xdata/xrddb.c:823: error: for each function it appears in.)
../xdata/xrddb.c:823: error: `query_result' undeclared (first use in this
function)
../xdata/xrddb.c:824: error: `MYSQL_ROW' undeclared (first use in this function)
../xdata/xrddb.c:824: error: parse error before "result_row"
../xdata/xrddb.c:854: error: `result_row' undeclared (first use in this function)
../xdata/xrddb.c: In function `xrddb_read_host_information':
../xdata/xrddb.c:921: error: `MYSQL_RES' undeclared (first use in this function)
../xdata/xrddb.c:921: error: `query_result' undeclared (first use in this
function)
../xdata/xrddb.c:922: error: `MYSQL_ROW' undeclared (first use in this function)
../xdata/xrddb.c:922: error: parse error before "result_row"
../xdata/xrddb.c:955: error: `result_row' undeclared (first use in this function)
../xdata/xrddb.c: In function `xrddb_read_service_information':
../xdata/xrddb.c:1098: error: `MYSQL_RES' undeclared (first use in this function)
../xdata/xrddb.c:1098: error: `query_result' undeclared (first use in this
function)
../xdata/xrddb.c:1099: error: `MYSQL_ROW' undeclared (first use in this function)
../xdata/xrddb.c:1099: error: parse error before "result_row"
../xdata/xrddb.c:1133: error: `result_row' undeclared (first use in this function)
../xdata/xcddb.c:49:25: mysql/mysql.h: No such file or directory
../xdata/xcddb.c:50:26: mysql/errmsg.h: No such file or directory
../xdata/xcddb.c:66: error: parse error before "xcddb_mysql"
../xdata/xcddb.c:66: warning: data definition has no type or storage class
../xdata/xcddb.c: In function `xcddb_validate_host_comments':
../xdata/xcddb.c:449: error: `MYSQL_RES' undeclared (first use in this function)
../xdata/xcddb.c:449: error: (Each undeclared identifier is reported only once
../xdata/xcddb.c:449: error: for each function it appears in.)
../xdata/xcddb.c:449: error: `query_result' undeclared (first use in this
function)
../xdata/xcddb.c:450: error: `MYSQL_ROW' undeclared (first use in this function)
../xdata/xcddb.c:450: error: parse error before "result_row"
../xdata/xcddb.c:481: error: `result_row' undeclared (first use in this function)
../xdata/xcddb.c: In function `xcddb_validate_service_comments':
../xdata/xcddb.c:539: error: `MYSQL_RES' undeclared (first use in this function)
../xdata/xcddb.c:539: error: `query_result' undeclared (first use in this
function)
../xdata/xcddb.c:540: error: `MYSQL_ROW' undeclared (first use in this function)
../xdata/xcddb.c:540: error: parse error before "result_row"
../xdata/xcddb.c:570: error: `result_row' undeclared (first use in this function)
../xdata/xsddb.c:46:25: mysql/mysql.h: No such file or directory
../xdata/xsddb.c:47:26: mysql/errmsg.h: No such file or directory
../xdata/xsddb.c:62: error: parse error before "xsddb_mysql"
../xdata/xsddb.c:62: warning: data definition has no type or storage class
../xdata/xsddb.c: In function `xsddb_check_connection':
../xdata/xsddb.c:366: error: `CR_SERVER_LOST' undeclared (first use in this
function)
../xdata/xsddb.c:366: error: (Each undeclared identifier is reported only once
../xdata/xsddb.c:366: error: for each function it appears in.)
../xdata/xsddb.c:366: error: `CR_SERVER_GONE_ERROR' undeclared (first use in
this function)
../xdata/xdddb.c:49:25: mysql/mysql.h: No such file or directory
../xdata/xdddb.c:50:26: mysql/errmsg.h: No such file or directory
../xdata/xdddb.c:66: error: parse error before "xdddb_mysql"
../xdata/xdddb.c:66: warning: data definition has no type or storage class
../xdata/xdddb.c: In function `xdddb_validate_host_downtime':
../xdata/xdddb.c:440: error: `MYSQL_RES' undeclared (first use in this function)
../xdata/xdddb.c:440: error: (Each undeclared identifier is reported only once
../xdata/xdddb.c:440: error: for each function it appears in.)
../xdata/xdddb.c:440: error: `query_result' undeclared (first use in this
function)
../xdata/xdddb.c:441: error: `MYSQL_ROW' undeclared (first use in this function)
../xdata/xdddb.c:441: error: parse error before "result_row"
../xdata/xdddb.c:477: error: `result_row' undeclared (first use in this function)
../xdata/xdddb.c: In function `xdddb_validate_service_downtime':
../xdata/xdddb.c:554: error: `MYSQL_RES' undeclared (first use in this function)
../xdata/xdddb.c:554: error: `query_result' undeclared (first use in this
function)
../xdata/xdddb.c:555: error: `MYSQL_ROW' undeclared (first use in this function)
../xdata/xdddb.c:555: error: parse error before "result_row"
../xdata/xdddb.c:591: error: `result_row' undeclared (first use in this function)
../xdata/xdddb.c: In function `xdddb_read_host_downtime':
../xdata/xdddb.c:1079: error: `MYSQL_RES' undeclared (first use in this function)
../xdata/xdddb.c:1079: error: `query_result' undeclared (first use in this
function)
../xdata/xdddb.c:1080: error: `MYSQL_ROW' undeclared (first use in this function)
../xdata/xdddb.c:1080: error: parse error before "result_row"
../xdata/xdddb.c:1111: error: `result_row' undeclared (first use in this function)
../xdata/xdddb.c: In function `xdddb_read_service_downtime':
../xdata/xdddb.c:1210: error: `MYSQL_RES' undeclared (first use in this function)
../xdata/xdddb.c:1210: error: `query_result' undeclared (first use in this
function)
../xdata/xdddb.c:1211: error: `MYSQL_ROW' undeclared (first use in this function)
../xdata/xdddb.c:1211: error: parse error before "result_row"
../xdata/xdddb.c:1242: error: `result_row' undeclared (first use in this function)
make[1]: *** [nagios] Error 1
make[1]: Leaving directory `/pub/Nagios/nagios-1.1/base'
make: *** [all] Error 2
Thanks in advance,
Lou
-------------------------------------------------------
This SF.net email is sponsored by: IBM Linux Tutorials.
Become an expert in LINUX or just sharpen your skills. Sign up for IBM's
Free Linux Tutorials. Learn everything from the bash shell to sys admin.
Click now! http://ads.osdn.com/?ad_id=1278&alloc_id=3371&op=click
_______________________________________________
Nagios-users mailing list
Nagios-users at 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
More information about the Users
mailing list