-
Notifications
You must be signed in to change notification settings - Fork 852
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
OpenCV custom Linux built whl doesn't include Qt libraries #1020
Comments
Check out https://github.com/pypa/auditwheel and step 6. in the manual build guide in the README: https://github.com/opencv/opencv-python?tab=readme-ov-file#manual-builds |
Thanks, much better! However, built package still incomplete - there is no libqxcb.so library from the Qt (which is present in official build), so Linux Qt GUI not working. How to fix this? My build command sequence to run inside manylinux2014 docker:
|
You need to patch the auditwheel lib whitelist before running it: https://github.com/opencv/opencv-python/blob/4.x/patch_auditwheel_whitelist.py |
I have tried, but it's not working:
I have installed another one, patch and run with the following commands:
But seems nothing changed - there is no libqxcb.so in resulting whl-package. Did I missed something else? |
Ah.. the library that is missing requires also CMakelists patch: https://github.com/opencv/opencv-python/blob/4.x/patches/patchQtPlugins which is applied only if CI_BUILD env var is set to true: Line 233 in 6a181ce
|
You are trying to emulate the CI build environment so the steps need to follow the same steps as in this repo's CI process. |
Thanks for advice! Unfortunately I cannot understand and parse all build files so well. If this patch is required, why it's applied only in CI_BUILD case? |
It's required only when building PyPI-compatible wheels for redistribution for maximum portability. When you make a wheel locally and use the wheel on the same machine in the same environment, there's no need to bundle everything in the wheel since the libraries are already available in your system. |
For local need opencv with python bindings can be built and installed directly without opencv-python. |
I'm building OpenCV with Qt support for Linux. Resulting whl file doesn't include Qt libraries as expected (whl from the pypi.org has no such problem, all libs (Qt and others) are included there).
Steps to reproduce.
Run Ubuntu in docker container:
Run inside docker container:
How can I build package with all libraries included?
The text was updated successfully, but these errors were encountered: