[PyKDE] Qt lib problem - next PyKDE release

Jim Bublitz jbublitz at nwinternet.com
Mon May 13 09:21:00 BST 2002


This problem affects only *some* users of *KDE2.x.x* and PyKDE.

There is a potential problem building the next PyKDE for *some*
users. Qt >= 2.3.1 ships with two versions of libs: libqt and
libqt-mt (qt-mt is the threaded version). Since 3.1, configure
for sip and PyQt prefers qt-mt to qt if both are present (the logic
is "built-in" - there is no switch). The problem occurs on at
least some systems that are still running KDE2.x.x and Qt >= 2.3.1.
The KDE2 libs are linked to qt, NOT qt-mt. When a PyKDE build is
attempted, there is obviously no way to be simultaneously
compatible with both KDE2/qt and sip/PyQt/qt-mt on the affected
systems. PyKDE will compile, link and install, but applications
will not run. Rather than make people wait through the entire (long)
compile/install, I'll put tests in configure which will
terminate the build if there is a Qt lib mismatch. 

The workaround (if you have this problem and still want PyKDE) is
to hide libqt-mt while building *sip*, *PyQt* and PyKDE. It would
be possible to add a '--with' switch for configure for PyQt and
sip, but I've asked Phil to NOT do this, since the problem is
transitional, sip3.2.2 is already released, and the test
and workaround are fairly simple.

To determine if you have this problem:

1. Check the location of the qt libs to see if you have libqt-mt.so
(or check the output from configure for sip or configure.log for
sip looking for '-lqt-mt')

2. Check a KDE lib - kdecore is a good choice. Look at
libkdecore.la with a text editor (it's a text file) and search for
'-lqt'. If you have libqt-mt.so on your system and the search of
libkdecore.la turns up '-lqt-mt' you're OK. If the search turns up
'-lqt' only, you need to hide libqt-mt.* (renaming is easiest)
while building sip/PyQt/PyKDE. You can restore the libqt-mt.* names
when installation is complete.

The KDE3 libs (on my system anyway) link against qt-mt, so there's
no problem there - it only affects KDE2 systems linked against
libqt. It also doesn't affect Qt2.3.0 systems (at least not on
SuSE). If you absolutely have to have qt-mt for PyQt (for threads)
and have to run KDE2 and PyKDE, you can attempt to recompile KDE
using qt-mt - I don't know if that will work.

This information will be in the README for the next release.

Jim




More information about the PyQt mailing list