From: Shapiro, D. <dav...@bt...> - 2003-09-11 19:27:14
|
make[1]: Entering directory `/usr/local/nagios/base' gcc -g -O2 -I/usr/local/mysql/include -D_REENTRANT -D_GNU_SOURCE -fno-strict-aliasing -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 -I/usr/include/gdbm -I/usr/local/lib/perl5/5.8.0/i686-linux-thread-multi/CORE -DHAVE_CONFIG_H -DNSCORE -c -o xstatusdata-base.o ../xdata/xsddb.c ../xdata/xsddb.c: In function `xsddb_save_status_data': ../xdata/xsddb.c:902: `ERORR' undeclared (first use in this function) ../xdata/xsddb.c:902: (Each undeclared identifier is reported only once ../xdata/xsddb.c:902: for each function it appears in.) ../xdata/xsddb.c: In function `xsddb_save_program_status': ../xdata/xsddb.c:941: `last_update' undeclared (first use in this function) ../xdata/xsddb.c: In function `xsddb_save_host_status': ../xdata/xsddb.c:1054: `host_name' undeclared (first use in this function) ../xdata/xsddb.c: In function `xsddb_save_service_status': ../xdata/xsddb.c:1105: `host_name' undeclared (first use in this function) ../xdata/xsddb.c:1107: `description' undeclared (first use in this function) ../xdata/xsddb.c:1113: `temp_host' undeclared (first use in this function) make[1]: *** [xstatusdata-base.o] Error 1 make[1]: Leaving directory `/usr/local/nagios/ba 902 spelling error -- changed ERORR to ERROR Added to bottom of xsddb.h: time_t last_update; char *host_name; char *description; host *temp_host=NULL; The changes get me past xsddb.c. Now, I am on to: gcc -g -O2 -I/usr/local/mysql/include -D_REENTRANT -D_GNU_SOURCE -fno-strict-aliasing -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 -I/usr/include/gdbm -I/usr/local/lib/perl5/5.8.0/i686-linux-thread-multi/CORE -DHAVE_CONFIG_H -DNSCORE -c -o xdowntime-base.o ../xdata/xdddb.c ../xdata/xdddb.c: In function `xdddb_read_host_downtime': ../xdata/xdddb.c:1140: too few arguments to function `add_host_downtime' ../xdata/xdddb.c: In function `xdddb_read_service_downtime': ../xdata/xdddb.c:1271: too few arguments to function `add_service_downtime' make[1]: *** [xdowntime-base.o] Error 1 make[1]: Leaving directory `/usr/local/nagios/base' add_host_downtime and add_service_downtime are missing triggered_by after fixed option. How do you fix this? I put unsigned long triggered_by = 0; in xdddb.h for now and added triggered_by right after fixed on lines 1140 and 1271. Now I get past xddb.c and on to: make[1]: Entering directory `/usr/local/nagios/base' gcc -g -O2 -I/usr/local/mysql/include -D_REENTRANT -D_GNU_SOURCE -fno-strict-aliasing -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 -I/usr/include/gdbm -I/usr/local/lib/perl5/5.8.0/i686-linux-thread-multi/CORE -DHAVE_CONFIG_H -DNSCORE -o nagios nagios.c broker.o nebmods.o checks.o config.o commands.o events.o flapping.o logging.o notifications.o sehandlers.o utils.o retention-base.o xretention-base.o comments-base.o xcomments-base.o objects-base.o xobjects-base.o statusdata-base.o xstatusdata-base.o perfdata-base.o xperfdata-base.o downtime-base.o xdowntime-base.o -L/usr/local/mysql/lib -rdynamic -L/usr/local/lib /usr/local/lib/perl5/5.8.0/i686-linux-thread-multi/auto/DynaLoader/DynaLoade r.a -L/usr/local/lib/perl5/5.8.0/i686-linux-thread-multi/CORE -lperl -lnsl -ldl -lm -lpthread -lc -lcrypt -lutil -lm -lnsl -lpthread -lltdl -lmysqlclient comments-base.o: In function `add_new_host_comment': /usr/local/nagios/base/../common/comments.c:131: undefined reference to `xcddb_add_new_host_comment' comments-base.o: In function `add_new_service_comment': /usr/local/nagios/base/../common/comments.c:157: undefined reference to `xcddb_add_new_service_comment' comments-base.o: In function `read_comment_data': /usr/local/nagios/base/../common/comments.c:368: undefined reference to `xcddb_read_comment_data' downtime-base.o: In function `add_new_host_downtime': /usr/local/nagios/base/../common/downtime.c:648: undefined reference to `xdddb_add_new_host_downtime' downtime-base.o: In function `add_new_service_downtime': /usr/local/nagios/base/../common/downtime.c:677: undefined reference to `xdddb_add_new_service_downtime' /usr/local/mysql/lib/libmysqlclient.a(my_compress.o): In function `my_compress_alloc': my_compress.o(.text+0xb4): undefined reference to `compress' /usr/local/mysql/lib/libmysqlclient.a(my_compress.o): In function `my_uncompress': my_compress.o(.text+0x12a): undefined reference to `uncompress' collect2: ld returned 1 exit status make[1]: *** [nagios] Error 1 make[1]: Leaving directory `/usr/local/nagios/base' make: *** [all] Error 2 Not sure if this is true, but the ../include/comments.h does not use xcddb_ or xdddb_ in front of the function names. By removing those, it stops whining about undefined references for those functions. Finally, for the last one, undefined reference to compress, I do not know how to fix this. David ------_=_Nex |