Bug 137928 - kpilot ( kdepim 3.5.5-svn rev 608081 ) does not compile
Summary: kpilot ( kdepim 3.5.5-svn rev 608081 ) does not compile
Status: RESOLVED FIXED
Alias: None
Product: kpilot
Classification: Applications
Component: General (show other bugs)
Version: unspecified
Platform: Compiled Sources Linux
: NOR normal (vote)
Target Milestone: ---
Assignee: groot
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2006-11-26 19:03 UTC by Gabriel C
Modified: 2007-01-03 17:17 UTC (History)
1 user (show)

See Also:
Latest Commit:
Version Fixed In:


Attachments
fix DEBUG defines (426 bytes, patch)
2007-01-03 06:43 UTC, Gabriel C
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Gabriel C 2006-11-26 19:03:45 UTC
Version:            (using KDE Devel)
Installed from:    Compiled sources
Compiler:          gcc-4.1.1 
OS:                Linux

Hi,

I got this compile error with kdepim-3.5.5-svn :

/usr/lib/qt/bin/moc ./kpilotConfigWizard.h -o kpilotConfigWizard.moc
/bin/sh ../../libtool --silent --tag=CXX   --mode=compile g++ -DHAVE_CONFIG_H -I. -I../..  -I../../kpilot/lib -I../../libkdepim -I/usr/lib/qt/include -I.   -DQT_THREAD_SUPPORT  -D_REENTRANT -D_FILE_OFFSET_BITS=64 -D_LARGE_FILES=1  -DNDEBUG -DNO_DEBUG -O2 -march=i686 -O2 -pipe -Wno-deprecated -fno-exceptions -fno-check-new -fno-common -DQT_CLEAN_NAMESPACE -DQT_NO_ASCII_CAST -DQT_NO_STL -DQT_NO_COMPAT -DQT_NO_TRANSLATION  -c -o kpilotConfigWizard.lo kpilotConfigWizard.cc
../../kpilot/lib/options.h: In member function 'kdbgstream KPilotDepthCount::debug(int)':
../../kpilot/lib/options.h:138: error: conversion from 'kndbgstream' to non-scalar type 'kdbgstream' requested
make[4]: *** [kpilotConfigWizard.lo] Error 1
make[4]: Leaving directory `/var/tmp/fst/src/kdepim-3.5.5-svn/kpilot/kpilot'
make[3]: *** [all-recursive] Error 1
make[3]: Leaving directory `/var/tmp/fst/src/kdepim-3.5.5-svn/kpilot/kpilot'
make[2]: *** [all-recursive] Error 1
make[2]: Leaving directory `/var/tmp/fst/src/kdepim-3.5.5-svn/kpilot'
make[1]: *** [all-recursive] Error 1
make[1]: Leaving directory `/var/tmp/fst/src/kdepim-3.5.5-svn'
make: *** [all] Error 2

Kdepim is compiled with:

./configure --prefix=/usr \
                --disable-debug \
                --without-debug \
                --disable-warnings \
                --with-gnu-ld \
                --enable-gcc-hidden-visibility \
                --disable-final \
                --disable-dependency-tracking

I'm not sure now but I think this commit :

http://websvn.kde.org/branches/KDE/3.5/kdepim/kpilot/lib/options.h?rev=605527&r1=442714&r2=605527

cause the error.

Regards 

Gabriel
Comment 1 Jason 'vanRijn' Kasper 2006-11-27 06:12:45 UTC
SVN commit 608204 by vanrijn:

- compilation breakage fix.  use CERR (matches kdepim-3.5.5+ branch anyway)
CCBUGS:137928


 M  +1 -1      options.h  


--- branches/KDE/3.5/kdepim/kpilot/lib/options.h #608203:608204
@@ -64,7 +64,7 @@
 #ifndef DEBUG
 #define DEBUG			(1)
 #endif
-// #define DEBUG_CERR			(1)
+#define DEBUG_CERR			(1)
 
 #ifdef HAVE_CONFIG_H
 #include "config.h"
Comment 2 Jason 'vanRijn' Kasper 2006-11-27 06:13:46 UTC
Sorry about that.  This should be fixed in rev 608204.
Comment 3 Gabriel C 2007-01-03 06:42:15 UTC
Hi ,

I do know you fixed this once but you did it again ;) is broken by 'Revision 611839' with the same compile error. ( feel free to slap me because I've reopened this but I'm lazy to open a new one bugs.kde.org is damn slow for me today and I don't have much time =) )

snip 

Making all in lib
make[3]: Entering directory `/var/tmp/fst/src/kdepim-3.5.5-svn/kpilot/lib'
/usr/bin/kconfig_compiler ./kpilotlib.kcfg ./kpilotlibSettings.kcfgc; ret=$?; \
        if test "$ret" != 0; then rm -f kpilotlibSettings.h ; exit $ret ; else mv kpilotlibSettings.cpp kpilotlibSettings.cc ;  fi
kconfig_compiler: WARNING: No entries.
/bin/sh ../../libtool --silent --tag=CXX   --mode=compile g++ -DHAVE_CONFIG_H -I. -I../..  -I../.. -I../../libkdepim -I/usr/lib/qt/include -I.   -DQT_THREAD_SUPPORT  -D_REENTRANT -D_FILE_OFFSET_BITS=64 -D_LARGE_FILES=1  -DNDEBUG -DNO_DEBUG -O2 -march=i686 -O2 -pipe -Wno-deprecated -fno-exceptions -fno-check-new -fno-common -DQT_CLEAN_NAMESPACE -DQT_NO_ASCII_CAST -DQT_NO_STL -DQT_NO_COMPAT -DQT_NO_TRANSLATION  -c -o options.lo options.cc
options.h: In member function 'kdbgstream KPilotDepthCount::debug(int)':
options.h:103: error: conversion from 'kndbgstream' to non-scalar type 'kdbgstream' requested
make[3]: *** [options.lo] Error 1
make[3]: Leaving directory `/var/tmp/fst/src/kdepim-3.5.5-svn/kpilot/lib'
make[2]: *** [all-recursive] Error 1
make[2]: Leaving directory `/var/tmp/fst/src/kdepim-3.5.5-svn/kpilot'
make[1]: *** [all-recursive] Error 1
make[1]: Leaving directory `/var/tmp/fst/src/kdepim-3.5.5-svn'
make: *** [all] Error 2

snip

I guess the #ifdef DEBUG need be #ifndef .. I'll attach a patch ( not sure is the right solution )
Comment 4 Gabriel C 2007-01-03 06:43:44 UTC
Created attachment 19088 [details]
fix DEBUG defines
Comment 5 groot 2007-01-03 17:17:01 UTC
SVN commit 619524 by adridg:

Fix compilation when NDEBUG is on (ie --enable-debug=no) where kdDebug() returns a kndbgstream. Patch by bug submitter, munged to not enable debugging always.

BUG: 137928


 M  +4 -0      options.h  


--- branches/KDE/3.5/kdepim/kpilot/lib/options.h #619523:619524
@@ -99,7 +99,11 @@
 	// if DEBUG_CERR is defined, we can't return std::cerr (by value),
 	// since the copy constructor is private!
 #ifndef DEBUG_CERR
+#ifdef NDEBUG
+	inline kndbgstream debug(int area=0)
+#else
 	inline kdbgstream debug(int area=0)
+#endif
 	{ return kdDebug(debug_level >= fLevel, area); }
 #endif