[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 01:40:50 UTC 2010


On 2010-07-22 01:59+0200 Jakub Wilk wrote:

> tags 589893 - patch
> thanks
>
> Thanks for your bug report.
>
> * Alan W. Irwin <irwin at beluga.phys.uvic.ca>, 2010-07-21, 16:37:
>> ldd -r /usr/lib/pyshared/python2.6/PyQt4/Qt.so
>> 
>> You obtain the following (abbreviated) results:
>>
>>        linux-vdso.so.1 =>  (0x00007fffcc7ff000)
>>        libQtCore.so.4 => /usr/lib/libQtCore.so.4 (0x00007f9d75e91000)
>>        libstdc++.so.6 => /usr/lib/libstdc++.so.6 (0x00007f9d75b7d000)
>>        libm.so.6 => /lib/libm.so.6 (0x00007f9d758fa000)
>>        libgcc_s.so.1 => /lib/libgcc_s.so.1 (0x00007f9d756e4000)
>>        libc.so.6 => /lib/libc.so.6 (0x00007f9d75383000)
>>        libpthread.so.0 => /lib/libpthread.so.0 (0x00007f9d75166000)
>>        libz.so.1 => /usr/lib/libz.so.1 (0x00007f9d74f4f000)
>>        libdl.so.2 => /lib/libdl.so.2 (0x00007f9d74d4b000)
>>        libgthread-2.0.so.0 => /usr/lib/libgthread-2.0.so.0 
>> (0x00007f9d74b46000)
>>        librt.so.1 => /lib/librt.so.1 (0x00007f9d7493e000)
>>        libglib-2.0.so.0 => /lib/libglib-2.0.so.0 (0x00007f9d74662000)
>>        /lib64/ld-linux-x86-64.so.2 (0x00007f9d7675b000)
>>        libpcre.so.3 => /lib/libpcre.so.3 (0x00007f9d74432000)
>> undefined symbol: PyProperty_Type 
>> (/usr/lib/pyshared/python2.6/PyQt4/QtCore.so)
>> undefined symbol: PyType_GenericNew 
>> (/usr/lib/pyshared/python2.6/PyQt4/QtCore.so)
>> undefined symbol: PyBool_Type (/usr/lib/pyshared/python2.6/PyQt4/QtCore.so)
>> undefined symbol: PyExc_ValueError 
>> (/usr/lib/pyshared/python2.6/PyQt4/QtCore.so)
>> undefined symbol: PyExc_SystemError 
>> (/usr/lib/pyshared/python2.6/PyQt4/QtCore.so)
>> [...]
>
> This is intentional. Python extensions use symbols provided by
> /usr/bin/pythonX.Y, but they are not supposed to be linked with libpythonX.Y.

Hi Jakub:

Thanks for your quick response.

I am pretty sure I have analyzed pyqt4 extensions before for Debian
Lenny with ldd -r with no undefined symbols showing up.  Therefore,
(if I am remembering that old behaviour correctly) this appears to be
a change in behaviour for what was done for Debian Lenny. If so, I am
curious about the motivation for this change.

>
>> N.B. this undefined symbol issue kills my build of a pyqt4 module which 
>> actually needed one of those missing symbols so I judged this to be an 
>> important issue.
>
> Could you provide more details on your problem?

At run time for a pyqt4 example for PLplot, I am getting the following
error:

Traceback (most recent call last):
   File
"/home/software/plplot_svn/HEAD/build_dir/examples/python/pyqt4_example.py",
line 33, in <module>
     import plplot_pyqt4
     ImportError: /usr/lib/pymodules/python2.6/PyQt4/QtCore.so:
undefined symbol: _ZN10QTextCodec11validCodecsEv

The "ldd -r" command shows there are no undefined symbols with
plplot_pyqt4.so.  So I started looking at the pyqt4 modules and I
found the following:

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)

If you google for _ZN10QTextCodec11validCodecsEv, it appears to be
part of a large Ubuntu patch, but I haven't downloaded that so I don't
know the details.

Alan
__________________________
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
(lbproject.sf.net).
__________________________

Linux-powered Science
__________________________





More information about the Python-modules-team mailing list