[Nagiosplug-help] Compile problem with Nagios-Plugins 1.4.2 onAIX

Jacob Laack JLaack at alegent.org
Tue Feb 14 12:15:03 CET 2006


I did that and I get:
gcc: `-b' must come at the start of the command line

Here are the differences between 1.4 and 1.4.2:

# pwd
/usr/local/nagios-plugins-1.4/plugins
# rm check_swap
# check_swap_LDFLAGS=-bloadmap make check_swap
gcc  -g -O2  -L. -o check_swap -bloadmap check_swap.o utils.o ../lib/libnagiosplug.a ../lib/libcoreutils.a popen.o ../intl/libintl.a -liconv
gcc: `-b' must come at the start of the command line
make: *** [check_swap] Error 1
# make check_swap
gcc  -g -O2  -L. -o check_swap  check_swap.o utils.o ../lib/libnagiosplug.a ../lib/libcoreutils.a popen.o ../intl/libintl.a -liconv
# ls check_swap
check_swap
# cd ../../nagios-plugins-1.4.2/plugins
# rm check_swap
rm: check_swap: A file or directory in the path name does not exist.
# check_swap_LDFLAGS=-bloadmap make check_swap
gcc  -g -O2  -L. -o check_swap -bloadmap check_swap.o  utils.o ../lib/libnagiosplug.a ../lib/libcoreutils.a popen.o ../intl/libintl.a -liconv
gcc: `-b' must come at the start of the command line
make: *** [check_swap] Error 1
# make check_swap
gcc  -g -O2  -L. -o check_swap  check_swap.o  utils.o ../lib/libnagiosplug.a ../lib/libcoreutils.a popen.o ../intl/libintl.a -liconv
ld: 0711-317 ERROR: Undefined symbol: .floor
ld: 0711-345 Use the -bloadmap or -bnoquiet option to obtain more information.
collect2: ld returned 8 exit status
make: *** [check_swap] Error 1

I'm guessing there's bug in check_swap.c or in the makefile for that plugin.

-Jake

>>> Andreas Ericsson <ae at op5.se> 2/14/2006 1:57:47 PM >>>
Jacob Laack wrote:
> The system is running AIX 5.1.  I installed GNU make and ran the LDFLAGS command listed and I got pretty much the same thing:
> 
> # LDFLAGS=-bnoquiet make
> make  all-recursive
> make[1]: Entering directory `/usr/local/nagios-plugins-1.4.2'
> Making all in intl
> make[2]: Entering directory `/usr/local/nagios-plugins-1.4.2/intl'
> make[2]: Nothing to be done for `all'.
> make[2]: Leaving directory `/usr/local/nagios-plugins-1.4.2/intl'
> Making all in lib
> make[2]: Entering directory `/usr/local/nagios-plugins-1.4.2/lib'
> make  all-am
> make[3]: Entering directory `/usr/local/nagios-plugins-1.4.2/lib'
> make[3]: Nothing to be done for `all-am'.
> make[3]: Leaving directory `/usr/local/nagios-plugins-1.4.2/lib'
> make[2]: Leaving directory `/usr/local/nagios-plugins-1.4.2/lib'
> Making all in plugins
> make[2]: Entering directory `/usr/local/nagios-plugins-1.4.2/plugins'
> gcc  -g -O2  -L. -o check_swap  check_swap.o  utils.o ../lib/libnagiosplug.a ../lib/libcoreutils.a popen.o ../intl/libintl.a -liconv
> ld: 0711-317 ERROR: Undefined symbol: .floor


Hmm. Try editing the makefile and adding "-bnoquiet -bloadmap -lmath" to 
the LDFLAGS variable. It should be set in the plugins/ directory

"undefined symbol" means that the linker can't find it in the code or in 
one of the compiled libraries. floor() being a math function, it should 
be in libmath if anywhere.

-- 
Andreas Ericsson                   andreas.ericsson at op5.se 
OP5 AB                             www.op5.se 
Tel: +46 8-230225                  Fax: +46 8-230231


-------------------------------------------------------
This SF.net email is sponsored by: Splunk Inc. Do you grep through log files
for problems?  Stop!  Download the new AJAX search engine that makes
searching your log files as easy as surfing the  web.  DOWNLOAD SPLUNK!
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=103432&bid=230486&dat=121642 
_______________________________________________
Nagiosplug-help mailing list
Nagiosplug-help at lists.sourceforge.net 
https://lists.sourceforge.net/lists/listinfo/nagiosplug-help 
::: Please include plugins version (-v) and OS when reporting any issue. 
::: Messages without supporting info will risk being sent to /dev/null







More information about the Help mailing list