Install Plugins on Solaris

Support forum for Nagios Core, Nagios Plugins, NCPA, NRPE, NSCA, NDOUtils and more. Engage with the community of users including those using the open source solutions.
Locked
Schumi
Posts: 2
Joined: Thu Dec 15, 2011 8:33 am

Install Plugins on Solaris

Post by Schumi »

Hello guys,

I have a problem to install the nagios plugins on Solaris 10.

The ./configure order works, but by make or gmake come some mistakes.

Can anyone help me to fix it?

by Make:

$ make
make all-recursive
Making all in gl
make all-recursive
Making all in tap
Making all in lib
Making all in .
Making all in tests
Making all in plugins
gcc -DLOCALEDIR=\"/usr/local/nagios/share/locale\" -DHAVE_CONFIG_H -I. -I.. -I.. -I../lib -I../gl -I../intl -I/usr/include/pgsql -I/include -I/opt/mysql/mysql/include -I/include -I/opt/mysql/mysql/include -m32 -KPIC -g -mt -fsimple=1 -ftrap=%none -nofstore -xbuiltin=%all -xlibmil -xlibmopt -xtarget=generic -DNP_VERSION='"1.4.15"' -g -O2 -MT check_mysql-check_mysql.o -MD -MP -MF .deps/check_mysql-check_mysql.Tpo -c -o check_mysql-check_mysql.o `test -f 'check_mysql.c' || echo './'`check_mysql.c
gcc: unrecognized option `-KPIC'
gcc: unrecognized option `-nofstore'
gcc: language target=generic not recognized
gcc: check_mysql.c: linker input file unused because linking not done
mv -f .deps/check_mysql-check_mysql.Tpo .deps/check_mysql-check_mysql.Po
mv: Zugriff auf .deps/check_mysql-check_mysql.Tpo nicht möglich
*** Error code 2
make: Fatal error: Command failed for target `check_mysql-check_mysql.o'
Current working directory /home/nagios/nagios-plugins-1.4.15/plugins
*** Error code 1
The following command caused the error:
failcom='exit 1'; \
for f in x $MAKEFLAGS; do \
case $f in \
*=* | --[!k]*);; \
*k*) failcom='fail=yes';; \
esac; \
done; \
dot_seen=no; \
target=`echo all-recursive | sed s/-recursive//`; \
list='gl tap lib plugins plugins-scripts plugins-root po'; for subdir in $list; do \
echo "Making $target in $subdir"; \
if test "$subdir" = "."; then \
dot_seen=yes; \
local_target="$target-am"; \
else \
local_target="$target"; \
fi; \
(cd $subdir && make $local_target) \
|| eval $failcom; \
done; \
if test "$dot_seen" = "no"; then \
make "$target-am" || exit 1; \
fi; test -z "$fail"
make: Fatal error: Command failed for target `all-recursive'
Current working directory /home/nagios/nagios-plugins-1.4.15
*** Error code 1
make: Fatal error: Command failed for target `all'

by gmake

$ gmake
gmake all-recursive
gmake[1]: Entering directory `/home/nagios/nagios-plugins-1.4.15'
Making all in gl
gmake[2]: Entering directory `/home/nagios/nagios-plugins-1.4.15/gl'
gmake all-recursive
gmake[3]: Entering directory `/home/nagios/nagios-plugins-1.4.15/gl'
gmake[4]: Entering directory `/home/nagios/nagios-plugins-1.4.15/gl'
gmake[4]: Nothing to be done for `all-am'.
gmake[4]: Leaving directory `/home/nagios/nagios-plugins-1.4.15/gl'
gmake[3]: Leaving directory `/home/nagios/nagios-plugins-1.4.15/gl'
gmake[2]: Leaving directory `/home/nagios/nagios-plugins-1.4.15/gl'
Making all in tap
gmake[2]: Entering directory `/home/nagios/nagios-plugins-1.4.15/tap'
gmake[2]: Nothing to be done for `all'.
gmake[2]: Leaving directory `/home/nagios/nagios-plugins-1.4.15/tap'
Making all in lib
gmake[2]: Entering directory `/home/nagios/nagios-plugins-1.4.15/lib'
Making all in .
gmake[3]: Entering directory `/home/nagios/nagios-plugins-1.4.15/lib'
gmake[3]: Nothing to be done for `all-am'.
gmake[3]: Leaving directory `/home/nagios/nagios-plugins-1.4.15/lib'
Making all in tests
gmake[3]: Entering directory `/home/nagios/nagios-plugins-1.4.15/lib/tests'
gmake[3]: Nothing to be done for `all'.
gmake[3]: Leaving directory `/home/nagios/nagios-plugins-1.4.15/lib/tests'
gmake[2]: Leaving directory `/home/nagios/nagios-plugins-1.4.15/lib'
Making all in plugins
gmake[2]: Entering directory `/home/nagios/nagios-plugins-1.4.15/plugins'
gcc -DLOCALEDIR=\"/usr/local/nagios/share/locale\" -DHAVE_CONFIG_H -I. -I.. -I.. -I../lib -I../gl -I../intl -I/usr/include/pgsql -I/include -I/opt/mysql/mysql/include -I/include -I/opt/mysql/mysql/include -m32 -KPIC -g -mt -fsimple=1 -ftrap=%none -nofstore -xbuiltin=%all -xlibmil -xlibmopt -xtarget=generic -DNP_VERSION='"1.4.15"' -g -O2 -MT check_mysql-check_mysql.o -MD -MP -MF .deps/check_mysql-check_mysql.Tpo -c -o check_mysql-check_mysql.o `test -f 'check_mysql.c' || echo './'`check_mysql.c
gcc: unrecognized option `-KPIC'
gcc: unrecognized option `-nofstore'
gcc: language target=generic not recognized
gcc: check_mysql.c: linker input file unused because linking not done
mv -f .deps/check_mysql-check_mysql.Tpo .deps/check_mysql-check_mysql.Po
mv: Zugriff auf .deps/check_mysql-check_mysql.Tpo nicht möglich
gmake[2]: *** [check_mysql-check_mysql.o] Error 2
gmake[2]: Leaving directory `/home/nagios/nagios-plugins-1.4.15/plugins'
gmake[1]: *** [all-recursive] Error 1
gmake[1]: Leaving directory `/home/nagios/nagios-plugins-1.4.15'
gmake: *** [all] Error 2


