[PyKDE] PyKDE-snapshot20050104 won't build with KDE 3.1.4 and sip 4.2

Hans-Peter Jansen hpj at urpla.net
Sun Feb 20 21:07:16 GMT 2005


Hi Jim,

On Sunday 20 February 2005 18:27, Jim Bublitz wrote:
> On Sunday 20 February 2005 04:47, Hans-Peter Jansen wrote:
> > Hi Jim, hi Phil,
> >
> > I've been catched on a SuSE 9.0 system during PyKDE build by this
> > error:
> > Generating the C++ source for the kio module...
> > sip: KFileMimeTypeInfo::Unit is undefined
> > Error: Unable to create the C++ code.
> >
> > Looking into sip/kio/kfilemetainfo.sip doesn't reveal an
> > immediate obvious reason for this, thus I'm asking here.
>
> KFileMimeTypeInfo::Unit is an enum which is versioned incorrectly.
> In the sip file it's only defined for KDE >= 3.3.0. To correct the
> versioning, it would be necessary to back through the various KDE
> versions, because enumerators were added in later versions.
>
> HOWEVER, the only places it's referenced in PyKDE is in two
> typedefs in the same file, and neither of the typedef'd types
> appear to be referenced anywhere else.
>
> The easiest fix would be to comment out the two typedefs as shown:
>
> class KFileMetaInfoItem
> {
> 	...
> //    typedef KFileMimeTypeInfo::Unit Unit;
>
>
>
> class KFileMetaInfo
> {
> 	...
> //    typedef KFileMimeTypeInfo::Unit Unit;

Yeah, that did it, together with this patch, I got it working on 
3.1.4:

--- sip/kdecore/kprocctrl.sip~	2005-01-04 06:25:47.000000000 +0100
+++ sip/kdecore/kprocctrl.sip	2005-02-20 20:19:29.000000000 +0100
@@ -60,7 +60,7 @@
 %End
 
 
-%If ( KDE_3_2_0 -  )
+%If ( KDE_3_1_0 -  )
 
 private:
                          KProcessController ();
@@ -70,7 +70,7 @@
 
 public:
 
-%If (  - KDE_3_2_0 )
+%If (  - KDE_3_1_0 )
                          KProcessController ();
 %End
 
Sure, I've just invented this version tag, but you got the idea. 
Here's the problem:

g++ -c -Wno-deprecated-declarations -pipe -O2 -march=i586 -mcpu=i686 
-fmessage-length=0 -fPIC -O2 -mcpu=i686 -march=i686 
-fno-strength-reduce -fno-exceptions -fPIC -O2 -march=i586 -mcpu=i686 
-fmessage-length=0 -fPIC -Wall -W -D_REENTRANT -DQT_NO_DEBUG 
-DQT_THREAD_SUPPORT -I. -I../extra/kde314 -I/opt/kde3/include -I/usr/
include/ -I/usr/include/python2.3 -I/usr/lib/qt3/include -I/usr/
X11R6/include -o sipkdecorepart0.o sipkdecorepart0.cpp
sipkdecorepart0.cpp: In function `int convertTo_Display(PyObject*, 
void**, int*)':
sipkdecorepart0.cpp:9257: Warnung: unused parameter `PyObject*sipPy'
sipkdecorepart0.cpp:9257: Warnung: unused parameter `int*sipIsErr'
sipkdecorepart0.cpp: In function `PyObject* 
convertFrom_Display(void*)':
sipkdecorepart0.cpp:9291: Warnung: unused variable `Display*sipCpp'
sipkdecorepart0.cpp: In function `void dealloc_KShared(sipWrapper*)':
sipkdecorepart0.cpp:32040: Warnung: unused parameter 
`sipWrapper*sipSelf'
/opt/kde3/include/kprocctrl.h: In constructor 
`sipKProcessController::sipKProcessController(const 
KProcessController&)':
/opt/kde3/include/kprocctrl.h:125: error: 
`KProcessController::KProcessController(const KProcessController&)' 
is private
sipkdecorepart0.cpp:38311: error: within this context
sipkdecorepart0.cpp: In function `PyObject* 
convertFrom_QValueList_2100(void*)':
sip/kdecore/kwinmodule.sip:111: Warnung: unused variable 
`PyObject*inst'
make[1]: *** [sipkdecorepart0.o] Fehler 1
make[1]: Leaving directory `/usr/src/packages/BUILD/
PyKDE-snapshot20050104/kdecore'
make: *** [all] Fehler 2
Command exited with non-zero status 2

> You could also comment out the entire Unit enum, although that
> shouldn't be necessary.
>
> This error actually goes back quite a few PyKDE versions and for
> some reason has never shown up in testing against older KDE
> versions before.

I will continue to try to build PyKDE on SuSE 9.0 (KDE 3.1.4).

Thanks a lot, Jim.

Cheers,
Pete




More information about the PyQt mailing list