[PyKDE] sip/PyQt compiling problems

Karolina Lindqvist pgd-karolina.lindqvist at algonet.se
Sun Sep 17 18:51:30 BST 2000


I wrote some programs in PyKDE, a while ago, but due to crashes etc. I lost 
the configuration and now I am trying to compile ANY version of PyKDE that 
works, but have so far been unsuccessful. It appears to be next to impossible 
to find any version of PyQT/PyKDE to match with any version of Qt/KDE that 
runs.

So far I have tried PyQt etc. 2.0, with version 1.44, 1.45, 2.02 of QT, and 
none works. The nearest I get with qt-1.44 and kde-1.1.2, and PyKDE-0.12, but 
that combo gives a QT run-time error when the python program is executed. The 
.rpm-files that I have found, gives undefined symbols when loaded. Which one 
is varying with which version of qt/qt I use.

As I supposed old version of PyQT/KDE is not supported, I have tried with 
version 2.0. This is what I get when trying to compile PyQt with Qt-2.2.0 
(the version of qt, is the one with the latest KDE 2.0 cvs snapshot):

[~/src/PyQt-2.0 (4)]$ make
make  all-recursive
make[1]: Entering directory `/u/home/pgd/src/PyQt-2.0'
Making all in qt
make[2]: Entering directory `/u/home/pgd/src/PyQt-2.0/qt'
/bin/sh ../libtool --mode=compile c++ -DHAVE_CONFIG_H -I. -I. -I..  						 	 
-I/usr/include/python1.5 -I/usr/local/include/sip -I/usr/qt-2.2.0/include  		
-I/usr/X11R6/include  -fno-exceptions -O2 -c qtcmodule.cpp
c++ -DHAVE_CONFIG_H -I. -I. -I.. -I/usr/include/python1.5 						
-I/usr/local/include/sip -I/usr/qt-2.2.0/include -I/usr/X11R6/include 
-fno-exceptions -O2 -Wp,-MD,.deps/qtcmodule.pp -c  -fPIC -DPIC qtcmodule.cpp 
-o qtcmodule.lo
In file included from qtcmodule.cpp:4016:
sipqtProxyqt.moc:45: new declaration `static void 
sipProxyqt::staticMetaObject()'
sipqtProxyqt.h:9: ambiguates old declaration `static class QMetaObject * 
sipProxyqt::staticMetaObject()'
sipqtProxyqt.moc: In function `void 
__static_initialization_and_destruction_0(int, int)':
sipqtProxyqt.moc:29: no matching function for call to 
`QMetaObjectInit::QMetaObjectInit (QMetaObject * (*)())'
/usr/qt-2.2.0/include/qmetaobject.h:259: candidates are: 
QMetaObjectInit::QMetaObjectInit(void (*)())
/usr/qt-2.2.0/include/qmetaobject.h:261:                 
QMetaObjectInit::QMetaObjectInit(const QMetaObjectInit &)
make[2]: *** [qtcmodule.lo] Error 1
make[2]: Leaving directory `/u/home/pgd/src/PyQt-2.0/qt'
make[1]: *** [all-recursive] Error 1
make[1]: Leaving directory `/u/home/pgd/src/PyQt-2.0'


If I instead try to compile with qt-1.44, I don't even get so far, but get 
the following compilation error, when trying to compile sip:

