Getting XCB to statically link with Qt application (use Wayland on X11 instead?)
-
I'm trying to get my statically built GUI application to launch on Red Hat Enterprise Linux 7.6/7.9. But I get the error (core dump) below:
QFactoryLoader::QFactoryLoader() ignoring "org.qt-project.Qt.QPA.QPlatformIntegrationFactoryInterface.5.3" since plugins are disabled in static builds qt.qpa.plugin: Could not find the Qt platform plugin "xcb" in "" This application failed to start because no Qt platform plugin could be initialized. Reinstalling the application may fix this problem. Available platform plugins are: wayland-egl, wayland. Aborted (core dumped)It seems several people have had issues with this, with the only resolution being attempting to install all
xkbcommonandXCB-related dependencies prior to building the statically built Qt tool chain/libs (Qt-5.15.5*). I have tried this but it seems the configure script didn't detect it orXCBfiled to be included for other reasons.I've not been able to get XCB to statically link but I do get
waylandplugin statically linked and alsowayland-egl. Even though the related dependencies have been installed, the compilation does not includeXCB.*) built from source, commercial license (small business, without support entitlement)
So my first question is, is there a way to configure Linux to use Wayland display in X11? I'm quite ignorant of Wayland so hoping someone can point me in the right direction.
If this is not possible then my next path forward seems to be to debug why Qt configure script doesn't detect some of the dependencies that might be required in order for
XCBto be incorporated into the static build.Background
Using X11:
$ env | grep SESSION_TYPE XDG_SESSION_TYPE=x11ldd ./MyApplication:linux-vdso.so.1 => (0x00007ffff9f9e000) libdrm.so.2 => /lib64/libdrm.so.2 (0x00007f95e2363000) libX11-xcb.so.1 => /lib64/libX11-xcb.so.1 (0x00007f95e2161000) libxcb.so.1 => /lib64/libxcb.so.1 (0x00007f95e1f39000) libXext.so.6 => /lib64/libXext.so.6 (0x00007f95e1d27000) libX11.so.6 => /lib64/libX11.so.6 (0x00007f95e19e9000) libEGL.so.1 => /lib64/libEGL.so.1 (0x00007f95e17d5000) libwayland-egl.so.1 => /lib64/libwayland-egl.so.1 (0x00007f95e15d3000) libwayland-cursor.so.0 => /lib64/libwayland-cursor.so.0 (0x00007f95e13cb000) libwayland-client.so.0 => /lib64/libwayland-client.so.0 (0x00007f95e11bc000) libxkbcommon.so.0 => /lib64/libxkbcommon.so.0 (0x00007f95e0f7c000) libdl.so.2 => /lib64/libdl.so.2 (0x00007f95e0d78000) libGL.so.1 => /lib64/libGL.so.1 (0x00007f95e0aec000) libpthread.so.0 => /lib64/libpthread.so.0 (0x00007f95e08d0000) libstdc++.so.6 => /opt/gcc-9.1.0/lib64/libstdc++.so.6 (0x00007f95e04f7000) libm.so.6 => /lib64/libm.so.6 (0x00007f95e01f5000) libgcc_s.so.1 => /opt/gcc-9.1.0/lib64/libgcc_s.so.1 (0x00007f95dffdd000) libc.so.6 => /lib64/libc.so.6 (0x00007f95dfc0f000) /lib64/ld-linux-x86-64.so.2 (0x00007f95e2574000) libXau.so.6 => /lib64/libXau.so.6 (0x00007f95dfa0b000) libGLdispatch.so.0 => /lib64/libGLdispatch.so.0 (0x00007f95df755000) libffi.so.6 => /lib64/libffi.so.6 (0x00007f95df54d000) librt.so.1 => /lib64/librt.so.1 (0x00007f95df345000) libGLX.so.0 => /lib64/libGLX.so.0 (0x00007f95df113000)ldd /lib64/libxcb.so.1:linux-vdso.so.1 => (0x00007ffd8aff7000) libXau.so.6 => /lib64/libXau.so.6 (0x00007f1c9979f000) libc.so.6 => /lib64/libc.so.6 (0x00007f1c993d1000) /lib64/ld-linux-x86-64.so.2 (0x00007f1c99bcb000)References: