Some Qt5 application may produce a "could not find or load the Qt platform plugin “xcb”" error on start. This issue came up (not on my machine) by running teamspeak installed through this ebuild: https://504604.bugs.gentoo.org/attachment.cgi?id=384928 currently QT_PLUGIN_PATH is only provided by kde-frameworks/kf-env-2 from the kde overlay, so teamspeak starts on a machine with Kf5 installed, but not without it. Reproducible: Always Steps to Reproduce: 1. unmask needed qt5 ebuilds needed by the mentioned ebuild 2. install media-sound/teamspeak-client-bin-3.0.16 3. try to start it Actual Results: application fails to start with a "could not find or load the Qt platform plugin “xcb”" error Expected Results: application does start.
An env.d file shouldn't be needed at all, so something else must be wrong. Did you alter your qt.conf? What are the contents of the env.d file installed by kde? What's the output of `strings /usr/lib64/libQt5Core.so | grep plugpath` ? (In reply to Karol Herbst from comment #0) > Some Qt5 application may produce a "could not find or load the Qt platform > plugin “xcb”" error on start. Only "some" applications? "may"? Do you mean that not all apps fail, and for those that fail the problem is not reproducible every time?
(In reply to Davide Pesavento from comment #1) > An env.d file shouldn't be needed at all, so something else must be wrong. > > Did you alter your qt.conf? > oh I forgot that. Now with removing the qt.conf file it does indeed work. > What are the contents of the env.d file installed by kde? > PATH=/usr/lib64/qt5/bin ROOTPATH=/usr/lib64/qt5/bin CONFIG_PROTECT=/usr/share/config COLON_SEPARATED=QT_PLUGIN_PATH QT_PLUGIN_PATH=/usr/lib64/plugins:/usr/lib64/qt5/plugins:/usr/lib64/kde4/plugins QML2_IMPORT_PATH=/usr/lib64/qml:/usr/lib64/qt5/qml > What's the output of `strings /usr/lib64/libQt5Core.so | grep plugpath` ? > > > (In reply to Karol Herbst from comment #0) > > Some Qt5 application may produce a "could not find or load the Qt platform > > plugin “xcb”" error on start. > > Only "some" applications? "may"? Do you mean that not all apps fail, and for > those that fail the problem is not reproducible every time? I wasn't testing more applications, I just assume it could hit others. It seems like it was a packaging issue on my side.
(In reply to Karol Herbst from comment #2) > (In reply to Davide Pesavento from comment #1) > > What are the contents of the env.d file installed by kde? > > > [...] > QT_PLUGIN_PATH=/usr/lib64/plugins:/usr/lib64/qt5/plugins:/usr/lib64/kde4/ > plugins > QML2_IMPORT_PATH=/usr/lib64/qml:/usr/lib64/qt5/qml > @kde, /usr/lib64/qt5/plugins and /usr/lib64/qt5/qml are redundant because both paths are always included by default. Also, I'm not sure if the "kde4" above is intentional or a typo...
kde4 is leaking from the environment: echo "QT_PLUGIN_PATH=${libdir}/plugins:${libdir}/qt5/plugins:${QT_PLUGIN_PATH}" >> ${envfile}
(In reply to Michael Palimaka (kensington) from comment #4) > kde4 is leaking from the environment: echo > "QT_PLUGIN_PATH=${libdir}/plugins:${libdir}/qt5/plugins:${QT_PLUGIN_PATH}" > >> ${envfile} this should be "....${QT_PLUGIN_PATH:+:}${QT_PLUGIN_PATH}" in any case. Are you going to remove the redundant paths? or is there a reason for them to be there?
(In reply to Davide Pesavento from comment #5) > (In reply to Michael Palimaka (kensington) from comment #4) > > kde4 is leaking from the environment: echo > > "QT_PLUGIN_PATH=${libdir}/plugins:${libdir}/qt5/plugins:${QT_PLUGIN_PATH}" > > >> ${envfile} > > this should be "....${QT_PLUGIN_PATH:+:}${QT_PLUGIN_PATH}" in any case. > > Are you going to remove the redundant paths? or is there a reason for them > to be there? I filed bug #523314 to track this (and other) improvements to the env file