xcb issue again
-
I see that has been asked many times, but the other answers did not solve my case.
I compiled Qt5 on CentOS 8.2.
Installed into /usr/local/Qt-5.15.2When running /usr/local/Qt-5.15.2/bin/designer I get the infamous:
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: eglfs, linuxfb, minimal, minimalegl, offscreen, vnc, webgl.
Note that xcb is not one of the available platform plugins.
Running with QT_DEBUG_PLUGINS=1, the message is:
QFactoryLoader::QFactoryLoader() checking directory path "/usr/local/Qt-5.15.2/plugins/platforms" ... QFactoryLoader::QFactoryLoader() looking at "/usr/local/Qt-5.15.2/plugins/platforms/libqeglfs.so" Found metadata in lib /usr/local/Qt-5.15.2/plugins/platforms/libqeglfs.so, metadata= { "IID": "org.qt-project.Qt.QPA.QPlatformIntegrationFactoryInterface.5.3", "MetaData": { "Keys": [ "eglfs" ] }, "archreq": 0, "className": "QEglFSIntegrationPlugin", "debug": false, "version": 331520 } Got keys from plugin meta data ("eglfs") QFactoryLoader::QFactoryLoader() looking at "/usr/local/Qt-5.15.2/plugins/platforms/libqlinuxfb.so" Found metadata in lib /usr/local/Qt-5.15.2/plugins/platforms/libqlinuxfb.so, metadata= { "IID": "org.qt-project.Qt.QPA.QPlatformIntegrationFactoryInterface.5.3", "MetaData": { "Keys": [ "linuxfb" ] }, "archreq": 0, "className": "QLinuxFbIntegrationPlugin", "debug": false, "version": 331520 } Got keys from plugin meta data ("linuxfb") QFactoryLoader::QFactoryLoader() looking at "/usr/local/Qt-5.15.2/plugins/platforms/libqminimal.so" Found metadata in lib /usr/local/Qt-5.15.2/plugins/platforms/libqminimal.so, metadata= { "IID": "org.qt-project.Qt.QPA.QPlatformIntegrationFactoryInterface.5.3", "MetaData": { "Keys": [ "minimal" ] }, "archreq": 0, "className": "QMinimalIntegrationPlugin", "debug": false, "version": 331520 } Got keys from plugin meta data ("minimal") QFactoryLoader::QFactoryLoader() looking at "/usr/local/Qt-5.15.2/plugins/platforms/libqminimalegl.so" Found metadata in lib /usr/local/Qt-5.15.2/plugins/platforms/libqminimalegl.so, metadata= { "IID": "org.qt-project.Qt.QPA.QPlatformIntegrationFactoryInterface.5.3", "MetaData": { "Keys": [ "minimalegl" ] }, "archreq": 0, "className": "QMinimalEglIntegrationPlugin", "debug": false, "version": 331520 } Got keys from plugin meta data ("minimalegl") QFactoryLoader::QFactoryLoader() looking at "/usr/local/Qt-5.15.2/plugins/platforms/libqoffscreen.so" Found metadata in lib /usr/local/Qt-5.15.2/plugins/platforms/libqoffscreen.so, metadata= { "IID": "org.qt-project.Qt.QPA.QPlatformIntegrationFactoryInterface.5.3", "MetaData": { "Keys": [ "offscreen" ] }, "archreq": 0, "className": "QOffscreenIntegrationPlugin", "debug": false, "version": 331520 } Got keys from plugin meta data ("offscreen") QFactoryLoader::QFactoryLoader() looking at "/usr/local/Qt-5.15.2/plugins/platforms/libqvnc.so" Found metadata in lib /usr/local/Qt-5.15.2/plugins/platforms/libqvnc.so, metadata= { "IID": "org.qt-project.Qt.QPA.QPlatformIntegrationFactoryInterface.5.3", "MetaData": { "Keys": [ "vnc" ] }, "archreq": 0, "className": "QVncIntegrationPlugin", "debug": false, "version": 331520 } Got keys from plugin meta data ("vnc") QFactoryLoader::QFactoryLoader() looking at "/usr/local/Qt-5.15.2/plugins/platforms/libqwebgl.so" Found metadata in lib /usr/local/Qt-5.15.2/plugins/platforms/libqwebgl.so, metadata= { "IID": "org.qt-project.Qt.QPA.QPlatformIntegrationFactoryInterface.5.3", "MetaData": { "Keys": [ "webgl" ] }, "archreq": 0, "className": "QWebGLIntegrationPlugin", "debug": false, "version": 331520 } Got keys from plugin meta data ("webgl") QFactoryLoader::QFactoryLoader() checking directory path "/usr/local/Qt-5.15.2/bin/platforms" ... 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: eglfs, linuxfb, minimal, minimalegl, offscreen, vnc, webgl. Aborted (core dumped)
Any help would be appreciated.
-
It turns out that on CentOS 8 I had to do the following:
yum install xcb-util-renderutil-devel
And then:
cd qt-everywhere-src-5.15.2 rm config.cache ./configure -prefix $PWD/qtbase -opensource -nomake examples -nomake tests -xcb
This solved the problem in my case
-
As you can see there is no xcb plugin available so it can't be loaded. Make sure to compile qt with xcb support.
-
Thanks for the quick reply.
To make sure that xcb is supported, I ran configure with -xcb as follows:
cd qt-everywhere-src-5.15.2 ./configure -prefix $PWD/qtbase -opensource -xcb
And I get the following:
ERROR: Feature 'xcb' was enabled, but the pre-condition 'features.thread && libs.xcb && tests.xcb_syslibs && features.xkbcommon-x11' failed. Check config.log for details.
I looked inside config.log and I found the following:
loaded result for library config.qtbase_gui.libraries.xcb Trying source 0 (type pkgConfig) of library xcb ... + /usr/bin/pkg-config --exists --silence-errors xcb '>=' 1.11 + /usr/bin/pkg-config --modversion xcb '>=' 1.11 > 1.13.1 + /usr/bin/pkg-config --libs-only-L xcb '>=' 1.11 + /usr/bin/pkg-config --libs-only-l xcb '>=' 1.11 > -lxcb + /usr/bin/pkg-config --cflags xcb '>=' 1.11 + cd <dir>/qt-everywhere-src-5.15.2/config.tests/xcb && <dir>/qt-everywhere-src-5.15.2/qtbase/bin/qmake "CONFIG -= qt debug_and_release app_bundle lib_bundle" "CONFIG += shared warn_off console single_arch" 'QMAKE_USE += xcb' 'QMAKE_LIBS_XCB = -lxcb' <dir>/qt-everywhere-src-5.15.2/config.tests/xcb + cd <dir>/qt-everywhere-src-5.15.2/config.tests/xcb && MAKEFLAGS= /usr/bin/gmake > g++ -c -pipe -O2 -w -fPIC -I. -I<dir>/qt-everywhere-src-5.15.2/qtbase/mkspecs/linux-g++ -o main.o main.cpp > g++ -Wl,-O1 -o xcb main.o -lxcb => source accepted. test config.qtbase_gui.libraries.xcb succeeded loaded result for library config.qtbase_gui.libraries.xcb_icccm Trying source 0 (type pkgConfig) of library xcb_icccm ... + /usr/bin/pkg-config --exists --silence-errors xcb-icccm '>=' 0.3.9 pkg-config did not find package. => source produced no result. Trying source 1 (type inline) of library xcb_icccm ... xcb/xcb_icccm.h not found in [] and global paths. => source produced no result. test config.qtbase_gui.libraries.xcb_icccm FAILED
So it looks like xcb exists, but xcb_icccm does not.
Is xcb_icccm required? I didn't find a way to install it. -
Hi,
You need to install the development package corresponding to that library.
For current Debian it's libxcb-icccm4-dev.
-
It turns out that on CentOS 8 I had to do the following:
yum install xcb-util-renderutil-devel
And then:
cd qt-everywhere-src-5.15.2 rm config.cache ./configure -prefix $PWD/qtbase -opensource -nomake examples -nomake tests -xcb
This solved the problem in my case
-
@na_inf said in xcb issue again:
This solved the problem in my case
great, so please don't forget to mark your post as solved!
-
For completeness, this is the list of all the xcb related packages that I have installed:
]# sudo yum list --installed | grep xcb libX11-xcb.x86_64 1.6.8-3.el8 @AppStream libxcb.x86_64 1.13.1-1.el8 @AppStream libxcb-devel.x86_64 1.13.1-1.el8 @AppStream xcb-util.x86_64 0.4.0-10.el8 @AppStream xcb-util-cursor.x86_64 0.1.3-9.el8 @epel xcb-util-devel.x86_64 0.4.0-10.el8 @PowerTools xcb-util-image.x86_64 0.4.0-9.el8 @AppStream xcb-util-image-devel.x86_64 0.4.0-9.el8 @PowerTools xcb-util-keysyms.x86_64 0.4.0-7.el8 @AppStream xcb-util-keysyms-devel.x86_64 0.4.0-7.el8 @PowerTools xcb-util-renderutil.x86_64 0.3.9-10.el8 @AppStream xcb-util-renderutil-devel.x86_64 0.3.9-10.el8 @PowerTools xcb-util-wm.x86_64 0.4.1-12.el8 @AppStream xcb-util-wm-devel.x86_64 0.4.1-12.el8 @PowerTools
I'm not sure that all of them are required - YMMV.
-
@Mcgiwer said in xcb issue again:
Even if it's an old topic, I wanted to add an alternative, (mostly ) working solution (typed in the console):
sudo xhost +si:localuser:$USER
In most cases it should make that you would be able to run the applications
Hi and welcome to devnet,
In this case, no. You are just modifying the access permissions to the X server. Here it's clearly a dependency issue.
-
for fix problem you should check this package installed