Bug 170929

Summary: Compilation of SVN version fails with gcc 4.3.2 unless debug option is activated
Product: [Applications] digikam Reporter: Yannick Roehlly <yannick.roehlly>
Component: Portability-CompilationAssignee: Digikam Developers <digikam-bugs-null>
Status: RESOLVED FIXED    
Severity: normal    
Priority: NOR    
Version: 0.10.0   
Target Milestone: ---   
Platform: unspecified   
OS: Linux   
Latest Commit: Version Fixed In: 0.10.0
Sentry Crash Report:

Description Yannick Roehlly 2008-09-12 17:53:46 UTC
Version:           0.10.0-beta4 (using 4.1.1 (KDE 4.1.1), Debian packages)
Compiler:          cc
OS:                Linux (x86_64) release 2.6.26-preempt

The compilation of the svn source (r860191) with gcc 4.3.2 (as in Debian Sid) stalls on the processing of greycstorationiface.cpp.

This does not occur when compiling with gcc 4.3.1.

On the Digikam developpers mailing list, Andi Clemens suggested me to compile with debugging enabled.
As a matter of fact, setting CMAKE_BUILD_TYPE to "Debug" makes the compilation possible.

Gilles Caulier asked me to file a bug report so here it is!

Yannick
Comment 1 Andi Clemens 2008-09-27 13:20:21 UTC
Just tried to compile without debugging, but it is still not working. My Macbook nearly melted so I quit the compile test since I don't want to harm my hardware here :-)

Gilles,

any idea what compiler flag could be responsible for that?

Andi
Comment 2 caulier.gilles 2008-09-27 13:42:46 UTC
Andi,

Can you send me a compilation backtrace please ?

Gilles
Comment 3 caulier.gilles 2008-09-27 14:47:40 UTC
Andi,

I need all message from the console when you try to compile digiKam.

Set the env. variable : export VERBOSE=1

...to see all compilation messages from cmake. Like this, you will see all gcc options used during compilation.

Other question : you compile under Mac. It's the same problem with i386 ?

Gilles
Comment 4 Andi Clemens 2008-09-27 15:13:30 UTC
No I don't compile under Mac, I have Linux... it's just a Macbook, but I'm not running Mac OSX... :-)
Ok I'll try VERBOSE env var now...
Comment 5 Andi Clemens 2008-09-27 15:15:08 UTC
I think you mean this output:

