[Python-modules-team] Bug#589893: python-qt4: has bad linking for shared objects

Alan W. Irwin irwin at beluga.phys.uvic.ca
Thu Jul 22 16:30:10 UTC 2010

On 2010-07-22 11:34+0200 Jakub Wilk wrote:

> * Alan W. Irwin <irwin at beluga.phys.uvic.ca>, 2010-07-21, 18:40:
>> software at raven> ldd -r /usr/lib/pymodules/python2.6/PyQt4/QtCore.so
>> 2>&1 |grep -i codec
>> undefined symbol: _ZN10QTextCodec11validCodecsEv
>> (/usr/lib/pymodules/python2.6/PyQt4/QtCore.so)
> I can't reproduce this bug in amd64 squeeze chroot, with the same version of 
> python-qt4 and the same versions of libraries python-qt4 depends on.
> $ nm -D /usr/lib/libQtCore.so.4 | grep _ZN10QTextCodec11validCodecsEv
> 00000000001a8210 T _ZN10QTextCodec11validCodecsEv

Hi Jakub:

The above was an extremely helpful question that allowed me to solve

I have just recently started to use Squeeze, and it turns out this
issue is an artifact of some Lenny build habits I got into. Qt4 was
too old there so I used the downloaded version 4.6.1 (qtsdk-2010.01)
to link (and rpath) against without too much further thought, and it
worked for pyqt4 because Trolltech had not introduced any backwards
incompatible change from the Lenny version of Qt so it didn't matter
that the pyqt4 QtCore.so was linked against the older Lenny version of

However, I just discovered that the Squeeze version of Qt4 is actually newer
(4.6.3) than my downloaded version, and Trolltech must have added
_ZN10QTextCodec11validCodecsEv sometime between 4.6.1 and 4.6.3 (which
obviously is not a backwards incompatible change so Qt continues to
have a good reputation in that regard).  In particular:

irwin at raven> nm -D ~software/qtsdk-2010.01/qt/lib/libQtCore.so.4 | \
grep _ZN10QTextCodec11validCodecsEv

yields nothing while

irwin at raven> nm -D /usr/lib/libQtCore.so.4 | \
grep _ZN10QTextCodec11validCodecsEv


00000000001a8210 T _ZN10QTextCodec11validCodecsEv

Accordingly, I dropped using the older downloaded (qtsdk-2010.01) version in
the PLplot build, and the pyqt4 application works again without errors.

Thanks very much for helping me to figure out this issue, but sorry it
was just noise here.

Please close the bug as "user error/not a bug" or whatever the flag is
for that condition.  :-)

Alan W. Irwin

Astronomical research affiliation with Department of Physics and Astronomy,
University of Victoria (astrowww.phys.uvic.ca).

Programming affiliations with the FreeEOS equation-of-state implementation
for stellar interiors (freeeos.sf.net); PLplot scientific plotting software
package (plplot.org); the libLASi project (unifont.org/lasi); the Loads of
Linux Links project (loll.sf.net); and the Linux Brochure Project

Linux-powered Science

More information about the Python-modules-team mailing list