[Nagiosplug-devel] compiling check_icmp on Solaris 5.9
Stephan Janosch
stephan.janosch at interface-business.de
Fri Feb 4 05:26:04 CET 2005
Hi guys!
I compiled plugins 1.4 on a solaris (SunOS <hostname> 5.9
Generic_117171-15 sun4u sparc SUNW,UltraAX-i2 ) box. Following error
occured:
# make
make all-recursive
Making all in intl
Making all in lib
make all-am
Making all in plugins
gcc -g -O2 -L. -o check_icmp check_icmp.o ../intl/libintl.a -liconv
-lgen -lsocket
Undefined first referenced
symbol in file
gethostbyname check_icmp.o (symbol belongs to
implicit dependency /usr/lib/libnsl.so.1)
inet_addr check_icmp.o (symbol belongs to
implicit dependency /usr/lib/libnsl.so.1)
inet_ntoa check_icmp.o (symbol belongs to
implicit dependency /usr/lib/libnsl.so.1)
ld: fatal: Symbol referencing errors. No output written to check_icmp
collect2: ld returned 1 exit status
*** Error code 1
make: Fatal error: Command failed for target `check_icmp'
Current working directory /export/home/stephan/nagios-plugins-1.4/plugins
*** Error code 1
make: Fatal error: Command failed for target `all-recursive'
Sorry for the linebreaks. These three symbols could not be found,
because they are defined in _libnsl_. So I did following:
I added "-lnsl" to the "gcc-line":
# gcc -g -O2 -L. -o check_icmp check_icmp.o ../intl/libintl.a
-liconv -lgen -lsocket -lnsl
Then check_icmp was complied succesfully.
I hope, that helps on future issues with check_icmp.
Best regards, Stephan
More information about the Devel
mailing list