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

Add PySide6 to ubuntu-20.04-focal-amd64 #102

Merged
merged 4 commits into from
Jan 4, 2021

Conversation

hugovk
Copy link
Member

@hugovk hugovk commented Jan 1, 2021

Tested locally:

docker build ubuntu-20.04-focal-amd64 -t pillow-ubuntu-20.04-focal-amd64
docker run -t -i --rm pillow-ubuntu-20.04-focal-amd64 bash
/vpy3/bin/pip install https://github.com/hugovk/Pillow/archive/add-pyside6.zip
/vpy3/bin/python
Python 3.8.5 (default, Jul 28 2020, 12:59:40)
[GCC 9.3.0] on linux
Type "help", "copyright", "credits" or "license" for more information.
>>> import PIL
>>> PIL.__version__
'8.1.0.dev0'
>>> from PIL.ImageQt import qRgba
>>> from PySide6.QtGui import qRgb
>>> assert qRgb(0, 0, 0) == qRgba(0, 0, 0, 255)
>>>

Dependencies added by starting with the master and adding the libs it complains about:

>>> from PySide6.QtGui import qRgb
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "/vpy3/lib/python3.8/site-packages/shiboken6/files.dir/shibokensupport/__feature__.py", line 140, in _import
    return original_import(name, *args, **kwargs)
ImportError: libOpenGL.so.0: cannot open shared object file: No such file or directory

@radarhere
Copy link
Member

Re-running these jobs now that python-pillow/Pillow#5161 is merged, 'latest + ubuntu-20.04-focal-amd64' is failing.

@hugovk
Copy link
Member Author

hugovk commented Jan 3, 2021

pillow@079b6b82d834:/$ /vpy3/bin/pip install -U pillow
Requirement already satisfied: pillow in /usr/lib/python3/dist-packages (7.0.0)
Collecting pillow
  Downloading Pillow-8.1.0-cp38-cp38-manylinux1_x86_64.whl (2.2 MB)
     |████████████████████████████████| 2.2 MB 4.9 MB/s
Installing collected packages: pillow
  Attempting uninstall: pillow
    Found existing installation: Pillow 7.0.0
    Not uninstalling pillow at /usr/lib/python3/dist-packages, outside environment /vpy3
    Can't uninstall 'Pillow'. No files were found to uninstall.
Successfully installed pillow-8.1.0
pillow@079b6b82d834:/$ /vpy3/bin/python
Python 3.8.5 (default, Jul 28 2020, 12:59:40)
[GCC 9.3.0] on linux
Type "help", "copyright", "credits" or "license" for more information.
>>> from PySide6.QtWidgets import QApplication, QHBoxLayout, QLabel, QWidget
>>> # Segfault test
>>> app = QApplication([])
qt.qpa.plugin: Could not load the Qt platform plugin "xcb" in "" even though it was found.
This application failed to start because no Qt platform plugin could be initialized. Reinstalling the application may fix this problem.

Available platform plugins are: eglfs, linuxfb, minimal, minimalegl, offscreen, vnc, wayland-egl, wayland, wayland-xcomposite-egl, wayland-xcomposite-glx, xcb.

Aborted
pillow@079b6b82d834:/$

https://forum.qt.io/post/473252 suggests setting a debug env var:

pillow@079b6b82d834:/$ export QT_DEBUG_PLUGINS=1
pillow@079b6b82d834:/$ /vpy3/bin/python
Python 3.8.5 (default, Jul 28 2020, 12:59:40)
[GCC 9.3.0] on linux
Type "help", "copyright", "credits" or "license" for more information.
>>> from PySide6.QtWidgets import QApplication; QApplication([])
QFactoryLoader::QFactoryLoader() checking directory path "/vpy3/lib/python3.8/site-packages/PySide6/Qt/plugins/platforms" ...
QFactoryLoader::QFactoryLoader() looking at "/vpy3/lib/python3.8/site-packages/PySide6/Qt/plugins/platforms/libqeglfs.so"
Found metadata in lib /vpy3/lib/python3.8/site-packages/PySide6/Qt/plugins/platforms/libqeglfs.so, metadata=
{
    "IID": "org.qt-project.Qt.QPA.QPlatformIntegrationFactoryInterface.5.3",
    "MetaData": {
        "Keys": [
            "eglfs"
        ]
    },
    "archreq": 0,
    "className": "QEglFSIntegrationPlugin",
    "debug": false,
    "version": 393216
}


