[PyKDE] problem setting up PyKDE on mdk9.1

Jim Bublitz jbublitz at nwinternet.com
Fri Oct 3 20:37:01 BST 2003


On Friday October 3 2003 11:26, caffeine at tuxfamily.org wrote:
> -----BEGIN PGP SIGNED MESSAGE-----
> Hash: SHA1

> I'm trying to setup PyKDE on my Mandrake 9.1/python 2.2 box
> but so far I had no luck. I grabbed all the RPMs at
> sourceforge, they installed fine but when I started to play
> around with a test script I got:

> Traceback (most recent call last):
>   File "testpykde.py", line 5, in ?
>     from kdecore import *
>   File "/usr/lib/python2.2/site-packages/kdecore.py", line 33,
> in ? import libkdecorec
> ImportError:
> /usr/lib/python2.2/site-packages/libkdecorecmodule.so:
> undefined symbol: _ZNK10KAboutData18copyrightStatementEv

This kind of problem is usually an indication that the 
dsitribution's KDE libs don't define a symbol that PyKDE does 
define. PyKDE is developed from KDE sources downloaded from a 
*.kde.org web site. In addition, recent versions of PyKDE are 
test built (successfully) against Mdk 9.1, but there appear to 
different versions of the KDE libs in different versions of Mdk 
9.1.

> same problem when importing kdeui. PyQt seems to work fine,
> though. So I decided to compile PyKDE myself, grabbed the
> source, and grabbed PyQt source since I needed the sip files
> to generate KDE bindings. The C++ files were generated, but
> the compile itself went wrong on kio:
>
> cd kio && "/usr/bin/make" -f Makefile
> make[1]: Entering directory `/home/sylvain/PyKDE-3.7-4/kio'
> g++ -c -pipe -w -O2 -fomit-frame-pointer -pipe -march=i586
> - -mcpu=pentiumpro -fomit-frame-pointer -ffast-math
> -fforce-addr - -fno-strength-reduce -funroll-loops
> -D_REENTRANT -fPIC - -DSIP_MAKE_MODULE_DLL -DQT_NO_DEBUG
> -DQT_THREAD_SUPPORT -fno-exceptions -
> -I/usr/lib/qt3//mkspecs/default -I. -I../extra/kde310 -I. -
> -I/usr/include/python2.2 -I/usr/include -I../extra/kde310/kio
> - -I/usr/include/kio -I../kdecore -I/usr/lib/qt3//include -o
> kiohuge0.o kiohuge0.cpp
> /usr/include/kservice.h: In constructor
> `sipKService::sipKService(const KService&)':
> /usr/include/kservice.h:47: `KService::KService(const
> KService&)' is private
> sipkioKServicePtr.cpp:159: within this context
> make[1]: *** [kiohuge0.o] Erreur 1
> make[1]: Leaving directory `/home/sylvain/PyKDE-3.7-4/kio'
> make: *** [sub-kio] Erreur 2
>
> I'm pretty puzzled... Do I need to compile PyQt, SIP... by
> hand ?

No - this is a known problem with PyKDE on Mandrake. Basically 
this constructor was made private in KDE 3.1.1, but Mandrake 
picked up the change in KDE 3.1.0. All you need to do is open 
kservice.sip in an editor, and find these lines:

%If ( KDE_3_1_1 - )
private:

    KService (const KService&);

%End

And change it to:

%If ( KDE_3_1_0 - )

The line numbers may vary depending on the PyKDE version, but it 
should be right near the top of the KService class defintion at 
the beginning of the file.

> I don't like my first post to a ML being a request for help,
> but this one is just too strong for me...

The other possible problem to checkout is in 
kaboutapplication.sip. Open that in an editor, search for 
"QXEmbed" and comment out the line that contains it ("//" 
comment). This is an error on my part and should only affect the 
PyKDE-3.8rc2 release.

As far as I know, there shouldn't be any other Mdk related 
problems. I'm not sure of the cause of the rpm problem (I don't 
do the rpms), but it's probably related to differences between 
the packager's KDE libs and yours. 

You do need to be sure that you're installed PyQt and sip are 
v3.7, but that doesn't seem to be a problem in your case. If the
"copyrightStatement" bug shows up again after you compile, you 
can comment out that method in kaboutdata.sip (given the time it 
takes to compile, you might want to do that anyway, unless you 
desperately need that method).

Sorry for the difficulities - I haven't figured out any way to 
catch this kind of stuff before releasing. Post again if you 
still have problems.

Jim




More information about the PyQt mailing list