1

Five months ago I upgraded from Ubuntu 16.04 to Ubuntu 18.04. Following this upgrade several Qt applications no longer worked for me. Instead of starting up I would see errors such as:

$ git cola &
[1] 9534
$ This application failed to start because it could not find or load the Qt platform plugin "xcb"
in "".

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

Reinstalling the application may fix this problem.
error: git-cola died of signal 6
^C
[1]+ Exit 134 git cola

(I considered asking this on Ask Ubuntu as that is my operating system but it could be a wider Qt environment on Linux issue so I shall start here. This is not git-cola specific, as I see a very similar message on other applications.)

Several posts on the www suggested that a related package might be missing but so far I have not been able to identify what. Running with export QT_DEBUG_PLUGINS=1 set gives more debug information but no answers as far as I can work out:

$ export QT_DEBUG_PLUGINS=1
$ git-cola
QFactoryLoader::QFactoryLoader() checking directory path "/usr/bin/platforms" ...
QFactoryLoader::QFactoryLoader() looking at "/usr/bin/platforms/libqeglfs.so"
Found metadata in lib /usr/lib/x86_64-linux-gnu/qt5/plugins/platforms/libqeglfs.so, metadata=
{
    "IID": "org.qt-project.Qt.QPA.QPlatformIntegrationFactoryInterface.5.3",
    "MetaData": {
        "Keys": [
            "eglfs"
        ]
    },
    "className": "QEglFSIntegrationPlugin",
    "debug": false,
    "version": 329989
}


...<trimming out the rest of the OK stuff until we reach>...


Got keys from plugin meta data ("xcb")
Cannot load library /usr/lib/x86_64-linux-gnu/qt5/plugins/platforms/libqxcb.so: (/usr/lib/x86_64-linux-gnu/libQt5XcbQpa.so.5: symbol _ZNK15QPlatformWindow15safeAreaMarginsEv version Qt_5_PRIVATE_API not defined in file libQt5Gui.so.5 with link time reference)
QLibraryPrivate::loadPlugin failed on "/usr/lib/x86_64-linux-gnu/qt5/plugins/platforms/libqxcb.so" : "Cannot load library /usr/lib/x86_64-linux-gnu/qt5/plugins/platforms/libqxcb.so: (/usr/lib/x86_64-linux-gnu/libQt5XcbQpa.so.5: symbol _ZNK15QPlatformWindow15safeAreaMarginsEv version Qt_5_PRIVATE_API not defined in file libQt5Gui.so.5 with link time reference)"
This application failed to start because it could not find or load the Qt platform plugin "xcb"
in "".

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

Reinstalling the application may fix this problem.
Aborted (core dumped)

When I run the application with ldd or check the package which should be providing xcb all seems to be present and correct.