I hope anyone can help me :cry:

Greeting
Schumi
crfriend
Posts: 61
Joined: Thu Sep 01, 2011 7:53 am
Location: Central New England (USA)
Contact:

Re: Install Plugins on Solaris

Post by crfriend »

It looks like the configure script got confused because the MySQL package was compiled using a different compiler than the one you're using. To clear the immediate error, you can get into the /home/nagios/nagios-plugins-1.4.15/plugins directory, manually edit the Makefile, and remove the "-KPIC", "-nofstore", and "-xtarget=generic" entries, likely from the CFLAGS line, which may be specific to the MySQL plugin.

The entire world is not GNU.

WARNING: Whilst this may allow compilation, it may produce unstable binaries. You have been warned. Test thoroughly and wisely using a number of test-cases.
Schumi
Posts: 2
Joined: Thu Dec 15, 2011 8:33 am

Re: Install Plugins on Solaris

Post by Schumi »

Thank you crfriend,

But after it, I have this mistake :(

make: Fatal error: Command failed for target `check_http'
Current working directory /usr/local/nagios/nagios-plugins-1.4.15/plugins
*** Error code 1
The following command caused the error:
failcom='exit 1'; \
for f in x $MAKEFLAGS; do \
case $f in \
*=* | --[!k]*);; \
*k*) failcom='fail=yes';; \
esac; \
done; \
dot_seen=no; \
target=`echo all-recursive | sed s/-recursive//`; \
list='gl tap lib plugins plugins-scripts plugins-root po'; for subdir in $list; do \
echo "Making $target in $subdir"; \
if test "$subdir" = "."; then \
dot_seen=yes; \
local_target="$target-am"; \
else \
local_target="$target"; \
fi; \
(cd $subdir && make $local_target) \
|| eval $failcom; \
done; \
if test "$dot_seen" = "no"; then \
make "$target-am" || exit 1; \
fi; test -z "$fail"
make: Fatal error: Command failed for target `all-recursive'
Current working directory /usr/local/nagios/nagios-plugins-1.4.15
*** Error code 1
make: Fatal error: Command failed for target `all'

Maybe someone can help me???
crfriend
Posts: 61
Joined: Thu Sep 01, 2011 7:53 am
Location: Central New England (USA)
Contact:

Re: Install Plugins on Solaris

Post by crfriend »

You don't state whether this is in the compilation phase of "make" or the "install" phase. If it's the latter, I seem to recall a problem where the 'install" script that's delivered with Solaris cannot properly handle subdirectories.

If this is happening in the "install" bit, you'll have to determine the intent of the script (I had to do this, but have conveniently forgotten the details), do the install for the check_http bits manually, and then comment out the offending parts of the Makefile so the bits that reference subdirectories do not trip the process up.

It might be possible to scavenge an "install" script from a GNU/Linux system and have that work, but there's no guarantee that some other GNU-specific bit won't bite you again on anything other than a GNU system.

Developers: Please, the entire world is not GNU; compatibility and portability are virtues -- strive for them.
Locked