Hello!
I am trying to compile nagios-4.0.2 under Ubuntu. If (and only if) I use --disable-event-broker option to configure, build fails:
gcc -Wall -I.. -g -O2 -DHAVE_CONFIG_H -DNSCORE -o nagios nagios.o ../common/shared.o nerd.o query-handler.o workers.o checks.o config.o commands.o events.o flapping.o logging.o macros-base.o netutils.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 -lm ../lib/libnagios.a
nagios.o: In function `main':
/tmp/nagios-4.0.2/base/nagios.c:521: undefined reference to `neb_free_module_list'
nerd.o: In function `nerd_deregister_channel_callbacks':
/tmp/nagios-4.0.2/base/nerd.c:99: undefined reference to `neb_deregister_callback'
nerd.o: In function `nerd_register_channel_callbacks':
/tmp/nagios-4.0.2/base/nerd.c:84: undefined reference to `neb_register_callback'
nerd.o: In function `nerd_deregister_channel_callbacks':
/tmp/nagios-4.0.2/base/nerd.c:99: undefined reference to `neb_deregister_callback'
nerd.o: In function `nerd_init':
/tmp/nagios-4.0.2/base/nerd.c:481: undefined reference to `neb_add_core_module'
collect2: error: ld returned 1 exit status
make[1]: *** [nagios] Error 1
make[1]: Leaving directory `/tmp/nagios-4.0.2/base'
make: *** [nagios] Error 2
Compilation fails if --disable-event-broker
-
sreinhardt
- -fno-stack-protector
- Posts: 4366
- Joined: Mon Nov 19, 2012 12:10 pm
Re: Compilation fails if --disable-event-broker
I can confirm that this is also an issue on Cent, and definitely something with the compilation. Please submit a bug to tracker.nagios.org, probably with a severity of major. It would seem that when making the nagios core binary it is not taking into account that you have chosen not to use the new neb worker functions, which should not be compiled in for this case. This seems to be specific to the nerds channel portion of core, and would be good to mention that as well, despite that it is noted in the output of make all.
Nagios-Plugins maintainer exclusively, unless you have other C language bugs with open-source nagios projects, then I am happy to help! Please pm or use other communication to alert me to issues as I no longer track the forum.