Spinning up compiled pyqt extensions

Patrick Stinson patrickkidd at gmail.com
Thu Oct 6 00:54:28 BST 2022


So I installed PyQt-5.15.2, sip, and pyqt-builder from pip, then compiled
qt-5.15.2, but still got an undefined symbol for the libstdc++ symbol
_ZdaPvmwhich demangles to operator delete[](void*, unsigned long). So I
added qmake-settings = ["LIBS += -lstdc++"] to the build config for my
module but no change. here is 1) the failing import call of my sip
extension _vedanaprivate, 2) ldd for the _vedanaprivate lib file, and 3)
ldd for the complaining QtCore.abi3.so:

(familydiagram-server) *parallels at hurin*:*~/familydiagram-server*$ python
-c "import _vedanaprivate"

Traceback (most recent call last):

  File "<string>", line 1, in <module>

ImportError:
/home/parallels/.local/share/virtualenvs/familydiagram-server-p83tSG-_/lib/python3.7/site-packages/PyQt5/
QtCore.abi3.so: undefined symbol: _ZdaPvm, version Qt_5

(familydiagram-server) *parallels at hurin*:*~/familydiagram-server*$ ldd
/home/parallels/.local/share/virtualenvs/familydiagram-server-p83tSG-_/lib/python3.7/site-packages/_
vedanaprivate.cpython-37m-x86_64-linux-gnu.so

linux-vdso.so.1 (0x00007fff047fb000)

libQt5Core.so.5 => /home/parallels/qt/lib/libQt5Core.so.5
(0x00007f515b870000)

libstdc++.so.6 => /lib/x86_64-linux-gnu/libstdc++.so.6 (0x00007f515b637000)

libc.so.6 => /lib/x86_64-linux-gnu/libc.so.6 (0x00007f515b40f000)

libz.so.1 => /lib/x86_64-linux-gnu/libz.so.1 (0x00007f515b3f3000)

libm.so.6 => /lib/x86_64-linux-gnu/libm.so.6 (0x00007f515b30c000)

libgcc_s.so.1 => /lib/x86_64-linux-gnu/libgcc_s.so.1 (0x00007f515b2ea000)

/lib64/ld-linux-x86-64.so.2 (0x00007f515bf27000)

(familydiagram-server) *parallels at hurin*:*~/familydiagram-server*$ ldd
/home/parallels/.local/share/virtualenvs/familydiagram-server-p83tSG-_/lib/python3.7/site-packages/PyQt5/
QtCore.abi3.so

linux-vdso.so.1 (0x00007ffee7672000)

libQt5Core.so.5 =>
/home/parallels/.local/share/virtualenvs/familydiagram-server-p83tSG-_/lib/python3.7/site-packages/PyQt5/Qt5/lib/libQt5Core.so.5
(0x00007fe211a00000)

libstdc++.so.6 => /lib/x86_64-linux-gnu/libstdc++.so.6 (0x00007fe2117d6000)

libc.so.6 => /lib/x86_64-linux-gnu/libc.so.6 (0x00007fe2115ae000)

libpthread.so.0 => /lib/x86_64-linux-gnu/libpthread.so.0
(0x00007fe212231000)

libz.so.1 => /lib/x86_64-linux-gnu/libz.so.1 (0x00007fe212215000)

libicui18n.so.56 =>
/home/parallels/.local/share/virtualenvs/familydiagram-server-p83tSG-_/lib/python3.7/site-packages/PyQt5/Qt5/lib/libicui18n.so.56
(0x00007fe211000000)

libicuuc.so.56 =>
/home/parallels/.local/share/virtualenvs/familydiagram-server-p83tSG-_/lib/python3.7/site-packages/PyQt5/Qt5/lib/libicuuc.so.56
(0x00007fe210c00000)

libicudata.so.56 =>
/home/parallels/.local/share/virtualenvs/familydiagram-server-p83tSG-_/lib/python3.7/site-packages/PyQt5/Qt5/lib/libicudata.so.56
(0x00007fe20f200000)

libdl.so.2 => /lib/x86_64-linux-gnu/libdl.so.2 (0x00007fe21220e000)

libgthread-2.0.so.0 => /lib/x86_64-linux-gnu/libgthread-2.0.so.0
(0x00007fe212209000)

libglib-2.0.so.0 => /lib/x86_64-linux-gnu/libglib-2.0.so.0
(0x00007fe20f0c6000)

libm.so.6 => /lib/x86_64-linux-gnu/libm.so.6 (0x00007fe2114c7000)

libgcc_s.so.1 => /lib/x86_64-linux-gnu/libgcc_s.so.1 (0x00007fe2114a7000)

/lib64/ld-linux-x86-64.so.2 (0x00007fe21257e000)

libpcre.so.3 => /lib/x86_64-linux-gnu/libpcre.so.3 (0x00007fe20f050000)

(familydiagram-server) *parallels at hurin*:*~/familydiagram-server*$ c++filt
_ZdaPvm

operator delete[](void*, unsigned long)

(familydiagram-server) *parallels at hurin*:*~/familydiagram-server*$

On Wed, Oct 5, 2022 at 4:59 AM Patrick Stinson <patrickkidd at gmail.com>
wrote:

> Not necessarily building wheels but just an .so for local import. But I
> think your point stands that the same Qt version needs to be installed so
> that the symbols just resolve.
>
> On Tue, Oct 4, 2022 at 1:07 AM Phil Thompson <phil at riverbankcomputing.com>
> wrote:
>
>> On 03/10/2022 22:58, Patrick Stinson wrote:
>> > Sorry if this has been covered elsewhere, I’ve bee out of the loop for
>> > a while.
>> >
>> > What is the preferred way to build and install a custom sip extension
>> > that depends on PyQt5 and Qt headers+libs so that it can be imported
>> > by the python exe? sip-install requires a qmake executable which
>> > requires separately installing qt headers+libs, but can cause symbol
>> > conflicts with the qt libs included in the pip-installed PyQt module.
>> >
>> > The goal is to understand the qt/pyqt debs required to then simply
>> > clone my sip modules repo, build+install it, then import it from the
>> > python bin.
>>
>> It's not clear if you want to create .debs for your distro (depending on
>> the distro provided PyQt/Qt) or wheels (depending on the PyQt/Qt wheels
>> from PyPI).
>>
>> Assuming the latter you (probably) need to install the targeted version
>> of Qt using the on-line installer. The other PyQt projects (eg.
>> PyQt6-NetworkAuth to take the smallest) are examples of what you want to
>> do.
>>
>> Phil
>>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://www.riverbankcomputing.com/pipermail/pyqt/attachments/20221005/4040da5a/attachment.htm>


More information about the PyQt mailing list