Got keys from plugin meta data QList("eglfs")
QFactoryLoader::QFactoryLoader() looking at "/vpy3/lib/python3.8/site-packages/PySide6/Qt/plugins/platforms/libqlinuxfb.so"
Found metadata in lib /vpy3/lib/python3.8/site-packages/PySide6/Qt/plugins/platforms/libqlinuxfb.so, metadata=
{
    "IID": "org.qt-project.Qt.QPA.QPlatformIntegrationFactoryInterface.5.3",
    "MetaData": {
        "Keys": [
            "linuxfb"
        ]
    },
    "archreq": 0,
    "className": "QLinuxFbIntegrationPlugin",
    "debug": false,
    "version": 393216
}


Got keys from plugin meta data QList("linuxfb")
QFactoryLoader::QFactoryLoader() looking at "/vpy3/lib/python3.8/site-packages/PySide6/Qt/plugins/platforms/libqminimal.so"
Found metadata in lib /vpy3/lib/python3.8/site-packages/PySide6/Qt/plugins/platforms/libqminimal.so, metadata=
{
    "IID": "org.qt-project.Qt.QPA.QPlatformIntegrationFactoryInterface.5.3",
    "MetaData": {
        "Keys": [
            "minimal"
        ]
    },
    "archreq": 0,
    "className": "QMinimalIntegrationPlugin",
    "debug": false,
    "version": 393216
}


Got keys from plugin meta data QList("minimal")
QFactoryLoader::QFactoryLoader() looking at "/vpy3/lib/python3.8/site-packages/PySide6/Qt/plugins/platforms/libqminimalegl.so"
Found metadata in lib /vpy3/lib/python3.8/site-packages/PySide6/Qt/plugins/platforms/libqminimalegl.so, metadata=
{
    "IID": "org.qt-project.Qt.QPA.QPlatformIntegrationFactoryInterface.5.3",
    "MetaData": {
        "Keys": [
            "minimalegl"
        ]
    },
    "archreq": 0,
    "className": "QMinimalEglIntegrationPlugin",
    "debug": false,
    "version": 393216
}


Got keys from plugin meta data QList("minimalegl")
QFactoryLoader::QFactoryLoader() looking at "/vpy3/lib/python3.8/site-packages/PySide6/Qt/plugins/platforms/libqoffscreen.so"
Found metadata in lib /vpy3/lib/python3.8/site-packages/PySide6/Qt/plugins/platforms/libqoffscreen.so, metadata=
{
    "IID": "org.qt-project.Qt.QPA.QPlatformIntegrationFactoryInterface.5.3",
    "MetaData": {
        "Keys": [
            "offscreen"
        ]
    },
    "archreq": 0,
    "className": "QOffscreenIntegrationPlugin",
    "debug": false,
    "version": 393216
}


Got keys from plugin meta data QList("offscreen")
QFactoryLoader::QFactoryLoader() looking at "/vpy3/lib/python3.8/site-packages/PySide6/Qt/plugins/platforms/libqvnc.so"
Found metadata in lib /vpy3/lib/python3.8/site-packages/PySide6/Qt/plugins/platforms/libqvnc.so, metadata=
{
    "IID": "org.qt-project.Qt.QPA.QPlatformIntegrationFactoryInterface.5.3",
    "MetaData": {
        "Keys": [
            "vnc"
        ]
    },
    "archreq": 0,
    "className": "QVncIntegrationPlugin",
    "debug": false,
    "version": 393216
}


Got keys from plugin meta data QList("vnc")
QFactoryLoader::QFactoryLoader() looking at "/vpy3/lib/python3.8/site-packages/PySide6/Qt/plugins/platforms/libqwayland-egl.so"
Found metadata in lib /vpy3/lib/python3.8/site-packages/PySide6/Qt/plugins/platforms/libqwayland-egl.so, metadata=
{
    "IID": "org.qt-project.Qt.QPA.QPlatformIntegrationFactoryInterface.5.3",
    "MetaData": {
        "Keys": [
            "wayland-egl"
        ]
    },
    "archreq": 0,
    "className": "QWaylandEglPlatformIntegrationPlugin",
    "debug": false,
    "version": 393216
}


Got keys from plugin meta data QList("wayland-egl")
QFactoryLoader::QFactoryLoader() looking at "/vpy3/lib/python3.8/site-packages/PySide6/Qt/plugins/platforms/libqwayland-generic.so"
Found metadata in lib /vpy3/lib/python3.8/site-packages/PySide6/Qt/plugins/platforms/libqwayland-generic.so, metadata=
{
    "IID": "org.qt-project.Qt.QPA.QPlatformIntegrationFactoryInterface.5.3",
    "MetaData": {
        "Keys": [
            "wayland"
        ]
    },
    "archreq": 0,
    "className": "QWaylandIntegrationPlugin",
    "debug": false,
    "version": 393216
}


