Version: (using KDE KDE 3.1.92) Installed from: Compiled From Sources Compiler: gcc 2.95.3 OS: Solaris Trying to build kdebase 3.2-alpha2 breaks with [...] make[3]: Leaving directory `/vol/src/kde/cvs/kdebase/drkonqi/debuggers' make[3]: Entering directory `/vol/src/kde/cvs/kdebase/drkonqi' source='main.cpp' object='main.o' libtool=no \ depfile='.deps/main.Po' tmpdepfile='.deps/main.TPo' \ depmode=gcc /bin/ksh ../admin/depcomp \ g++ -pipe -DHAVE_CONFIG_H -I. -I. -I.. -I/vol/kde-cvs/include -I/vol/qt-3.2.1/include -I/usr/openwin/include -I/vol/local/include -I/vol/graphics/include -I/vol/cups/include -I/vol/X11/include/freetype2 -DQT_NO_CAST_ASCII -DQT_THREAD_SUPPORT -D_REENTRANT -D_POSIX_PTHREAD_SEMANTICS -DUSE_SOLARIS -DSVR4 -Wnon-virtual-dtor -Wno-long-long -Wundef -Wall -W -Wpointer-arith -Wwrite-strings -fno-builtin -g -O2 -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 -c -o main.o `test -f 'main.cpp' || echo './'`main.cpp In file included from main.cpp:30: ../config.h:641: type specifier omitted for parameter make[3]: *** [main.o] Error 1 make[3]: Leaving directory `/vol/src/kde/cvs/kdebase/drkonqi' make[2]: *** [all-recursive] Error 1 make[2]: Leaving directory `/vol/src/kde/cvs/kdebase/drkonqi' make[1]: *** [all-recursive] Error 1 make[1]: Leaving directory `/vol/src/kde/cvs/kdebase' make: *** [all] Error 2
Created attachment 2612 [details] patch for kde-common/admin/acinclude.m4.in The problematic code seems to be the following lines from "config.h": --- snip --- #if !defined(HAVE_GETDOMAINNAME_PROTO) #ifdef __cplusplus extern "C" #endif int getdomainname (char *, size_t); #endif --- snip --- This check needs to #include <sys/types.h> (at least on Solaris) for "size_t" to be defined for the compiler. So far I've found 2 solutions for this issue: * remove the HAVE_GETDOMAINNAME_PROTO test completely since there's no getdomainname() on Solaris (see bug 50754) * apply the attached patch, works for me, but I'm not sure if it is the correct way to do this (I'm sure, Stephan will tell me... ;-)
Subject: kde-common/admin CVS commit by coolo: the patch is fine CCMAIL: 65104-close@bugs.kde.org M +6 -2 acinclude.m4.in 2.405 --- kde-common/admin/acinclude.m4.in #2.404:2.405 @@ -2146,7 +2146,10 @@ #if !defined(HAVE_$5_PROTO) #ifdef __cplusplus -extern "C" +extern "C" { #endif $4; +#ifdef __cplusplus +} +#endif #endif ]) @@ -2183,5 +2186,6 @@ getdomainname(buffer, 200); ], - [int getdomainname (char *, size_t)], + [#include <sys/types.h> + int getdomainname (char *, size_t)], [GETDOMAINNAME]) ])