Details
-
Bug
-
Resolution: Out of scope
-
Not Evaluated
-
None
-
6.4.1
-
None
-
Raspberry Pi OS 64-bit (based on Debian 11 Bullseye with a Linux 5.15 kernel) running on a Raspberry Pi 4 hardware
Description
Background:
I am attempting to use Pyside6 with the EGLFS QPA, specifically the eglfs_kms backend with GBM for buffer management. I am building wheel archives using the create_wheels.py script in the Pyside6 source tree to enable standalone installations of Pyside6 on other systems that do not have a preexisting Qt6 installation e.g. Debian 11 bullseye systems.
Symptom:
Python GUI programs using Pyside6 installed from wheel archives fail to launch when using QT_QPA_PLATFORM=eglfs. The error messages displayed are:
qt.qpa.egldeviceintegration: Failed to load EGL device integration "eglfs_kms"
drmModeGetResources failed (Operation not supported)
Cannot find EGLConfig, returning null config
Cannot create window: no screens available
Aborted
Root Cause:
Setting QT_LOGGING_LEVEL=qt.core.library=true reveals the root cause:
qt.core.library: "...../lib/python3.9/site-packages/PySide6/Qt/plugins/egldeviceintegrations/libeglfs-kms-integration.so" cannot load: Cannot load library ...../lib/python3.9/site-packages/Pyside6/Qt/plugins/egldeviceintegrations/libqeglfs-kms-integration.so: (libQt6EglFsKmsGbmSupport.so.6: cannot open shared object file: No such file or directory)
Clearly the library libQt6EglFsKmsGbmSupport is missing from the Python virtual environment.
Note that everything works as expected If I build a Python environment directly from the Pyside6 source using:
$ python setup.py install --standalone --limited-api=yes
The issue only occurs when the Python environment is populated from the wheel archives created using the create_wheels.py script.
Comparing the two Python environments reveals that the environment populated from wheel archives does not include the libQt6EglFsKmsGbmSupport library whereas the environment installed directly does include the library.
Workaround:
If I manually copy the library from a Python environment installed directly into a Python environment populated from wheel archives the issue is resolved.
Steps to Recreate:
- Install Qt6 (I build from source) and libclang (I use clang-13 from Debian)
- Clone the Pyside6 Git repository.
- Create a Python virtual environment and activate it
- Update PATH to include the Qt6 and Clang installations
- Build Pyside6 using python setup.py build --standalone --limited-api=yes
- Build wheels using python create_wheels.py
- Deactivate the Python virtual environment and create and activate a new Python virtual environment.
- Install the wheels in the new Python virtual environment using pip install dist_new/*.whl
- Specify EGLFS QPA using export QT_QPA_PLATFORM=eglfs
- Attempt to run an example using python examples/quick3d/intro/main.py
I can also reproduce the problem in the 6.4.2 branch.