[  4%] Building CXX object digikam/digikam/CMakeFiles/digikam.dir/__/libs/greycstoration/greycstorationiface.o
cd /home/andi/Programmieren/workspace/digikam_KDE4/digikam/digikam && /usr/lib/ccache/bin/c++   -D_BSD_SOURCE -D_XOPEN_SOURCE=500 -D_BSD_SOURCE -DQT_NO_STL -DQT_NO_CAST_TO_ASCII -D_REENTRANT -DKDE_DEPRECATED_WARNINGS -DHAVE_CONFIG_H=1 -D_XOPEN_SOURCE=500 -D_BSD_SOURCE -DQT_NO_STL -DQT_NO_CAST_TO_ASCII -D_REENTRANT -DKDE_DEPRECATED_WARNINGS -DQT3_SUPPORT -DQT3_SUPPORT_WARNINGS -DMAKE_DIGIKAM_LIB  -Wnon-virtual-dtor -Wno-long-long -ansi -Wundef -Wcast-align -Wchar-subscripts -Wall -W -Wpointer-arith -Wformat-security -fno-exceptions -fno-check-new -fno-common -Woverloaded-virtual -fno-threadsafe-statics -fvisibility=hidden -fvisibility-inlines-hidden -O2 -g -fPIC -I/home/andi/Programmieren/workspace/digikam_KDE4/digikam/digikam -I/home/andi/Programmieren/workspace/digikam_KDE4 -I/home/andi/Programmieren/workspace/digikam_KDE4/digikam/digikam/../libs/dimg -I/home/andi/Programmieren/workspace/digikam_KDE4/digikam/digikam/../libs/dimg/loaders -I/home/andi/Programmieren/workspace/digikam_KDE4/digikam/digikam/../libs/dimg/filters -I/home/andi/Programmieren/workspace/digikam_KDE4/digikam/digikam/../libs/whitebalance -I/home/andi/Programmieren/workspace/digikam_KDE4/digikam/digikam/../libs/dmetadata -I/home/andi/Programmieren/workspace/digikam_KDE4/digikam/digikam/../libs/histogram -I/home/andi/Programmieren/workspace/digikam_KDE4/digikam/digikam/../libs/curves -I/home/andi/Programmieren/workspace/digikam_KDE4/digikam/digikam/../libs/levels -I/home/andi/Programmieren/workspace/digikam_KDE4/digikam/digikam/../libs/lprof -I/home/andi/Programmieren/workspace/digikam_KDE4/digikam/digikam/../libs/jpegutils -I/home/andi/Programmieren/workspace/digikam_KDE4/digikam/digikam/../libs/greycstoration -I/home/andi/Programmieren/workspace/digikam_KDE4/digikam/digikam/../libs/threadimageio -I/home/andi/Programmieren/workspace/digikam_KDE4/digikam/digikam/../libs/widgets/common -I/home/andi/Programmieren/workspace/digikam_KDE4/digikam/digikam/../libs/widgets/imageplugins -I/home/andi/Programmieren/workspace/digikam_KDE4/digikam/digikam/../libs/widgets/metadata -I/home/andi/Programmieren/workspace/digikam_KDE4/digikam/digikam/../libs/widgets/iccprofiles -I/home/andi/Programmieren/workspace/digikam_KDE4/digikam/digikam/../libs/imageproperties -I/home/andi/Programmieren/workspace/digikam_KDE4/digikam/digikam/../libs/dialogs -I/home/andi/Programmieren/workspace/digikam_KDE4/digikam/digikam/../libs/database -I/home/andi/Programmieren/workspace/digikam_KDE4/digikam/digikam/../libs/database/sqlite2 -I/home/andi/Programmieren/workspace/digikam_KDE4/digikam/digikam/../libs/database/sqlite3 -I/home/andi/Programmieren/workspace/digikam_KDE4/digikam/digikam/../libs/database/haar -I/home/andi/Programmieren/workspace/digikam_KDE4/digikam/digikam/../utilities/slideshow -I/home/andi/Programmieren/workspace/digikam_KDE4/digikam/digikam/../utilities/imageeditor/editor -I/home/andi/Programmieren/workspace/digikam_KDE4/digikam/digikam/../utilities/imageeditor/canvas -I/home/andi/Programmieren/workspace/digikam_KDE4/digikam/digikam/../utilities/imageeditor/tools -I/home/andi/Programmieren/workspace/digikam_KDE4/digikam/digikam/../utilities/imageeditor/rawimport -I/home/andi/Programmieren/workspace/digikam_KDE4/digikam/digikam/../libs/themeengine -I/home/andi/Programmieren/workspace/digikam_KDE4/digikam/digikam/../utilities/kipiiface -I/home/andi/Programmieren/workspace/digikam_KDE4/digikam/digikam/../utilities/cameragui -I/home/andi/Programmieren/workspace/digikam_KDE4/digikam/digikam/../utilities/setup -I/home/andi/Programmieren/workspace/digikam_KDE4/digikam/digikam/../utilities/batch -I/home/andi/Programmieren/workspace/digikam_KDE4/digikam/digikam/../utilities/lighttable -I/home/andi/Programmieren/workspace/digikam_KDE4/digikam/digikam/../utilities/searchwindow -I/home/andi/Programmieren/workspace/digikam_KDE4/digikam/digikam/../utilities/fuzzysearch -I/home/andi/Programmieren/workspace/digikam_KDE4/digikam/digikam/../utilities/gpssearch -I/home/andi/Programmieren/workspace/digikam_KDE4/digikam/digikam/../utilities/timeline -I/home/andi/Programmieren/workspace/digikam_KDE4/digikam/digikam/../digikam -I/home/andi/Programmieren/workspace/digikam_KDE4/digikam/digikam/.. -I/usr/include/KDE -I/usr/include/QtWebKit -I/usr/include/QtHelp -I/usr/include/QtAssistant -I/usr/include/QtDBus -I/usr/include/QtTest -I/usr/include/QtUiTools -I/usr/include/QtScript -I/usr/include/QtSvg -I/usr/include/QtXml -I/usr/include/QtSql -I/usr/include/QtOpenGL -I/usr/include/QtNetwork -I/usr/include/QtDesigner -I/usr/include/Qt3Support -I/usr/include/QtGui -I/usr/include/QtCore -I/usr/include/Qt -I/usr/share/qt/mkspecs/default -I/usr/include/gphoto2   -D_GNU_SOURCE -D_LARGEFILE64_SOURCE -D_FILE_OFFSET_BITS=64 -D_GNU_SOURCE -D_LARGEFILE64_SOURCE -D_FILE_OFFSET_BITS=64 -fexceptions -o CMakeFiles/digikam.dir/__/libs/greycstoration/greycstorationiface.o -c /home/andi/Programmieren/workspace/digikam_KDE4/digikam/libs/greycstoration/greycstorationiface.cpp
Comment 6 caulier.gilles 2008-09-27 16:22:09 UTC
Ok,

I know the problem. I have already fixed this one with these lines :

http://lxr.kde.org/source/extragear/graphics/digikam/CMakeLists.txt#242

But i have never test in final mode without debug.

So, if something must be tuned with gcc, it's must be here.

Gilles
Comment 7 caulier.gilles 2008-10-01 11:57:12 UTC
Andi, 

I have tried with Mandriva 2009.0 RC2 here, using gcc 4.3.2 and no debug compilation option. All compile fine...

Gilles

Comment 8 caulier.gilles 2008-10-01 14:03:53 UTC
Andi,

After to have updated gcc, this bug re-appears.

So all compilation with gcc version > 4.3.0 must be set with -fno-tree-pre option

Gilles
Comment 9 caulier.gilles 2008-10-01 14:07:22 UTC
SVN commit 866592 by cgilles:

all gcc version > 4.3.0 must use -fno-tree-pre option, else CImg.h compilation hang-up to infinite
BUG: 170929


 M  +1 -1      CMakeLists.txt


--- trunk/extragear/graphics/digikam/CMakeLists.txt #866591:866592
@@ -262,7 +262,7 @@
  IF(NOT GCC_VERSION)
    STRING(REGEX REPLACE ".*\\(GCC\\).* ([34]\\.[0-9]) .*" "\\1.0" GCC_VERSION "${VERSION_GCC_INFO}")
  ENDIF (NOT GCC_VERSION)
-  MACRO_ENSURE_VERSION_RANGE("4.3.0" "${GCC_VERSION}" "4.3.2" GCC_VERSION_BAD)
+  MACRO_ENSURE_VERSION("4.3.0" "${GCC_VERSION}" GCC_VERSION_BAD)

  IF(GCC_VERSION_BAD)
      MESSAGE(STATUS "Adjusting compilation flags for GCC version (${GCC_VERSIO
Comment 10 Andi Clemens 2008-10-01 14:28:36 UTC
Yes, it is working again...