$ env LANG=C ldd /usr/lib/x86_64-linux-gnu/qt5/plugins/platforms/libqxcb.so
    linux-vdso.so.1 (0x00007ffc489e3000)
    libQt5XcbQpa.so.5 => /usr/lib/x86_64-linux-gnu/libQt5XcbQpa.so.5 (0x00007fd3090c8000)
    libQt5Gui.so.5 => /lib/x86_64-linux-gnu/libQt5Gui.so.5 (0x00007fd308919000)
    libQt5Core.so.5 => /lib/x86_64-linux-gnu/libQt5Core.so.5 (0x00007fd3081de000)
    libstdc++.so.6 => /usr/lib/x86_64-linux-gnu/libstdc++.so.6 (0x00007fd307e50000)
    libc.so.6 => /lib/x86_64-linux-gnu/libc.so.6 (0x00007fd307a5f000)
    libglib-2.0.so.0 => /usr/lib/x86_64-linux-gnu/libglib-2.0.so.0 (0x00007fd307749000)
    libfontconfig.so.1 => /usr/lib/x86_64-linux-gnu/libfontconfig.so.1 (0x00007fd307504000)
    libfreetype.so.6 => /usr/lib/x86_64-linux-gnu/libfreetype.so.6 (0x00007fd307250000)
    libQt5DBus.so.5 => /usr/lib/x86_64-linux-gnu/libQt5DBus.so.5 (0x00007fd306fc6000)
    libpthread.so.0 => /lib/x86_64-linux-gnu/libpthread.so.0 (0x00007fd306da7000)
    libX11-xcb.so.1 => /usr/lib/x86_64-linux-gnu/libX11-xcb.so.1 (0x00007fd306ba5000)
    libX11.so.6 => /usr/lib/x86_64-linux-gnu/libX11.so.6 (0x00007fd30686c000)
    libXi.so.6 => /usr/lib/x86_64-linux-gnu/libXi.so.6 (0x00007fd30665c000)
    libSM.so.6 => /usr/lib/x86_64-linux-gnu/libSM.so.6 (0x00007fd306454000)
    libICE.so.6 => /usr/lib/x86_64-linux-gnu/libICE.so.6 (0x00007fd306239000)
    libxcb-xkb.so.1 => /usr/lib/x86_64-linux-gnu/libxcb-xkb.so.1 (0x00007fd30601d000)
    libxcb-render-util.so.0 => /usr/lib/x86_64-linux-gnu/libxcb-render-util.so.0 (0x00007fd305e19000)
    libxcb-render.so.0 => /usr/lib/x86_64-linux-gnu/libxcb-render.so.0 (0x00007fd305c0c000)
    libxcb-sync.so.1 => /usr/lib/x86_64-linux-gnu/libxcb-sync.so.1 (0x00007fd305a05000)
    libxcb-xfixes.so.0 => /usr/lib/x86_64-linux-gnu/libxcb-xfixes.so.0 (0x00007fd3057fd000)
    libxcb-xinerama.so.0 => /usr/lib/x86_64-linux-gnu/libxcb-xinerama.so.0 (0x00007fd3055fa000)
    libxcb-randr.so.0 => /usr/lib/x86_64-linux-gnu/libxcb-randr.so.0 (0x00007fd3053ea000)
    libxcb-image.so.0 => /usr/lib/x86_64-linux-gnu/libxcb-image.so.0 (0x00007fd3051e5000)
    libxcb-shm.so.0 => /usr/lib/x86_64-linux-gnu/libxcb-shm.so.0 (0x00007fd304fe2000)
    libxcb-keysyms.so.1 => /usr/lib/x86_64-linux-gnu/libxcb-keysyms.so.1 (0x00007fd304ddf000)
    libxcb-icccm.so.4 => /usr/lib/x86_64-linux-gnu/libxcb-icccm.so.4 (0x00007fd304bda000)
    libxcb.so.1 => /usr/lib/x86_64-linux-gnu/libxcb.so.1 (0x00007fd3049b2000)
    libxcb-shape.so.0 => /usr/lib/x86_64-linux-gnu/libxcb-shape.so.0 (0x00007fd3047ae000)
    libxkbcommon-x11.so.0 => /usr/lib/x86_64-linux-gnu/libxkbcommon-x11.so.0 (0x00007fd3045a6000)
    libxkbcommon.so.0 => /usr/lib/x86_64-linux-gnu/libxkbcommon.so.0 (0x00007fd304367000)
    libm.so.6 => /lib/x86_64-linux-gnu/libm.so.6 (0x00007fd303fc9000)
    libgcc_s.so.1 => /lib/x86_64-linux-gnu/libgcc_s.so.1 (0x00007fd303db1000)
    libGL.so.1 => /usr/lib/x86_64-linux-gnu/libGL.so.1 (0x00007fd303b25000)
    libz.so.1 => /lib/x86_64-linux-gnu/libz.so.1 (0x00007fd303908000)
    libicui18n.so.56 => /lib/x86_64-linux-gnu/libicui18n.so.56 (0x00007fd30346f000)
    libicuuc.so.56 => /lib/x86_64-linux-gnu/libicuuc.so.56 (0x00007fd3030b7000)
    libicudata.so.56 => /lib/x86_64-linux-gnu/libicudata.so.56 (0x00007fd3016d4000)
    libdl.so.2 => /lib/x86_64-linux-gnu/libdl.so.2 (0x00007fd3014d0000)
    libgthread-2.0.so.0 => /usr/lib/x86_64-linux-gnu/libgthread-2.0.so.0 (0x00007fd3012ce000)
    /lib64/ld-linux-x86-64.so.2 (0x00007fd3095ce000)
    libpcre.so.3 => /lib/x86_64-linux-gnu/libpcre.so.3 (0x00007fd30105c000)
    libexpat.so.1 => /lib/x86_64-linux-gnu/libexpat.so.1 (0x00007fd300e2a000)
    libpng16.so.16 => /usr/lib/x86_64-linux-gnu/libpng16.so.16 (0x00007fd300bf8000)
    libdbus-1.so.3 => /lib/x86_64-linux-gnu/libdbus-1.so.3 (0x00007fd3009ab000)
    libXext.so.6 => /usr/lib/x86_64-linux-gnu/libXext.so.6 (0x00007fd300799000)
    libuuid.so.1 => /lib/x86_64-linux-gnu/libuuid.so.1 (0x00007fd300592000)
    libbsd.so.0 => /lib/x86_64-linux-gnu/libbsd.so.0 (0x00007fd30037d000)
    libxcb-util.so.1 => /usr/lib/x86_64-linux-gnu/libxcb-util.so.1 (0x00007fd300177000)
    libXau.so.6 => /usr/lib/x86_64-linux-gnu/libXau.so.6 (0x00007fd2fff73000)
    libXdmcp.so.6 => /usr/lib/x86_64-linux-gnu/libXdmcp.so.6 (0x00007fd2ffd6d000)
    libGLX.so.0 => /usr/lib/x86_64-linux-gnu/libGLX.so.0 (0x00007fd2ffb3c000)
    libGLdispatch.so.0 => /usr/lib/x86_64-linux-gnu/libGLdispatch.so.0 (0x00007fd2ff886000)
    libsystemd.so.0 => /lib/x86_64-linux-gnu/libsystemd.so.0 (0x00007fd2ff602000)
    librt.so.1 => /lib/x86_64-linux-gnu/librt.so.1 (0x00007fd2ff3fa000)
    liblzma.so.5 => /lib/x86_64-linux-gnu/liblzma.so.5 (0x00007fd2ff1d4000)
    liblz4.so.1 => /usr/lib/x86_64-linux-gnu/liblz4.so.1 (0x00007fd2fefb8000)
    libgcrypt.so.20 => /lib/x86_64-linux-gnu/libgcrypt.so.20 (0x00007fd2fec9d000)
    libgpg-error.so.0 => /lib/x86_64-linux-gnu/libgpg-error.so.0 (0x00007fd2fea88000)

Several of the applcations I have issues with offer a seperate container or packaging solution such as snap or flatpak. While this provides me with a workaround in many cases, I would still like to be able to resolve the issue with my Qt environment.

1

It looks like you have a Qt libraries version mismatch.

I see Qt libraries coming from both /usr/bin/platforms/libqeglfs.so and /usr/lib/x86_64-linux-gnu/qt5/plugins/platforms, which are probably not consistent.

You might need to specify the path like:

export LD_LIBRARY_PATH:/path/to/right/libs:$LD_LIBRARY_PATH
  • Your suggested workaround has got everything to work correctly! Now I just need to find why I am in the wrong state. – TafT Jan 24 at 13:11
  • Interestingly the two directories pointed to would be consistent: /usr/bin/platforms -> /usr/lib/x86_64-linux-gnu/qt5/plugins/platforms/ I am not sure that symlink is needed though. – TafT Jan 24 at 13:15

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.