[~/src/sip-2.0.1 (4)]$ make
make  all-recursive
make[1]: Entering directory `/u/home/pgd/src/sip-2.0.1'
Making all in sip
make[2]: Entering directory `/u/home/pgd/src/sip-2.0.1/sip'
make[2]: Nothing to be done for `all'.
make[2]: Leaving directory `/u/home/pgd/src/sip-2.0.1/sip'
Making all in siplib
make[2]: Entering directory `/u/home/pgd/src/sip-2.0.1/siplib'
/bin/sh ../libtool --mode=compile c++ -DHAVE_CONFIG_H -I. -I. -I..  
-DSIP_QT_SUPPORT -I/usr/qt-1.44g/include  -I/usr/X11R6/include 
-I/usr/include/python1.5  -fno-exceptions -O2 -c moc_sipQt.cpp
rm -f .libs/moc_sipQt.lo
c++ -DHAVE_CONFIG_H -I. -I. -I.. -DSIP_QT_SUPPORT -I/usr/qt-1.44g/include 
-I/usr/X11R6/include -I/usr/include/python1.5 -fno-exceptions -O2 -c  -fPIC 
-DPIC moc_sipQt.cpp -o .libs/moc_sipQt.lo
moc_sipQt.cpp: In method `void sipProxy::initMetaObject()':
moc_sipQt.cpp:41: implicit declaration of function `int staticMetaObject(...)'
moc_sipQt.cpp: At top level:
moc_sipQt.cpp:47: no `class QString sipProxy::tr(const char *)' member 
function declared in class `sipProxy'
moc_sipQt.cpp: In method `class QString sipProxy::tr(const char *)':
moc_sipQt.cpp:48: no matching function for call to `QApplication::translate 
(const char[9], const char *&, int)'
moc_sipQt.cpp: At top level:
moc_sipQt.cpp:52: prototype for `class QString sipProxy::tr(const char *, 
const char *)' does not match any in class `sipProxy'
moc_sipQt.cpp:47: candidate is: class QString sipProxy::tr(const char *)
moc_sipQt.cpp: In method `class QString sipProxy::tr(const char *, const char 
*)':
moc_sipQt.cpp:53: no matching function for call to `QApplication::translate 
(const char[9], const char *&, const char *&)'
moc_sipQt.cpp: At top level:
moc_sipQt.cpp:59: no `class QMetaObject * sipProxy::staticMetaObject()' 
member function declared in class `sipProxy'
moc_sipQt.cpp: In method `class QMetaObject * sipProxy::staticMetaObject()':
moc_sipQt.cpp:62: no method `QObject::staticMetaObject'
moc_sipQt.cpp:65: `Access' is not a member of type `QMetaData'
moc_sipQt.cpp:65: `slot_tbl_access' undeclared (first use this function)
moc_sipQt.cpp:65: (Each undeclared identifier is reported only once
moc_sipQt.cpp:65: for each function it appears in.)
moc_sipQt.cpp:74: no method `QMetaObject::new_metaobject'
make[2]: *** [moc_sipQt.lo] Error 1
make[2]: Leaving directory `/u/home/pgd/src/sip-2.0.1/siplib'
make[1]: *** [all-recursive] Error 1
make[1]: Leaving directory `/u/home/pgd/src/sip-2.0.1'
make: *** [all-recursive-am] Error 2

If I try with version 0.10 or 0.12 of PyQt/PyKDE, they compile with Qt-1.44 
and KDE 1.1.2, or even try the precompiled .rpm files, I instead get a 
run-time error:

cript started on Sun Sep 17 16:08:44 2000
[~/tut (4)]$ python p2.py
QObject: Object QSocketNotifier::unnamed has no meta object
Segmentation fault
[~/tut (4)]$ cat p2.py
import sys
from kdeui import *
from kdecore import *
from qt import *

a = KApplication(sys.argv, "p2")
hello = QPushButton(i18n("Hello World!"))
hello.setAutoResize(1)
a.setMainWidget(hello)
hello.show()
a.exec_loop()

The error comes on "KApplication"

If I used precompiled sip/PyQt/PyKDE in rpm-files, version 0.10, the following 
happens:

[~/tut (4)]$ python p2.py
Traceback (innermost last):
  File "p2.py", line 2, in ?
    from kdeui import *
  File "/usr/lib/python1.5/kdeui.py", line 5, in ?
    import libqtc
ImportError: /usr/lib/libsip.so.1: undefined symbol: __pure_virtual

So my question is actually: how can I find a working PyKDE/KDE combination, 
or in worst case a working PyQt/Qt combination. Which versions of respective 
software fit together? Or is there any version of PyQt/PyKDE that fits with 
any version of Qt/KDE?
I am running a debian based Linux, if it makes any difference.

-- Karolina Lindqvist












More information about the PyQt mailing list