Uploaded image for project: 'Qt for Python'
  1. Qt for Python
  2. PYSIDE-2181

Pyside6 Wheels missing libQt6EglFsKmsGbmSupport

    XMLWordPrintable

Details

    • Bug
    • Resolution: Out of scope
    • Not Evaluated
    • None
    • 6.4.1
    • Build System
    • None
    • Raspberry Pi OS 64-bit (based on Debian 11 Bullseye with a Linux 5.15 kernel) running on a Raspberry Pi 4 hardware
    • Linux/Other display system

    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:

      1. Install Qt6 (I build from source) and libclang (I use clang-13 from Debian)
      2. Clone the Pyside6 Git repository.
      3. Create a Python virtual environment and activate it
      4. Update PATH to include the Qt6 and Clang installations
      5. Build Pyside6 using python setup.py build --standalone --limited-api=yes
      6. Build wheels using python create_wheels.py
      7. Deactivate the Python virtual environment and create and activate a new Python virtual environment.
      8. Install the wheels in the new Python virtual environment using pip install dist_new/*.whl
      9. Specify EGLFS QPA using export QT_QPA_PLATFORM=eglfs
      10. Attempt to run an example using python examples/quick3d/intro/main.py

      I can also reproduce the problem in the 6.4.2 branch.

      Attachments

        No reviews matched the request. Check your Options in the drop-down menu of this sections header.

        Activity

          People

            crmaurei Cristian Maureira-Fredes
            kellyjp James Kelly
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Gerrit Reviews

                There are no open Gerrit changes