nagios-3.1.0 compilation
Anatoly Pugachev
mator at team.co.ru
Sun Mar 22 00:36:37 CET 2009
Hello!
I've a small problem compiling nagios-3.1.0 by default on Solaris 10 x86
box.
1 problem:
nagios-cvs$ make all
cd ./base && make
...
gcc -g -O2 -DHAVE_CONFIG_H -DNSCORE -o nagios nagios.c broker.o nebmods.o checks.o config.o commands.o events.o flapping.o logging.o macros-base.o netutils.o notifications.o sehandlers.o skiplist.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 ../common/snprintf.o -lm -lsocket -lpthread -ldl -lrt
gcc: ../common/snprintf.o: No such file or directory
*** Error code 1
make: Fatal error: Command failed for target `nagios'
Current working directory /home/mator/code/nagios-cvs/base
*** Error code 1
make: Fatal error: Command failed for target `all'
somehow nagios looks for snprintf.o in the "common/" subdirectory, but it is
get compiled in the "base/" subdir.
2 problem:
if i create a symlink (to continue compilation):
nagios-cvs$ (cd common && ln -s ../base/snprintf.o)
nagios-cvs$ make all
cd ./base && make
gcc -g -O2 -DHAVE_CONFIG_H -DNSCORE -o nagios nagios.c broker.o nebmods.o checks.o config.o commands.o events.o flapping.o logging.o macros-base.o netutils.o notifications.o sehandlers.o skiplist.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 ../common/snprintf.o -lm -lpthread -ldl -lrt
Undefined first referenced
symbol in file
recv netutils.o
send netutils.o
socket netutils.o
getsockopt netutils.o
connect netutils.o
getaddrinfo netutils.o
freeaddrinfo netutils.o
ld: fatal: Symbol referencing errors. No output written to nagios
collect2: ld returned 1 exit status
*** Error code 1
make: Fatal error: Command failed for target `nagios'
Current working directory /home/mator/code/nagios-cvs/base
*** Error code 1
make: Fatal error: Command failed for target `all'
somehow nagios doesn't link agains libsocket, and if you take a look into line
105 of configure.in, there will DNL/comment about declaration to link to
libsocket. Can you please remove DNL for this line (uncomment)?
Hope this helps, thanks.
------------------------------------------------------------------------------
Apps built with the Adobe(R) Flex(R) framework and Flex Builder(TM) are
powering Web 2.0 with engaging, cross-platform capabilities. Quickly and
easily build your RIAs with Flex Builder, the Eclipse(TM)based development
software that enables intelligent coding and step-through debugging.
Download the free 60 day trial. http://p.sf.net/sfu/www-adobe-com
More information about the Developers
mailing list