Got keys from plugin meta data QList("wayland")
QFactoryLoader::QFactoryLoader() looking at "/vpy3/lib/python3.8/site-packages/PySide6/Qt/plugins/platforms/libqwayland-xcomposite-egl.so"
Found metadata in lib /vpy3/lib/python3.8/site-packages/PySide6/Qt/plugins/platforms/libqwayland-xcomposite-egl.so, metadata=
{
    "IID": "org.qt-project.Qt.QPA.QPlatformIntegrationFactoryInterface.5.3",
    "MetaData": {
        "Keys": [
            "wayland-xcomposite-egl"
        ]
    },
    "archreq": 0,
    "className": "QWaylandXCompositeEglPlatformIntegrationPlugin",
    "debug": false,
    "version": 393216
}


Got keys from plugin meta data QList("wayland-xcomposite-egl")
QFactoryLoader::QFactoryLoader() looking at "/vpy3/lib/python3.8/site-packages/PySide6/Qt/plugins/platforms/libqwayland-xcomposite-glx.so"
Found metadata in lib /vpy3/lib/python3.8/site-packages/PySide6/Qt/plugins/platforms/libqwayland-xcomposite-glx.so, metadata=
{
    "IID": "org.qt-project.Qt.QPA.QPlatformIntegrationFactoryInterface.5.3",
    "MetaData": {
        "Keys": [
            "wayland-xcomposite-glx"
        ]
    },
    "archreq": 0,
    "className": "QWaylandXCompositeGlxPlatformIntegrationPlugin",
    "debug": false,
    "version": 393216
}


Got keys from plugin meta data QList("wayland-xcomposite-glx")
QFactoryLoader::QFactoryLoader() looking at "/vpy3/lib/python3.8/site-packages/PySide6/Qt/plugins/platforms/libqxcb.so"
Found metadata in lib /vpy3/lib/python3.8/site-packages/PySide6/Qt/plugins/platforms/libqxcb.so, metadata=
{
    "IID": "org.qt-project.Qt.QPA.QPlatformIntegrationFactoryInterface.5.3",
    "MetaData": {
        "Keys": [
            "xcb"
        ]
    },
    "archreq": 0,
    "className": "QXcbIntegrationPlugin",
    "debug": false,
    "version": 393216
}


Got keys from plugin meta data QList("xcb")
QFactoryLoader::QFactoryLoader() checking directory path "/usr/bin/platforms" ...
Cannot load library /vpy3/lib/python3.8/site-packages/PySide6/Qt/plugins/platforms/libqxcb.so: (libxkbcommon-x11.so.0: cannot open shared object file: No such file or directory)
QLibraryPrivate::loadPlugin failed on "/vpy3/lib/python3.8/site-packages/PySide6/Qt/plugins/platforms/libqxcb.so" : "Cannot load library /vpy3/lib/python3.8/site-packages/PySide6/Qt/plugins/platforms/libqxcb.so: (libxkbcommon-x11.so.0: cannot open shared object file: No such file or directory)"
qt.qpa.plugin: Could not load the Qt platform plugin "xcb" in "" even though it was found.
This application failed to start because no Qt platform plugin could be initialized. Reinstalling the application may fix this problem.

Available platform plugins are: eglfs, linuxfb, minimal, minimalegl, offscreen, vnc, wayland-egl, wayland, wayland-xcomposite-egl, wayland-xcomposite-glx, xcb.

Aborted

But libqxcb.so is at that path, but it cannot be loaded...

pillow@14de32f91b13:/$ ls -l /vpy3/lib/python3.8/site-packages/PySide6/Qt/plugins/platforms/libqxcb.so
-rwxr-xr-x 1 pillow pillow 10784 Jan  3 12:36 /vpy3/lib/python3.8/site-packages/PySide6/Qt/plugins/platforms/libqxcb.so

Adding the missing libs and repeating (see last commit), we then get qt.qpa.xcb: could not connect to display...

