[Nagiosplug-devel] Nagiosplug-devel Digest, Vol 21, Issue 7 (Olivier 'Babar' Raginel)
Matthias.Broenner at systemagmbh.de
Matthias.Broenner at systemagmbh.de
Tue Feb 12 10:46:51 CET 2008
Hello
i fixed the error according to this article. I compiled the plugins on HPUX
sucessfully :)
@Ton what should i do now ? Should i wait until the 2 HP UX errors are
fixed in the source ? Should i fix them by hand build and subbmit daily to
tinderbox ?
https://sourceforge.net/tracker/?func=detail&atid=397599&aid=1864550&group_id=29880
diff -Naur nagios-plugins-1.4.11/plugins/check_swap.c
nagios-plugins-1.4.11-hpux-floor/plugins/check_swap.c
--- nagios-plugins-1.4.11/plugins/check_swap.c 2007-12-10
08:52:00.000000000 +0100
+++ nagios-plugins-1.4.11-hpux-floor/plugins/check_swap.c 2008-01-05
17:11:46.696863797 +0100
@@ -427,7 +427,7 @@
else if (strstr (optarg, ",") &&
strstr (optarg, "%") &&
sscanf (optarg, "%f,%d%%",
&warn_size_bytes, &warn_percent) == 2) {
- warn_size_bytes = floorf(warn_size_bytes);
+ warn_size_bytes = (float) floor(warn_size_bytes);
break;
}
else if (strstr (optarg, "%") &&
@@ -445,7 +445,7 @@
else if (strstr (optarg, ",") &&
strstr (optarg, "%") &&
sscanf (optarg, "%f,%d%%",
&crit_size_bytes, &crit_percent) == 2) {
- crit_size_bytes = floorf(crit_size_bytes);
+ crit_size_bytes = (float) floor(crit_size_bytes);
break;
}
else if (strstr (optarg, "%") &&
Message: 1
Date: Mon, 11 Feb 2008 22:18:17 +0100
From: Olivier 'Babar' Raginel <nagios at babar.us>
Subject: Re: [Nagiosplug-devel] Nagiosplug-devel Digest, Vol 21, Issue
7
To: Nagios Plugin Development Mailing List
<nagiosplug-devel at lists.sourceforge.net>
Message-ID: <20080211211817.GA7087 at mail.babar.us>
Content-Type: text/plain; charset=us-ascii
On Mon, Feb 11, 2008 at 05:36:37PM +0100, Matthias.Broenner at systemagmbh.de
wrote:
> i removed the line from 108-111 in utils_base.c. Now "make" goes on :)
...
> until next error....
> cc -g -o check_swap check_swap.o utils.o popen.o
> -L/root/nagios-plugins-1.4.11/plugins -L/opt/openssl/lib -lm
> ../lib/libnagiosplug.a ../gl/libgnu.a
> /usr/ccs/bin/ld: Unsatisfied symbols:
> floorf (first referenced in check_swap.o) (code)
> *** Error exit code 1
That's weird, normally floorf is part of libm, and there is -lm.
But, according to:
http://www.gnu.org/software/gnulib/manual/html_node/floorf.html
it's missing on HP-UX 11.
In theory, you should be able to change all floorf into floor and it
should work, but you might have some overflow issues.
A patch for this shall require some m4 configure tweaking and a few
defines.
Another hack might be to use these:
#ifndef floorf
#define floorf (float)floor
#endif
Find one .h which gets included in at least this .c :)
But honestly, I'm not happy with any solution (which are the same in
fact, just 2 different ways to write it).
I let main coders decide what's the best way to do so, but this should
help you go on with the compilation.
Kind regards,
--
Babar.
Viele Grüße / Best Regards
Matthias Brönner
----------------------------------------------------------------------
--- [ Mitarbeiter / employee ] ---
Matthias Brönner
Tel.: +49 941 / 78392 - 11
Fax: +49 941 / 78392 - 72
Mailto: matthias.broenner at SYSTEMAGmbH.de
--- [ Standort / location ] ---
Schikanederstr. 2 B - Posthof, 93053 Regensburg, GERMANY
--- [ Firma / company ] ---
SYSTEMA Systementwicklung Dipl.-Inf. Manfred Austen GmbH
Manfred-von-Ardenne-Ring 6, 01099 Dresden, GERMANY
Handelsregister: HRB 5422 Amtsgericht Dresden
USt.-ID-Nr.: DE 159 607 786
Geschäftsführer: Herr Manfred Austen
http://www.SYSTEMAGmbH.de
----------------------------------------------------------------------
More information about the Devel
mailing list