Version: (using KDE Devel) Installed from: Compiled sources Compiler: gcc 4.2.2 OS: Linux for the last 2/2 days, i was unable to compile kdebase or kdepim due to problem with kDebug.h. Here's the error on kdebase [ 86%] Building CXX object workspace/kdm/kfrontend/CMakeFiles/kdm_greet.dir/themer/kdmitem.o /var/tmp/portage/kde-base/kdebase-9999.4/work/kdebase-9999.4/workspace/kdm/kfrontend/themer/kdmitem.cpp: In member function ‘void KdmItem::showStructure(const QString&)’: /var/tmp/portage/kde-base/kdebase-9999.4/work/kdebase-9999.4/workspace/kdm/kfrontend/themer/kdmitem.cpp:600: erreur: expected primary-expression before ‘if’ /var/tmp/portage/kde-base/kdebase-9999.4/work/kdebase-9999.4/workspace/kdm/kfrontend/themer/kdmitem.cpp:600: erreur: expected ‘,’ or ‘;’ before ‘if’ /var/tmp/portage/kde-base/kdebase-9999.4/work/kdebase-9999.4/workspace/kdm/kfrontend/themer/kdmitem.cpp:600: erreur: expected primary-expression before ‘else’ /var/tmp/portage/kde-base/kdebase-9999.4/work/kdebase-9999.4/workspace/kdm/kfrontend/themer/kdmitem.cpp:600: erreur: expected `;' before ‘else’ make[2]: *** [workspace/kdm/kfrontend/CMakeFiles/kdm_greet.dir/themer/kdmitem.o] Erreur 1 make[2]: *** Attente des tâches non terminées.... To get it to compile i have change the code in kdmItem.cpp to supress ds = kDebug() and replace ds with a direct use of kDebug() as in this ugly hack QDebug ds = kDebug(); if (!pfx.isEmpty()) ds << (qPrintable( pfx ) + 1); ds << objectName() << qPrintable( itemType ) << area; change to : if (!pfx.isEmpty()) kDebug() << (qPrintable( pfx ) + 1); kDebug() << objectName() << qPrintable( itemType ) << area; After this it compiles OK Have no clue where the problem is. For kdepim here is the compile log /var/tmp/portage/kde-base/kdepim-9999.4/work/kdepim-9999.4/libkdepim/pluginloaderbase.cpp: In function ‘QDebug debug(bool)’: /var/tmp/portage/kde-base/kdepim-9999.4/work/kdepim-9999.4/libkdepim/pluginloaderbase.cpp:40: erreur: expected primary-expression before ‘if’ /var/tmp/portage/kde-base/kdepim-9999.4/work/kdepim-9999.4/libkdepim/pluginloaderbase.cpp:40: erreur: expected ‘;’ before ‘if’ To get it compile i change (very ugly i admit) the call to KDebug by a kWarning without the cond parameter. But i have another error in kmdebug.h after this, latter in kdepim compilation : In file included from /var/tmp/portage/kde-base/kdepim-9999.4/work/kdepim-9999.4/kmail/kmheaders.cpp:17: /var/tmp/portage/kde-base/kdepim-9999.4/work/kdepim-9999.4/kmail/kmdebug.h: In function ‘kndbgstream kmDebug()’: /var/tmp/portage/kde-base/kdepim-9999.4/work/kdepim-9999.4/kmail/kmdebug.h:21: erreur: expected primary-expression before ‘if’ /var/tmp/portage/kde-base/kdepim-9999.4/work/kdepim-9999.4/kmail/kmdebug.h:21: erreur: expected ‘;’ before ‘if’ /var/tmp/portage/kde-base/kdepim-9999.4/work/kdepim-9999.4/kmail/kmdebug.h: In function ‘kndbgstream kmDebug(bool)’: /var/tmp/portage/kde-base/kdepim-9999.4/work/kdepim-9999.4/kmail/kmdebug.h:22: erreur: expected primary-expression before ‘if’ /var/tmp/portage/kde-base/kdepim-9999.4/work/kdepim-9999.4/kmail/kmdebug.h:22: erreur: expected ‘;’ before ‘if’ 3/4 days ago everything compiles fine. I have not change GCC. Could be related to the hardened kernel/user space i use (i change it recently ) Do you need further information ?
ok seems to have found the culprit : that's because i compile a non debug build but nonetheless, something seems to be broken
*** This bug has been marked as a duplicate of 154435 ***