Bug 212839 - build fails with Sun Studio - isinf
Summary: build fails with Sun Studio - isinf
Status: RESOLVED WORKSFORME
Alias: None
Product: ksysguard
Classification: Unmaintained
Component: general (other bugs)
Version First Reported In: 4.7 and older
Platform: Compiled Sources Solaris
: NOR normal
Target Milestone: ---
Assignee: KSysGuard Developers
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2009-11-03 01:25 UTC by tropikhajma
Modified: 2019-04-11 04:33 UTC (History)
2 users (show)

See Also:
Latest Commit:
Version Fixed/Implemented In:
Sentry Crash Report:


Attachments
patch (1.94 KB, patch)
2009-11-03 01:42 UTC, tropikhajma
Details
better patch (1.93 KB, patch)
2009-11-04 21:37 UTC, tropikhajma
Details

Note You need to log in before you can comment on or make changes to this bug.
Description tropikhajma 2009-11-03 01:25:13 UTC
Version:           4.3.73 (using Devel)
Compiler:          Sun Studio 12 U1 
OS:                Solaris
Installed from:    Compiled sources

build on OpenSolaris b125 with SunStudio 12 U1 fails with:
...
"/export/home/hajma/packages/BUILD/kdebase-workspace-4.3.73svn1040395/ksysguard/gui/SensorDisplayLib/SignalPlotter.cc", line 143: Error: The function "isinf" must have a prototype.
"/export/home/hajma/packages/BUILD/kdebase-workspace-4.3.73svn1040395/ksysguard/gui/SensorDisplayLib/SignalPlotter.cc", line 154: Error: The function "isinf" must have a prototype.
"/export/home/hajma/packages/BUILD/kdebase-workspace-4.3.73svn1040395/ksysguard/gui/SensorDisplayLib/SignalPlotter.cc", line 827: Error: The function "isinf" must have a prototype.
"/export/home/hajma/packages/BUILD/kdebase-workspace-4.3.73svn1040395/ksysguard/gui/SensorDisplayLib/SignalPlotter.cc", line 831: Error: The function "isinf" must have a prototype.
4 Error(s) and 1 Warning(s) detected.

from what I gathered searching the web, isinf is not really portable across platforms.
See the mysql bug and patch at http://bugs.mysql.com/bug.php?id=28240
Comment 1 tropikhajma 2009-11-03 01:42:55 UTC
Created attachment 38045 [details]
patch

actually the mysql link is wrong as well, 'finity' is not part of the C++standard either. Here's my patch, practically taken from http://bytes.com/topic/c/answers/588254-how-check-double-inf-nan
Comment 2 John Tapsell 2009-11-03 02:42:55 UTC
Doesn't your my_isinf function return the exact opposite?   It returns true if the number is finite.
Comment 3 tropikhajma 2009-11-03 10:19:39 UTC
damn, right, too late in the night, I only cared if it compiles. sorry
Comment 4 tropikhajma 2009-11-04 21:37:52 UTC
Created attachment 38093 [details]
better patch

This one should be better. What would be the best way to verify the code works as expected? where in ksysguard should I go? TIA
Comment 5 John Tapsell 2009-11-05 02:35:24 UTC
> This one should be better. What would be the best way to verify the code works
> as expected? where in ksysguard should I go? TIA

The graphs should be drawn in the second tab.  Also the unit tests should pass:

cd build/kdebase/workspace/ksysguard/gui/tests  (or wherever your
build directory is)
make buildtests
make tests

They should all pass.
Comment 6 groot 2009-12-27 00:23:46 UTC
On Solaris, I think the correct approach is through ieeefp -- which is done in several other places in the KDE sources:

     #include <ieeefp.h>
     int finite(double dsrc);
Comment 7 tropikhajma 2010-03-23 01:07:38 UTC
perhaps something like

#if defined(HAVE_IEEEFP_H) && defined(__SUNPRO_CC)
#include <ieeefp.h>                               
#define isinf !finite                             
#endif

?

with 
check_include_files(ieeefp.h HAVE_IEEEFP_H)
in some 
CMakeLists.txt
?
Comment 8 tropikhajma 2010-03-23 01:08:33 UTC
also there is some reference:
http://markmail.org/thread/5fpgbdzu5ala3ley
Comment 9 John Tapsell 2011-03-10 14:43:33 UTC
tropikhamjma, any chance of a finished patch that I can commit?
Comment 10 Andrew Crouthamel 2018-11-09 01:02:58 UTC
Dear Bug Submitter,

This bug has been stagnant for a long time. Could you help us out and re-test if the bug is valid in the latest version? I am setting the status to NEEDSINFO pending your response, please change the Status back to REPORTED when you respond.

Thank you for helping us make KDE software even better for everyone!
Comment 11 Andrew Crouthamel 2018-11-18 03:28:22 UTC
Dear Bug Submitter,

This is a reminder that this bug has been stagnant for a long time. Could you help us out and re-test if the bug is valid in the latest version? This bug will be moved back to REPORTED Status for manual review later, which may take a while. If you are able to, please lend us a hand.

Thank you for helping us make KDE software even better for everyone!
Comment 12 Richard Llom 2019-03-12 19:58:36 UTC
Can you reproduce this issue with current version of ksysguard?
Comment 13 Bug Janitor Service 2019-03-27 04:33:10 UTC
Dear Bug Submitter,

This bug has been in NEEDSINFO status with no change for at least
15 days. Please provide the requested information as soon as
possible and set the bug status as REPORTED. Due to regular bug
tracker maintenance, if the bug is still in NEEDSINFO status with
no change in 30 days the bug will be closed as RESOLVED > WORKSFORME
due to lack of needed information.

For more information about our bug triaging procedures please read the
wiki located here:
https://community.kde.org/Guidelines_and_HOWTOs/Bug_triaging

If you have already provided the requested information, please
mark the bug as REPORTED so that the KDE team knows that the bug is
ready to be confirmed.

Thank you for helping us make KDE software even better for everyone!
Comment 14 Bug Janitor Service 2019-04-11 04:33:12 UTC
This bug has been in NEEDSINFO status with no change for at least
30 days. The bug is now closed as RESOLVED > WORKSFORME
due to lack of needed information.

For more information about our bug triaging procedures please read the
wiki located here:
https://community.kde.org/Guidelines_and_HOWTOs/Bug_triaging

Thank you for helping us make KDE software even better for everyone!