Yocto build qt.qpa.xcb: could not connect to display qt.qpa.plugin: Could not load the Qt platform plugin "xcb" in "" even though it was found.
-
Hello, I built the freescale yocto build using distro fslc-xwayland and building the fsl-image-multimedia-full image. My target machine is an imx8mqevk. I am trying to deploy my Qt application made on an ubuntu desktop to the imx8. When deplying through ssh I get: qt.qpa.xcb: could not connect to display
qt.qpa.plugin: Could not load the Qt platform plugin "xcb" in "" even though it was found.I believe I have all the necessary libraries now on the imx8 to run the program except for this error.
Does anyone know what I would need to add to my build or local.conf file in order to remove this error?
-
@rtvideo
Set environment variableQT_DEBUG_PLUGINS=1
(in target environment), run your app, look at the (end of) diagnostic output. And runldd
on target machine.If an not expert, but "could not connect to display" in the past has indicated a missing X
DISPLAY
environment variable, is that relevant to "Yocto" andssh
? -
@JonB When running after doing the debugging, I get pretty much the same message.
"qt.qpa.xcb: could not connect to display
qt.qpa.plugin: Could not load the Qt platform plugin "xcb" in "" even though it was found.
This application failed to start because no Qt platform plugin could be initialized. Reinstalling the application may fix this problem.
Available platform plugins are: minimal, offscreen, vnc, xcb."I am afraid this has to do with the IMX8 not supporting X11. Do you think that would be why I am getting this?
-
@rtvideo
Although it may not help and I may be incorrect, I think we expect more than this once you set the debugging environment variable correctly. How exactly did you do that?If you Google for
Yocto qt.qpa.xcb could not connect to display
, with & without theYocto
, you will have plenty to look through.It may well be that you need X11, I don't know enough to know. Sometimes @Pablo-J-Rogina, if he sees this, seems to tell people that? :)
-
Hi,
Well, if your target sysroot does not provide X11, then the xcb backend won't work. Either add X11 to your target or select a more appropriate backend like EGLFS, LinuxFB, wayland, etc.