Public
Authored by Lamarque Souza

Xcb plugin not loading problem in CentOS 7

Qt 5.7.1 recompiled using devtoolset-3-gcc-c++-4.9.2-6.el7.x86_64 in debug mode does not load libqxcb.so plugin. By what I could find the "loader" variable declared in gui/kernel/qplatformintegrationfactory.cpp is not being correctly created. Instead of loading the plugins in /platforms folder, the recompiled libQt5Core.so tries to load the plugins in /accessible folder, which by the way, does not exist in Qt 5 (it used to exist in Qt 4). Qt 4 is installed in CentOS 7 since only Plasma 4 is available there. Changing the variable name from "loader" to "loaderPlatforms" (or any other different name) solved the problem, but I am still not sure why Q_GLOBAL_STATIC_WITH_ARGS does not use the parameters (QPlatformIntegrationFactoryInterface_iid, QLatin1String("/platforms"), Qt::CaseInsensitive) and use (QAccessibleFactoryInterface_iid, QLatin1String("/accessible"), Qt::CaseInsensitive) instead. My guess is that somehow the "loader" variable is being overwritten by a QFactoryLoader which uses the "accessible" plugin parameters.

The error message is:

$ export LD_LIBRARY_DIR=/home/lamarque/.conan/data/Qt5/5.7.1/petrosoft/lamarque/package/610c29d3cd979377e1c44a29bac5e0195402a4c8/lib

$ export QT_DEBUG_PLUGINS=1

$ ./QScintillaTest

QFactoryLoader::QFactoryLoader() checking directory path "/usr/lib64/kde4/plugins/accessible" ...

QFactoryLoader::QFactoryLoader() checking directory path "/usr/lib/kde4/plugins/accessible" ...

QFactoryLoader::QFactoryLoader() checking directory path "/home/lamarque/.conan/data/Qt5/5.7.1/petrosoft/lamarque/package/610c29d3cd979377e1c44a29bac5e0195402a4c8/plugins/accessible" ... QFactoryLoader::QFactoryLoader() checking directory path "/home/lamarque/teste/accessible" ... This application failed to start because it could not find or load the Qt platform plugin "xcb" in "".

2.05 KB
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment