Version: (using KDE KDE 3.3.92) Installed from: Compiled From Sources Compiler: gcc 3.4.3 OS: Solaris I get this compile error on Solaris 2.6: if /bin/ksh ../../../libtool --silent --mode=compile --tag=CXX g++ -DHAVE_CONFIG_H -I. -I. -I../../.. -I./../../taskmanager -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 -D_FILE_OFFSET_BITS=64 -D_LARGE_FILES=1 -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 -D_GNU_SOURCE -MT kasloaditem.lo -MD -MP -MF ".deps/kasloaditem.Tpo" -c -o kasloaditem.lo kasloaditem.cpp; \ then mv -f ".deps/kasloaditem.Tpo" ".deps/kasloaditem.Plo"; else rm -f ".deps/kasloaditem.Tpo"; exit 1; fi kasloaditem.cpp: In member function `void KasLoadItem::updateDisplay()': kasloaditem.cpp:47: error: `getloadavg' undeclared (first use this function) kasloaditem.cpp:47: error: (Each undeclared identifier is reported only once for each function itappears in.)
I solved this problem on Solaris 9 by adding #include <sys/loadavg.h> to kdebase/kicker/extensions/kasbar/kasloaditem.cpp
Unfortunately that won't solve it on Solaris 2.6 :-(
That's infuriating - this function has been present since 4.3 BSD, and lives in stdlib.h there. Do you know an equivalent that will work there, or I'll have to leave it for the porting team. :-(
Unfortunately I don't know of any equivalent on 2.6. I will look into it.
from my googling, it appears that all sorts of software doesn't compile on solaris 2.6 due to the omission of loadavg. apparently it was added later; i'd consider this an operating system related bug, realy, rather than a kasbar one. perhaps we can just disabled kasbar (or at least this code?) from being compiled under solaris 2.6
I would be happy if either kasbar, or just this code, was prevented from compiling under solaris 2.6.
And I would be happy if that the missing include line gets included in CVS code so Solaris 2.9 users can compile without patching the code.
CVS commit by rich: Patch from Michael Ritzert <kde@ritzert.de> for solaris. CCMAIL: 99100@bugs.kde.org M +5 -0 kasloaditem.cpp 1.5 --- kdebase/kicker/extensions/kasbar/kasloaditem.cpp #1.4:1.5 @@ -2,4 +2,9 @@ #include <stdlib.h> +#include <config.h> +#ifdef HAVE_SYS_LOADAVG_H +#include <sys/loadavg.h> // e.g. Solaris +#endif + #include <qpainter.h> #include <qbitmap.h>
CVS commit by rich: Patch from Michael Ritzert <kde@ritzert.de> for solaris. CCMAIL: 99100@bugs.kde.org BACKPORT A configure.in.in 1.1.2.1 M +5 -0 kasloaditem.cpp 1.4.2.1 --- kdebase/kicker/extensions/kasbar/kasloaditem.cpp #1.4:1.4.2.1 @@ -2,4 +2,9 @@ #include <stdlib.h> +#include <config.h> +#ifdef HAVE_SYS_LOADAVG_H +#include <sys/loadavg.h> // e.g. Solaris +#endif + #include <qpainter.h> #include <qbitmap.h>
*** Bug 104123 has been marked as a duplicate of this bug. ***
Solaris 2.6 EOL-ed in 2006. KDE 3.4.3 packages work around this issue. Patches committed. KDE4 has different load handling methods.