Python 3.8.5 (default, Jul 28 2020, 12:59:40)
[GCC 9.3.0] on linux
Type "help", "copyright", "credits" or "license" for more information.
>>> from PySide6.QtWidgets import QApplication, QHBoxLayout, QLabel, QWidget
>>> app = QApplication([])
QFactoryLoader::QFactoryLoader() checking directory path "/vpy3/lib/python3.8/site-packages/PySide6/Qt/plugins/platforms" ...
QFactoryLoader::QFactoryLoader() looking at "/vpy3/lib/python3.8/site-packages/PySide6/Qt/plugins/platforms/libqeglfs.so"
Found metadata in lib /vpy3/lib/python3.8/site-packages/PySide6/Qt/plugins/platforms/libqeglfs.so, metadata=
{
    "IID": "org.qt-project.Qt.QPA.QPlatformIntegrationFactoryInterface.5.3",
    "MetaData": {
        "Keys": [
            "eglfs"
        ]
    },
    "archreq": 0,
    "className": "QEglFSIntegrationPlugin",
    "debug": false,
    "version": 393216
}


Got keys from plugin meta data QList("eglfs")
QFactoryLoader::QFactoryLoader() looking at "/vpy3/lib/python3.8/site-packages/PySide6/Qt/plugins/platforms/libqlinuxfb.so"
Found metadata in lib /vpy3/lib/python3.8/site-packages/PySide6/Qt/plugins/platforms/libqlinuxfb.so, metadata=
{
    "IID": "org.qt-project.Qt.QPA.QPlatformIntegrationFactoryInterface.5.3",
    "MetaData": {
        "Keys": [
            "linuxfb"
        ]
    },
    "archreq": 0,
    "className": "QLinuxFbIntegrationPlugin",
    "debug": false,
    "version": 393216
}


Got keys from plugin meta data QList("linuxfb")
QFactoryLoader::QFactoryLoader() looking at "/vpy3/lib/python3.8/site-packages/PySide6/Qt/plugins/platforms/libqminimal.so"
Found metadata in lib /vpy3/lib/python3.8/site-packages/PySide6/Qt/plugins/platforms/libqminimal.so, metadata=
{
    "IID": "org.qt-project.Qt.QPA.QPlatformIntegrationFactoryInterface.5.3",
    "MetaData": {
        "Keys": [
            "minimal"
        ]
    },
    "archreq": 0,
    "className": "QMinimalIntegrationPlugin",
    "debug": false,
    "version": 393216
}


Got keys from plugin meta data QList("minimal")
QFactoryLoader::QFactoryLoader() looking at "/vpy3/lib/python3.8/site-packages/PySide6/Qt/plugins/platforms/libqminimalegl.so"
Found metadata in lib /vpy3/lib/python3.8/site-packages/PySide6/Qt/plugins/platforms/libqminimalegl.so, metadata=
{
    "IID": "org.qt-project.Qt.QPA.QPlatformIntegrationFactoryInterface.5.3",
    "MetaData": {
        "Keys": [
            "minimalegl"
        ]
    },
    "archreq": 0,
    "className": "QMinimalEglIntegrationPlugin",
    "debug": false,
    "version": 393216
}


Got keys from plugin meta data QList("minimalegl")
QFactoryLoader::QFactoryLoader() looking at "/vpy3/lib/python3.8/site-packages/PySide6/Qt/plugins/platforms/libqoffscreen.so"
Found metadata in lib /vpy3/lib/python3.8/site-packages/PySide6/Qt/plugins/platforms/libqoffscreen.so, metadata=
{
    "IID": "org.qt-project.Qt.QPA.QPlatformIntegrationFactoryInterface.5.3",
    "MetaData": {
        "Keys": [
            "offscreen"
        ]
    },
    "archreq": 0,
    "className": "QOffscreenIntegrationPlugin",
    "debug": false,
    "version": 393216
}


Got keys from plugin meta data QList("offscreen")
QFactoryLoader::QFactoryLoader() looking at "/vpy3/lib/python3.8/site-packages/PySide6/Qt/plugins/platforms/libqvnc.so"
Found metadata in lib /vpy3/lib/python3.8/site-packages/PySide6/Qt/plugins/platforms/libqvnc.so, metadata=
{
    "IID": "org.qt-project.Qt.QPA.QPlatformIntegrationFactoryInterface.5.3",
    "MetaData": {
        "Keys": [
            "vnc"
        ]
    },
    "archreq": 0,
    "className": "QVncIntegrationPlugin",
    "debug": false,
    "version": 393216
}


