Version: 3.5.2 (using KDE Devel) Installed from: Compiled sources Compiler: gcc 3.4.5 OS: Solaris I encountered the following error compiling kdebase-3.5.2 on Solaris 9 using gcc 3.4.5 (with GNU ld/as): Making all in nics make[3]: Entering directory `/apps/devtools/download/kdebase-3.5.2/kcontrol/nics' /apps/devtools/kit/bin/moc ./nic.h -o nic.moc if /bin/bash ../../libtool --silent --tag=CXX --mode=compile /apps/devtools/kit/bin/g++ -mcpu=ultrasparc3 -mvis -DHAVE_CONFIG_H -I. -I. -I../.. -I/apps/devtools/kit/include -I/apps/devtools/build/include -I/apps/devtools/kit/include -I/usr/local/include -I/usr/sfw/include -I/usr/xpg4/include -I/usr/include -I/usr/openwin/include -I/usr/dt/include -DQT_THREAD_SUPPORT -O2 -mcpu=ultrasparc3 -mvis -I/apps/devtools/build/include -I/apps/devtools/kit/include -I/usr/local/include -I/usr/xpg4/include -I/usr/include -I/usr/include/glib-2.0 -I/usr/include/pango-1.0 -I/usr/include/gtk-2.0 -I/usr/sfw/include -I/usr/sfw/include/freetype2 -I/usr/openwin/include -I/usr/dt/include -D_REENTRANT -D_POSIX_PTHREAD_SEMANTICS -DUSE_SOLARIS -DSVR4 -D_FILE_OFFSET_BITS=64 -Wno-long-long -Wundef -Wall -W -Wpointer-arith -DNDEBUG -DNO_DEBUG -O2 -O2 -mcpu=ultrasparc3 -mvis -I/apps/devtools/build/include -I/apps/devtools/kit/include -I/usr/local/include -I/usr/xpg4/include -I/usr/include -I/usr/include/glib-2.0 -I/usr/include/pango-1.0 -I/usr/include/gtk-2.0 -I/usr/sfw/include -I/usr/sfw/include/freetype2 -I/usr/openwin/include -I/usr/dt/include -Wno-non-virtual-dtor -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 nic.lo -MD -MP -MF ".deps/nic.Tpo" -c -o nic.lo nic.cpp; \ then mv -f ".deps/nic.Tpo" ".deps/nic.Plo"; else rm -f ".deps/nic.Tpo"; exit 1; fi nic.cpp: In function `NICList* findNICs()': nic.cpp:218: error: `SIOCGIFHWADDR' was not declared in this scope nic.cpp:221: error: 'union ifreq::<anonymous>' has no member named 'ifru_hwaddr' nic.cpp:218: warning: unused variable 'SIOCGIFHWADDR' make[3]: *** [nic.lo] Error 1 make[3]: Leaving directory `/apps/devtools/download/kdebase-3.5.2/kcontrol/nics' make[2]: *** [all-recursive] Error 1 make[2]: Leaving directory `/apps/devtools/download/kdebase-3.5.2/kcontrol' make[1]: *** [all-recursive] Error 1 make[1]: Leaving directory `/apps/devtools/download/kdebase-3.5.2' make: *** [all] Error 2 The method used to determine the hardware address on Solaris is different from the one on Linux. I have modified the file kcontrol/nics/nic.cpp to use the Solaris method when appropriate. The following patch seems to work: *** nic.cpp.orig Fri Mar 17 21:17:14 2006 --- nic.cpp Wed Mar 29 15:29:36 2006 *************** *** 215,224 **** --- 215,232 ---- tmp->netmask=i18n("Unknown"); ifcopy=*ifr; + #ifdef USE_SOLARIS + result=ioctl(sockfd,SIOCGENADDR,&ifcopy); + #else result=ioctl(sockfd,SIOCGIFHWADDR,&ifcopy); + #endif if (result==0) { + #ifdef USE_SOLARIS + char *n = &ifcopy.ifr_ifru.ifru_enaddr[0]; + #else char *n = &ifcopy.ifr_ifru.ifru_hwaddr.sa_data[0]; + #endif tmp->HWaddr = HWaddr2String(n); } else
Same here, Solaris 8/Sparc, gcc-3.4.5. The patch solved the problem, thanks.
Created attachment 15365 [details] patch for kdebase-3.5.2/kcontrol/nics/nic.cpp The patch is valid against kdebase-3.5.2/kcontrol/nics/nic.cpp Please note the patch does not contain file paths. Does this mean I get my name in lights? :-)
same on Sparc/Solaris 8, gcc 4.0.3. Trying patch now...
Created attachment 16165 [details] revised solaris patch Here is an alternate version of the patch that I think is cleaner. We've been using this one in pkgsrc.
So, this bug is still valid, patch still works. Any reason not to fix it?
Patch still works for KDE-3.5.5, its a pitty that it was not committed;-)
I can confirm this bug, and also confirm that it works (compiles) with 3.5.5. I don't get it, this bug is known since 3.5.2, it has 23 votes, several confirms, there is a patch, that obsiously works, and it sill has a status UNCONFIRMED? I mean, without this patch, it doesn't even compile!!! is there anybody out there...?
Can you please check that the current version works for you ? http://websvn.kde.org/branches/KDE/3.5/kdebase/kcontrol/nics/nic.cpp?rev=603976&view=auto Thanks Alex
Please reopen if it doesn't work for you. Alex
Can you please check whether this one: http://bugs.kde.org/show_bug.cgi?id=101023 still happens with current nic.cpp and let me know ? Thanks Alex
I can verify that the change (generated a patch from the link from comment 8) makes kdebase-3.5.5 compile. Since I didn't see bug 101023, I cannot comment on that one. But as far as I am concerned, *this* bug is fixed. Thanks!
I can second that, kdebase-3.5.6 compiled without problems
I can third that, kdebase-3.5.7 compiled without problems :) !
I'll fourth that compiling on Solaris 2.8 for both kdebase-3.5.6 and kdebase-3.5.7