[Nagiosplug-devel] [ nagiosplug-Patches-635536 ] compilation problem solution for HP-UX!

SourceForge.net noreply at sourceforge.net
Wed May 14 15:48:03 CEST 2003


Patches item #635536, was opened at 2002-11-08 15:33
Message generated for change (Comment added) made by tonvoon
You can respond by visiting: 
https://sourceforge.net/tracker/?func=detail&atid=397599&aid=635536&group_id=29880

Category: Bugfix
Group: None
Status: Open
Resolution: Out of Date
Priority: 5
Submitted By: Alexandre ARMENGAUD (armengaud)
Assigned to: Ton Voon (tonvoon)
Summary: compilation problem solution for HP-UX!

Initial Comment:
Like many people here I had troubles compiling nagios plugins 
on HP-UX.
I wanted to solve it cleanly, so I took the last CVS version and 
tried to debug it.
I found several problems, that I could solve in the "configure.in" 
file.
There was a problem in the snprintf.c : I guess it's a bug in the 
original file from SAMBA, but I didn't dare touching it (there is a 
test on if not defined HAVE_C99_SNPRINTF that isn't defined 
anywhere). I added a test in configure.in  for HP-UX to define it, 
and the "#undef HAVE_C99_SNPRINTF"  in the acconfig.h

There was also problem in the order of test of functions that 
made them fail (probably because of snprintf). I solved that by 
changing test order.

I changed also the configuration to make swap_format work, but 
it's a little dirty because I didn't want to touch the C source, so I 
made used a shell command to have the good swapinfo format.

All seems ok now, and I tested the same configuration files on 
Linux, and it's working.

I join the diff file for this new configuration (files configure.in and 
acconfig.h)



----------------------------------------------------------------------

>Comment By: Ton Voon (tonvoon)
Date: 2003-05-14 23:47

Message:
Logged In: YES 
user_id=664364

There's clearly something wierd going on in the HPUX compilation. 
Unfortunately, I don't think anyone in the Nagios Plugin team has access to 
an HP server, so we will need to rely on someone coming up with a patch.

I'll keep this call open and hopefully someone can assist.

----------------------------------------------------------------------

Comment By: Jason Martens (jasonmartens)
Date: 2003-05-09 20:17

Message:
Logged In: YES 
user_id=775493

I am having the same problem.  
gcc 3.1 64 bit
gnu make 3.80
automake 1.7.4
I downloaded the plugins today (4/9/03) and ran configure,
then gmake all and got the following:

gmake[1]: Entering directory
`/root/nagios-plugins-1.3.0/plugins'
/usr/local/pa20_64/bin/gcc -DHAVE_CONFIG_H -I. -I. -I. -I.
-I. -I. -I. -I. -I.. -I../lib        -g -O2 -c check_disk.c
In file included from check_disk.c:34:
common.h:100: error: conflicting types for `snprintf'
/usr/local/pa20_64/lib/gcc-lib/hppa64-hp-hpux11.00/3.2/include/stdio.h:459:
error: previous declaration of `snprintf'
common.h:104: error: parse error before "va_list"
gmake[1]: *** [check_disk.o] Error 1
gmake[1]: Leaving directory `/root/nagios-plugins-1.3.0/plugins'
gmake: *** [all-recursive] Error 1

I tried implimenting the changes that Alexandre suggested,
but I'm not much of a C programmer...

Jason

----------------------------------------------------------------------

Comment By: Ton Voon (tonvoon)
Date: 2003-04-08 01:22

Message:
Logged In: YES 
user_id=664364

I think this patch is out of date as I think HP-UX builds are currently okay.

If there are no updates after 7 days, I'll close this call.

Ton

----------------------------------------------------------------------

Comment By: Ton Voon (tonvoon)
Date: 2003-01-29 04:47

Message:
Logged In: YES 
user_id=664364

Alexandre,

Thanks for this patch. It looks very interesting, but I am having problems applying your fix to CVS. Can you send me a context or unified diff for the latest CVS version and I'll update it straight away for you to test.

Ton

----------------------------------------------------------------------

You can respond by visiting: 
https://sourceforge.net/tracker/?func=detail&atid=397599&aid=635536&group_id=29880




More information about the Devel mailing list