[Nagiosplug-help] check_procs 1.4.2 returns 0 processes in Solaris8

Jacob Laack JLaack at alegent.org
Thu Apr 27 13:08:01 CEST 2006


Thank you, thank you for responding!  I downloaded the file, configured it (./configure), then compiled (make all) on the same machine...  Unfortunately, I get this mid compile:

gcc -Wall -g -O2 -o check_disk check_disk.o utils.o popen.o  -L/usr/local/nagiosbuild/nagios-plugins-HEAD-200604271152/plugins ../lib/libnagiosplug.a ../lib/libcoreutils.a ../intl/libintl.a -lgen -lsocket -lssl -lcrypto -R/usr/local/ssl/lib
ld: fatal: library -lssl: not found
ld: fatal: library -lcrypto: not found
ld: fatal: File processing errors. No output written to check_disk
collect2: ld returned 1 exit status
*** Error code 1
make: Fatal error: Command failed for target `check_disk'
Current working directory /usr/local/nagiosbuild/nagios-plugins-HEAD-200604271152/plugins
*** Error code 1
make: Fatal error: Command failed for target `all-recursive'
Current working directory /usr/local/nagiosbuild/nagios-plugins-HEAD-200604271152/plugins
*** Error code 1
make: Fatal error: Command failed for target `all-recursive'
Current working directory /usr/local/nagiosbuild/nagios-plugins-HEAD-200604271152
*** Error code 1
make: Fatal error: Command failed for target `all'

The 1.4.2 plugins compile just fine on the same machine.  The matching lines there are:

if gcc -DLOCALEDIR=\"/usr/local/nagios/share/locale\" -DHAVE_CONFIG_H -I. -I. -I
.. -I.. -I../lib -I../intl     -g -O2 -MT popen.o -MD -MP -MF ".deps/popen.Tpo"
-c -o popen.o popen.c; \
then mv -f ".deps/popen.Tpo" ".deps/popen.Po"; else rm -f ".deps/popen.Tpo"; exi
t 1; fi
gcc  -g -O2  -L. -o check_disk  check_disk.o utils.o ../lib/libnagiosplug.a ../l
ib/libcoreutils.a popen.o ../intl/libintl.a  -lgen -lsocket
if gcc -DLOCALEDIR=\"/usr/local/nagios/share/locale\" -DHAVE_CONFIG_H -I. -I. -I
.. -I.. -I../lib -I../intl     -g -O2 -MT check_dummy.o -MD -MP -MF ".deps/check
_dummy.Tpo" -c -o check_dummy.o check_dummy.c; \
then mv -f ".deps/check_dummy.Tpo" ".deps/check_dummy.Po"; else rm -f ".deps/che
ck_dummy.Tpo"; exit 1; fi
gcc  -g -O2  -L. -o check_dummy  check_dummy.o utils.o ../lib/libnagiosplug.a ..
/lib/libcoreutils.a ../intl/libintl.a  -lgen -lsocket

I notice that the -lssl and -lcrypto the compiler is complaining about are not in this text.  What can I do about that?

Jake Laack
Alegent Health Open Systems Engineer

>>> Ton Voon <ton.voon at altinity.com> 4/27/2006 8:27 AM >>>
Jacob,

Thanks for your investigations. I've just committed a patch where if  
HAVE_BASENAME is not found, an internal version of basename is used  
instead.

Can you try the CVS snapshot at http://nagiosplug.sf.net/snapshot and  
let us know if this is fixed for you.

Ton

On 13 Apr 2006, at 17:28, Jacob Laack wrote:

> Johan-
> Your option 1 and 2 both worked so I tried to figure out why.  A  
> diff on check_procs.c from 1.4 and 1.4.2 reveals this:
>
> 175,179c181,184
> <                       temp_string = strtok ((char *)procprog, "/");
> <                       while (temp_string) {
> <                               strcpy(procprog, temp_string);
> <                               temp_string = strtok (NULL, "/");
> <                       }
> ---
>> #ifdef HAVE_BASENAME
>>                       temp_string = strdup(procprog);
>>                       procprog = basename(temp_string);
>> #endif /* HAVE_BASENAME */
>
> It looks like the basename function is being used now, however, on  
> the Solaris machine HAVE_BASENAME is not defined and the entire  
> section is being skipped.  I've grep'ed all the files in the  
> plugins source but nowhere is that constant defined.  I'm assuming  
> it's being defined elsewhere on other OSes.  Other than manually  
> patching the old over the new, what do you all suggest?

Ton

http://www.altinity.com 
T: +44 (0)870 787 9243
F: +44 (0)845 280 1725
Skype: tonvoon




-------------------------------------------------------
Using Tomcat but need to do more? Need to support web services, security?
Get stuff done quickly with pre-integrated technology to make your job easier
Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&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