[Interest] Qt 5.12 official build on Ubuntu 14.04

René J.V. Bertin rjvbertin at gmail.com
Mon Mar 11 11:56:59 CET 2019


Hi,

I wanted to test something against a newer Qt version than my customised 5.9.7 build so I used the official installer to get 5.12.1 and wrote a little wrapper that sets up LD_LIBRARY_PATH and QT_PLUGIN_PATH appropriately to run existing binaries against this Qt version.

One hurdle: my distribution uses dbus 1.6.x which lacks at least 1 function required by libQt5Dbus. I don't really want to risk rolling my own upgrade for that. So instead I installed dbus 1.12.12 into my usual /opt/local parallel prefix with a suffix on the binaries and configured to use the same runtime resources as the host dbus. That seems to work just fine, despite the fact that it communicates through an older dbus daemon and with other clients that will use the older libdbus library.

I do observe something very curious and surprising. All my KF5 applications from /opt/local run just fine against this Qt 5.12 install, and a few of the simpler "pure Qt" applications do too (like qdbusviewer and even linguist). But most fail very quickly with this error:

%> /opt/Qt/5/5.12.1/thisQt.sh /opt/local/libexec/qt5/bin/assistant
This application failed to start because it could not find or load the Qt platform plugin "xcb"
in "".

Available platform plugins are: wayland-org.kde.kwin.qpa, eglfs, minimal, minimalegl, offscreen, vnc, wayland-egl, wayland, wayland-xcomposite-egl, wayland-xcomposite-glx, xcb.

Reinstalling the application may fix this problem.
Abort

When I set QT_DEBUG_PLUGINS=1 I see that only plugins from the /opt/local install are being loaded, yet I set QT_PLUGIN_PATH to list the 5.12 plugin directory first. For good measure I added an LD_PRELOAD of the 5.12 libQt5Core to my wrapper; makes no difference.

The difference between these "pure Qt" and the KF5 applications is that the former are built via qmake, the latter via cmake. Can that explain a difference in rpath information set in the executables which makes the LD_LIBRARY_PATH trick fail in the former?

Thanks,
R.


More information about the Interest mailing list