Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Failing to build a PySide2 binding to a C++ software in manylinux_2_24 #615

Closed
kleag opened this issue Dec 21, 2021 · 1 comment
Closed

Comments

@kleag
Copy link

kleag commented Dec 21, 2021

Hi,
First of all, I'd like to signal that I'm cross-issuing this to manylinux and Qt because I'm not sure who is the responsible here.

I'm trying to build a python binding to a Qt-based C++ software. After a lot of search, I chose pyside2/scikit-build on the manylinux_2_24 docker image. I document this adventure here: aymara/lima#123 .

I was able to build locally a shiboken2/pyside2-based LIMA binding using scikit-build. I'm now trying to build it in a manylinux_2_24 based docker container. Unfortunately, building pyside inside the container fails at:

RUN python3.8 setup.py bdist_wheel

With:

Inserting path '/opt/_internal/cpython-3.8.12/bin' to environment
error: Failed to locate the Python library with /opt/_internal/cpython-3.8.12/lib/x86_64-linux-gnu/libpython3.8.so, /opt/_internal/cpython-3.8.12/lib/x86_64-linux-gnu/libpython3.8.so.1, /opt/_internal/cpython-3.8.12/lib/x86_64-linux-gnu/libpython3.8.so.1.0, /opt/_internal/cpython-3.8.12/lib/x86_64-linux-gnu/libpython3.8.a
Traceback (most recent call last):
File "setup.py", line 296, in <module>
setup_runner.run_setup()
File "/pyside-setup/build_scripts/setup_runner.py", line 168, in run_setup
raise RuntimeError(msg)
RuntimeError:
setup.py invocation failed with exit code: 1.

setup.py invocation was: /usr/local/bin/python3.8 setup.py install --cmake=/usr/local/bin/cmake --build-type=all --internal-build-type=shiboken2

It seems that one cannot have a libpython inside a wheel and/or the manylinux container, by design (pypa/manylinux#255). Because python extension should not link against libpython.

I'm now a little bit lost. I don't know what to search now. I wonder if I should try to remove the reference to libpython from the pyside build system but I don't what would be the consequences.

@kleag
Copy link
Author

kleag commented Jan 4, 2022

@mayeut found a long term solution and a short term workaround for this problem which originates from PySide in fact:
pypa/manylinux#1243

@kleag kleag closed this as completed Jan 4, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant