[Nagiosplug-help] Compile problem with Nagios-Plugins 1.4.2 onAIX
Andreas Ericsson
ae at op5.se
Tue Feb 14 12:33:01 CET 2006
Jacob Laack wrote:
> I did that and I get:
> gcc: `-b' must come at the start of the command line
>
So put it at the start of the command line then...
> 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
.. and you forgot '-lmath', and you didn't edit the Makefile, you passed
it from command-line (which I'm not sure AIX Make handles properly) ...
> 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
... meaning you should run
gcc -bloadmap -bnoquiet -L. check_swap.o utils.o ../lib/libnagiosplug.a
../lib/libcoreutils.a popen.o ../intl/libintl.a -liconv -lmath
> 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.
>
Could be, except that it builds just fine on just about all other unix
systems. More likely there's either a bug in your linker, or you have
non-standard libraries installed.
OTOH, you haven't, so far, tried a single thing I suggested, but rather
a subset of it or in a manner different from what I asked you to do. If
you want to try something different, then fine, but don't ask me why it
doesn't work when you do, and don't ask me to provide more things to try
that you can ignore.
--
Andreas Ericsson andreas.ericsson at op5.se
OP5 AB www.op5.se
Tel: +46 8-230225 Fax: +46 8-230231
More information about the Help
mailing list