Bug 99346 - Compile error on solaris 2.6 - round() used, but not available.
Summary: Compile error on solaris 2.6 - round() used, but not available.
Status: RESOLVED FIXED
Alias: None
Product: kcalc
Classification: Applications
Component: general (show other bugs)
Version: unspecified
Platform: Compiled Sources Solaris
: NOR normal
Target Milestone: ---
Assignee: Klaus Niederkrüger
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2005-02-14 13:08 UTC by Steve Evans
Modified: 2005-04-25 01:15 UTC (History)
1 user (show)

See Also:
Latest Commit:
Version Fixed In:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Steve Evans 2005-02-14 13:08:17 UTC
Version:            (using KDE KDE 3.3.92)
Installed from:    Compiled From Sources
Compiler:          gcc 3.4.3 
OS:                Solaris

I get this compile error:

if /bin/ksh ../libtool --silent --mode=compile --tag=CXX g++ -DHAVE_CONFIG_H -I. -I. -I..  -D_GNU_SOURCE -D_ISOC99_SOURCE -I/opt/kde/include -I/opt/qt/include   -I/gorbag/exta/cad/externals/SOLARIS/include -DQT_THREAD_SUPPORT -I/opt/kde/include -I/gorbag/exta/cad/externals/SOLARIS/include -I/opt/qt/include  -D_REENTRANT -D_POSIX_PTHREAD_SEMANTICS -DUSE_SOLARIS -DSVR4  -Wnon-virtual-dtor -Wno-long-long -Wundef -Wall -W -Wpointer-arith -Wwrite-strings -DNDEBUG -DNO_DEBUG -O2 -I/opt/kde/include -I/gorbag/exta/cad/externals/SOLARIS/include -I/opt/qt/include -O2 -fomit-frame-pointer -DNeedVarargsPrototypes=1 -DNeedFunctionPrototypes=1 -pipe -fno-exceptions -mcpu=ultrasparc -fno-exceptions -fno-check-new -fno-common -fno-exceptions -fno-check-new -fno-common -DQT_CLEAN_NAMESPACE-DQT_NO_ASCII_CAST -DQT_NO_STL -DQT_NO_COMPAT -DQT_NO_TRANSLATION  -MT kcalc_core.lo -MD -MP -MF ".deps/kcalc_core.Tpo" -c -o kcalc_core.lo kcalc_core.cpp; \
then mv -f ".deps/kcalc_core.Tpo" ".deps/kcalc_core.Plo"; else rm -f ".deps/kcalc_core.Tpo"; exit1; fi
kcalc_core.cpp: In function `CALCAMNT ExecAdd(CALCAMNT, CALCAMNT)':
kcalc_core.cpp:229: error: `round' undeclared (first use this function)
kcalc_core.cpp:229: error: (Each undeclared identifier is reported only once for each function itappears in.)
kcalc_core.cpp: In function `CALCAMNT ExecSubtract(CALCAMNT, CALCAMNT)':
kcalc_core.cpp:249: error: `round' undeclared (first use this function)
d
Comment 1 Thiago Macieira 2005-02-15 03:56:20 UTC
round() is in math.h, conforming to C99 -- which Solaris 2.6 doesn't conform to.

Can you check what is available? rint, floor, ceil?
Comment 2 Steve Evans 2005-02-15 10:37:43 UTC
All three of rint, floor and ceil are available.
Comment 3 Thiago Macieira 2005-02-15 10:55:38 UTC
floor() is probably the way to go.
Comment 4 Bernd Kuhls 2005-02-18 16:51:26 UTC
This bug is similar to bug 99716
Comment 5 Bernd Kuhls 2005-02-22 15:03:24 UTC
Snapshot 050222 fixes this problem, thanks!

checking for asinl in -lm... no
checking for sqrtl in -lm... no
checking for isinf in -lm... no
checking for round in -lm... no
checking for roundl in -lm... no
Comment 6 Klaus Niederkrüger 2005-04-25 01:15:31 UTC
This bug seems to have been fixed.