[PyKDE] PyQt-3.1 undefined symbol: metaObject__

Phil Thompson phil at river-bank.demon.co.uk
Mon Apr 29 20:51:00 BST 2002


M K wrote:
> 
> Hi guys, having a little trouble installing PyQt-3.1
> on mdk-8.2
> 
> I installed Qt-3 from rpm (with the devel package),
> built sip and PyQt-3.1 myself.  When I run make
> install on pyqt i get the following error
> 
> (cd /tmp;
> PYTHONPATH=/usr/lib/python2.2/site-packages:/usr/lib/python2.2/site-packages
> /usr/bin/python -c "import qt")
> Traceback (most recent call last):
>   File "<string>", line 1, in ?
>   File "/usr/lib/python2.2/site-packages/qt.py", line
> 47, in ?
>     import libqtc
> ImportError:
> /usr/lib/python2.2/site-packages/libqtcmodule.so:
> undefined symbol: metaObject__C9QSGIStyle
> 
> I've rebuilt pyqt about 4 times over the weekend and
> solved incremental problems relating to pyqt-mt.so.2
> being on the system, but that is not the case now.
> I've checked all the relevant objects and executables,
> including, but not limited to:
> 
> /usr/lib/qt3/bin/moc
> /usr/lib/python2.2/site-packages/libqtcmodule.so
> /usr/lib/python2.2/site-packages/libsip.so.8
> 
> and none of them are linked to qt2.  I'm assuming this
> has something to do with moc and the SGI theme.  I
> can't tell much more than that.  I can't find any
> reference to 'qt2' in the entire source for PyQt-3.1
> nor sip-3.1.

See attached.

Phil
-------------- next part --------------
This file describes some things to be aware of when building PyQt under Linux.


Broken Mandrake and Debian Qt Installations

Both Mandrake and Debian omit some of the style classes, particularly
QSGIStyle, QCDEStyle, QWindowsStyle and QMotifStyle, but don't make the
corresponding changes to the file $QTDIR/include/qconfig.h.

If you get unresolved symbols relating to any of these classes when building
PyQt then trying adding one or more of the following lines to
$QTDIR/include/qconfig.h and then re-building PyQt.

#define	QT_NO_STYLE_CDE
#define	QT_NO_STYLE_MOTIF
#define	QT_NO_STYLE_SGI
#define	QT_NO_STYLE_WINDOWS

Thanks to John R Marshall and James Lamanna.


Phil Thompson
phil at riverbankcomputing.co.uk


More information about the PyQt mailing list