Got keys from plugin meta data QList("vnc")
QFactoryLoader::QFactoryLoader() looking at "/vpy3/lib/python3.8/site-packages/PySide6/Qt/plugins/platforms/libqwayland-egl.so"
Found metadata in lib /vpy3/lib/python3.8/site-packages/PySide6/Qt/plugins/platforms/libqwayland-egl.so, metadata=
{
    "IID": "org.qt-project.Qt.QPA.QPlatformIntegrationFactoryInterface.5.3",
    "MetaData": {
        "Keys": [
            "wayland-egl"
        ]
    },
    "archreq": 0,
    "className": "QWaylandEglPlatformIntegrationPlugin",
    "debug": false,
    "version": 393216
}


Got keys from plugin meta data QList("wayland-egl")
QFactoryLoader::QFactoryLoader() looking at "/vpy3/lib/python3.8/site-packages/PySide6/Qt/plugins/platforms/libqwayland-generic.so"
Found metadata in lib /vpy3/lib/python3.8/site-packages/PySide6/Qt/plugins/platforms/libqwayland-generic.so, metadata=
{
    "IID": "org.qt-project.Qt.QPA.QPlatformIntegrationFactoryInterface.5.3",
    "MetaData": {
        "Keys": [
            "wayland"
        ]
    },
    "archreq": 0,
    "className": "QWaylandIntegrationPlugin",
    "debug": false,
    "version": 393216
}


Got keys from plugin meta data QList("wayland")
QFactoryLoader::QFactoryLoader() looking at "/vpy3/lib/python3.8/site-packages/PySide6/Qt/plugins/platforms/libqwayland-xcomposite-egl.so"
Found metadata in lib /vpy3/lib/python3.8/site-packages/PySide6/Qt/plugins/platforms/libqwayland-xcomposite-egl.so, metadata=
{
    "IID": "org.qt-project.Qt.QPA.QPlatformIntegrationFactoryInterface.5.3",
    "MetaData": {
        "Keys": [
            "wayland-xcomposite-egl"
        ]
    },
    "archreq": 0,
    "className": "QWaylandXCompositeEglPlatformIntegrationPlugin",
    "debug": false,
    "version": 393216
}


Got keys from plugin meta data QList("wayland-xcomposite-egl")
QFactoryLoader::QFactoryLoader() looking at "/vpy3/lib/python3.8/site-packages/PySide6/Qt/plugins/platforms/libqwayland-xcomposite-glx.so"
Found metadata in lib /vpy3/lib/python3.8/site-packages/PySide6/Qt/plugins/platforms/libqwayland-xcomposite-glx.so, metadata=
{
    "IID": "org.qt-project.Qt.QPA.QPlatformIntegrationFactoryInterface.5.3",
    "MetaData": {
        "Keys": [
            "wayland-xcomposite-glx"
        ]
    },
    "archreq": 0,
    "className": "QWaylandXCompositeGlxPlatformIntegrationPlugin",
    "debug": false,
    "version": 393216
}


Got keys from plugin meta data QList("wayland-xcomposite-glx")
QFactoryLoader::QFactoryLoader() looking at "/vpy3/lib/python3.8/site-packages/PySide6/Qt/plugins/platforms/libqxcb.so"
Found metadata in lib /vpy3/lib/python3.8/site-packages/PySide6/Qt/plugins/platforms/libqxcb.so, metadata=
{
    "IID": "org.qt-project.Qt.QPA.QPlatformIntegrationFactoryInterface.5.3",
    "MetaData": {
        "Keys": [
            "xcb"
        ]
    },
    "archreq": 0,
    "className": "QXcbIntegrationPlugin",
    "debug": false,
    "version": 393216
}


Got keys from plugin meta data QList("xcb")
QFactoryLoader::QFactoryLoader() checking directory path "/usr/bin/platforms" ...
loaded library "/vpy3/lib/python3.8/site-packages/PySide6/Qt/plugins/platforms/libqxcb.so"
qt.qpa.xcb: could not connect to display
qt.qpa.plugin: Could not load the Qt platform plugin "xcb" in "" even though it was found.
This application failed to start because no Qt platform plugin could be initialized. Reinstalling the application may fix this problem.

Available platform plugins are: eglfs, linuxfb, minimal, minimalegl, offscreen, vnc, wayland-egl, wayland, wayland-xcomposite-egl, wayland-xcomposite-glx, xcb.

Aborted

@hugovk
Copy link
Member Author

hugovk commented Jan 3, 2021

Hmm, well that passed 🤷

Removed unnecessary libraries
@radarhere radarhere merged commit 2a04f1d into python-pillow:master Jan 4, 2021
@hugovk hugovk deleted the add-pyside6 branch January 4, 2021 13:13
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

Successfully merging this pull request may close these issues.

2 participants