Version: (using KDE 3.5.9)
Installed from: Gentoo Packages
Compiler: gcc-4.3.0 glibc-2.7-r2, kernel 2.6.25-gentoo-r4 x86_64
User reports that the current digikam version compiles with gcc 4.2.4 but hangs at the following point with gcc 4.3.0. Patch requested.
CFLAGS="-march=native -O2 -fomit-frame-pointer -pipe"
Compilation gets to the following point and hangs with ~100% cpu usage on one
/usr/qt/3/bin/moc ./greycstorationwidget.h -o greycstorationwidget.moc
creating libgreycstoration_la.all_cpp.cpp ...
/bin/sh ../../../libtool --silent --tag=CXX --mode=compile
x86_64-pc-linux-gnu-g++ -DHAVE_CONFIG_H -I. -I../../..
-I../../../digikam/digikam -I/usr/kde/3.5/include -I/usr/qt/3/include -I.
-I/usr/kde/3.5/include -DQT_THREAD_SUPPORT -D_REENTRANT -Wno-long-long
-Wundef -ansi -D_XOPEN_SOURCE=500 -D_BSD_SOURCE -Wcast-align -Wchar-subscripts
-Wall -W -Wpointer-arith -DNDEBUG -DNO_DEBUG -O2 -march=native -O2
-fomit-frame-pointer -pipe -Wformat-security -Wmissing-format-attribute
-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 -DQT_CLEAN_NAMESPACE -fexceptions -w -c -o
This problem have been already reported here. It's fully relevant of CImg.h file taken from CImg library verion 1.2.8 which do not compile fine under GCC 4.3
Please report this problem into CImg bugzilla.
Thanks in advance.
to compile it anyway, set full debugging in configure like this:
./configure --prefix=<path_to_KDE> --enable-debug=full
No optimizations will be made and it should work fine. This is just a temporary solution, but it will work.
fwiw, beta5 built fine here on fedora (f10/rawhide) using gcc-4.3.
Seems to fail to compile with -O3 and -O2, but it does work with -O1.
I'm not sure if it really hangs or if it just takes too long, I once was able to compile beta5 with standard settings (-O3) and it took only 1 minute (not the whole application :-) only the greycstoration part).
So nobody actually seems to know what is going wrong here, some distributions with gcc-4.3 compile fine, others don't.
Another possibility is to go into the specific folder (libs/greycstoration) and call make from in there without optimizations. Then go back to the digikam root folder and compile the rest with the optimizations you like to have set. This way it should compile fine, too.
SVN commit 816533 by cgilles:
disable final options to compile CImg.h version 1.2.8.
This is a temporally solution util a fix is apply to CImg
M +5 -0 Makefile.am
WebSVN link: http://websvn.kde.org/?view=rev&revision=816533
On some arch's it fails and other it succeeds:
2:0.9.4~beta5-1 (amd64) (latest build at May 31 01:57: maybe-successful)
2:0.9.4~beta5-1 (i386) (latest build at May 31 02:07: maybe-successful)
2:0.9.4~beta5-1 (alpha) (latest build at May 31 03:27: maybe-successful)
2:0.9.4~beta5-1 (ia64) (latest build at May 31 04:10: maybe-failed)
2:0.9.4~beta5-1 (s390) (latest build at May 31 04:14: maybe-failed)
2:0.9.4~beta5-1 (sparc) (latest build at May 31 05:07: maybe-failed)
2:0.9.4~beta5-1 (hppa) (latest build at May 31 20:40: maybe-failed)
2:0.9.4~beta5-1 (mipsel) (latest build at Jun 2 07:57: maybe-failed)
With gcc-4.2 it builds fine, I presume with the patch they will build fine too.
Talking with MAndriva team today, it sound like to use this directive :
export CXXFLAGS="%optflags -fno-tree-pre
...before to compile fix the problem with gcc 4.3.x. Can you confirm this ?
SVN commit 820890 by cgilles:
try to fix broken compilation with GCC 4.3.x
M +3 -5 Makefile.am
WebSVN link: http://websvn.kde.org/?view=rev&revision=820890
I went into digikam/libs/greycstoration, running "make clean". Then I started "make -f Makefile.cvs && ./configure --prefix=/opt/kde --enable-final" to generate the new makefiles.
After that I went back to digikam/libs/greycstoration and "make" took 20 seconds... so it seems to work for me.
Thanks Andy. I can close this file now.
SVN commit 821084 by cgilles:
M +1 -1 NEWS
WebSVN link: http://websvn.kde.org/?view=rev&revision=821084
Yesterday a new version of gcc arrived in Archlinux (gcc-4.3.1), but this seems to compile well, too. So I think it is ok to close it...