[Nagiosplug-devel] [ nagiosplug-Bugs-1480574 ] check_disk is missing -lm on Solaris (rel. 1.4.3)
SourceForge.net
noreply at sourceforge.net
Tue Oct 31 17:30:56 CET 2006
Bugs item #1480574, was opened at 2006-05-02 19:03
Message generated for change (Comment added) made by aderixon
You can respond by visiting:
https://sourceforge.net/tracker/?func=detail&atid=397597&aid=1480574&group_id=29880
Please note that this message will contain a full copy of the comment thread,
including the initial issue submission, for this request,
not just the latest update.
Category: Compilation
Group: Release (specify)
Status: Open
Resolution: None
Priority: 5
Private: No
Submitted By: Ralph Rößner (ralph_roessner)
Assigned to: Ton Voon (tonvoon)
Summary: check_disk is missing -lm on Solaris (rel. 1.4.3)
Initial Comment:
The common.h include defines, on Solaris only, a
replacement definition for floorf(), which Solaris (up
to and including version 8) does not have. Thus, on
Solaris only, all plugins including common.h need a
definition of floor() (on Linux that would be necessary
only for those plugins that actually use floorf()),
i.e. they need to link libm.so . The Makefile.in does
not respect that need, and consequently compiling
check_disk on Solaris fails. I would expect all other
plugins that include common.h to have the same problem,
but strangely that appears not to be the case.
For my needs it was sufficient to add MATHLIBS to the
dependency line for check_disk in the
plugins/Makefile.in, and I include a patch that does
exactly that. However, this should probably be resolved
more generally.
Regards,
Ralph Rößner
----------------------------------------------------------------------
Comment By: Ade Rixon (aderixon)
Date: 2006-10-31 16:30
Message:
Logged In: YES
user_id=145082
This occurs with 1.4.4 if built with the Sun Studio 11
compiler (SunPro C), but not GCC. It happens for all the
binary plugins, including check_disk; the quickest
workaround is to manually edit the Makefiles and add -lm to
the LIBS.
----------------------------------------------------------------------
Comment By: Ralph Rößner (ralph_roessner)
Date: 2006-10-23 16:11
Message:
Logged In: YES
user_id=1515003
Hi,
tried the 200610222352 snapshot. The error persists but has
jumped to another plugin. This time, compilation fails for
the first plugin to make, check_apt.c, same link error:
definition of floor is missing.
See, common.h defines (on the Solaris platform) a function
floorf(), which is included into all the plugins. Most of
the plugins do not use this function. For some, the compiler
recognizes this and leaves out the definition. For others
(and don't ask me why they are treated differently) the
defintion of floorf() remains and triggers the linker to
look for floor().
Conclusion: As long as the definition of floor() remains in
common.h (line 216), you will need to include a -lm in the
link line.
I am not a configure master, so i will not provide a patch
that does this. I hope someone else will know how to.
Regards,
Ralph Rößner
----------------------------------------------------------------------
Comment By: Ton Voon (tonvoon)
Date: 2006-10-19 20:47
Message:
Logged In: YES
user_id=664364
Ralph,
Can you please try the snapshot at http://nagiosplug.sf.net/snapshot. The
check_disk code has been re-written without the use of floorf anymore.
Ton
----------------------------------------------------------------------
You can respond by visiting:
https://sourceforge.net/tracker/?func=detail&atid=397597&aid=1480574&group_id=29880
More information about the Devel
mailing list