Version: (using KDE KDE 3.1.94) Installed from: Compiled From Sources Compiler: gcc 3.2.3 OS: Solaris When compiling on Solaris 2.6 I get this error: if /bin/ksh ../../../libtool --silent --mode=compile --tag=CXX g++ -DHAVE_CONFIG_H -I. -I. -I../../.. -I/opt/kde/include/arts -I/opt/kde/include -I/opt/qt/include -I/gorbag/exta/cad/externals/SOLARIS/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 -DQT_CLEAN_NAMESPACE -DQT_NO_ASCII_CAST -DQT_NO_STL -DQT_NO_COMPAT -DQT_NO_TRANSLATION -MT videoscaler.lo -MD -MP -MF ".deps/videoscaler.Tpo" \ -c -o videoscaler.lo `test -f 'videoscaler.cpp' || echo './'`videoscaler.cpp; \ then mv -f ".deps/videoscaler.Tpo" ".deps/videoscaler.Plo"; \ else rm -f ".deps/videoscaler.Tpo"; exit 1; \ fi videoscaler.cpp:36: warning: aggregate has a partly bracketed initializer videoscaler.cpp: In function `void scaleYuvToRgb32(int, int, unsigned char**, unsigned int*, int, int, unsigned int*, unsigned int)': videoscaler.cpp:150: `alloca' undeclared (first use this function) videoscaler.cpp:150: (Each undeclared identifier is reported only once for each function it appears in.) gmake[4]: *** [videoscaler.lo] Error 1 gmake[4]: Leaving directory `/tmp/kdemultimedia-3.1.94/xine_artsplugin/tools/thumbnail' It appears that videoscaler.cpp makes use of alloca, but the header file required for that function on Solaris (alloca.h) is only included if HAVE_ALLOCA_H is defined, and the configure process does *not* define it.
Proper recognition of alloca.h present in kdelibs configure.
I am having this same problem in 3.2.0 with kdemultimedia. configure does not check if alloca.h is required and videoscaler.cpp needs to include config.h before checking HAVE_ALLOCA_H To work around this temporarily I added #define HAVE_ALLOCA_H to config.h and changed videoscaler.cpp to include config,h before #ifdef HAVE_ALLOCA_H
This still happens in 3.2.2
CVS commit by carewolf: Check for alloca.h CCMAIL:70610-done@bugs.kde.org M +1 -1 configure.in.in 1.55 M +2 -0 xine_artsplugin/tools/thumbnail/videoscaler.cpp 1.4 --- kdemultimedia/configure.in.in #1.54:1.55 @@ -4,5 +4,5 @@ AC_HEADER_DIRENT AC_HEADER_STDC -AC_CHECK_HEADERS(fcntl.h sys/time.h unistd.h features.h linux/awe_voice.h awe_voice.h /usr/src/sys/i386/isa/sound/awe_voice.h /usr/src/sys/gnu/i386/isa/sound/awe_voice.h linux/ucdrom.h sys/stdtypes.h sys/filio.h sys/audioio.h Alib.h sys/sem.h string.h getopt.h machine/endian.h sys/awe_voice.h) +AC_CHECK_HEADERS(fcntl.h sys/time.h unistd.h features.h alloca.h linux/awe_voice.h awe_voice.h /usr/src/sys/i386/isa/sound/awe_voice.h /usr/src/sys/gnu/i386/isa/sound/awe_voice.h linux/ucdrom.h sys/stdtypes.h sys/filio.h sys/audioio.h Alib.h sys/sem.h string.h getopt.h machine/endian.h sys/awe_voice.h) dnl First, setup HAVE_LINUX_CDROM_H. --- kdemultimedia/xine_artsplugin/tools/thumbnail/videoscaler.cpp #1.3:1.4 @@ -18,4 +18,6 @@ #include <pthread.h> +#include <config.h> + #ifdef HAVE_ALLOCA_H #include <alloca.h>