Bug 154468 - problem compiling kdebase kdepim due to kdebug.h
Summary: problem compiling kdebase kdepim due to kdebug.h
Status: RESOLVED DUPLICATE of bug 154435
Alias: None
Product: kde
Classification: I don't know
Component: general (show other bugs)
Version: unspecified
Platform: Compiled Sources Linux
: NOR normal
Target Milestone: ---
Assignee: Unassigned bugs mailing-list
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2007-12-22 13:45 UTC by Vincent ETIENNE
Modified: 2007-12-22 16:56 UTC (History)
0 users

See Also:
Latest Commit:
Version Fixed In:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Vincent ETIENNE 2007-12-22 13:45:47 UTC
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 ?
Comment 1 Vincent ETIENNE 2007-12-22 15:04:19 UTC
ok seems to have found the culprit : that's because i compile a non debug build
but nonetheless, something seems to be broken
Comment 2 Rolf Eike Beer 2007-12-22 16:56:10 UTC

*** This bug has been marked as a duplicate of 154435 ***