Bug 154529

Summary: kdesdk (kde4) compile error
Product: [Applications] kompare Reporter: Vincent ETIENNE <ve>
Component: generalAssignee: Kevin Kofler <kevin.kofler>
Status: RESOLVED FIXED    
Severity: normal    
Priority: NOR    
Version: unspecified   
Target Milestone: ---   
Platform: Compiled Sources   
OS: Linux   
Latest Commit: Version Fixed In:
Sentry Crash Report:

Description Vincent ETIENNE 2007-12-23 14:56:44 UTC
Version:            (using KDE Devel)
Installed from:    Compiled sources
Compiler:          gcc 4.2.2 
OS:                Linux

here is the log when compiling kdesdk 

/var/tmp/portage/kde-base/kdesdk-9999.4/work/kdesdk-9999.4/kompare/kompare_shell.cpp: In constructor ‘KompareShell::KompareShell()’:
/var/tmp/portage/kde-base/kdesdk-9999.4/work/kdesdk-9999.4/kompare/kompare_shell.cpp:58: attention : ‘__base_ctor ’ is deprecated (declared at /usr/kde/svn/include/kparts/mainwindow.h:55)
/var/tmp/portage/kde-base/kdesdk-9999.4/work/kdesdk-9999.4/kompare/kompare_shell.cpp:77: erreur: conversion from ‘const KService’ to non-scalar type ‘KSharedPtr<KService>’ requested

i'm compiling in release mode maybe it could made a difference

we'll be happy to provide more information if needed....

side note : quite difficult to extract the error, there's so many warnings !!! :))))
Comment 1 Kevin Kofler 2007-12-23 15:36:06 UTC
Ugh, this is a multiple-layer screwup:
* this code is under #ifdef NDEBUG, it's supposed to be #ifndef NDEBUG, as this is debugging code,
* nothing actually defined NDEBUG until very recently, so this code path was never hit in KDE 4.
Comment 2 Rolf Eike Beer 2007-12-23 15:44:28 UTC
NDEBUG is automatically added to compile flags in release mode by CMake AFAIK
Comment 3 Kevin Kofler 2007-12-23 15:58:40 UTC
It is now, it didn't use to: http://lists.kde.org/?l=kde-core-devel&m=119815707403042&w=2
Comment 4 Kevin Kofler 2007-12-23 16:43:55 UTC
SVN commit 752104 by kkofler:

Fix inverted NDEBUG logic.
Fix build in the code which was effectively disabled all this time due to the combination of the inverted logic and NDEBUG never having been defined: don't dereference the KService::Ptr we get from KService::List::at when storing it into another KService::Ptr.
BUG: 154529
CCMAIL: kompare-devel@kde.org

 M  +2 -2      kompare_shell.cpp  


WebSVN link: http://websvn.kde.org/?view=rev&revision=752104
Comment 5 Vincent ETIENNE 2007-12-23 17:09:40 UTC
Thanks a lot for your very quick response . Impressive for a sunday just before christmas time. Here kdesdk compiles fine

Wish you happy holidays