rrd
rrd

Reputation: 185

Why Qt plaftorm plugin "xcb" cannot be loaded even though it was found?

I cross-compiled Qt5.12 in my laptop and installed it on a Raspberry Pi 3 that runs Raspbian Stretch OS. I'm trying to remote debug (from QtCreator) applications running on RPi.

When I run my Qt apps from RPi terminal with a command like ./app -platform xcb it works fine, but when I try to run the same app from a remote debug session I get the following output:

Could not load shared library symbols for /usr/local/qt5pi/plugins/platforms/libqxcb.so.
Do you need "set solib-search-path" or "set sysroot"?qt.qpa.xcb: could not connect to display 
qt.qpa.xcb: could not connect to display 
qt.qpa.plugin: Could not load the Qt platform plugin "xcb" in "/usr/local/qt5pi/plugins/platforms" 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: 
eglfs (from /usr/local/qt5pi/plugins/platforms), 
linuxfb (from /usr/local/qt5pi/plugins/platforms), 
minimal (from /usr/local/qt5pi/plugins/platforms), 
minimalegl (from /usr/local/qt5pi/plugins/platforms), 
offscreen (from /usr/local/qt5pi/plugins/platforms), 
vnc (from /usr/local/qt5pi/plugins/platforms), 
webgl (from /usr/local/qt5pi/plugins/platforms), 
xcb (from /usr/local/qt5pi/plugins/platforms), 
eglfs, linuxfb, minimal, minimalegl, offscreen, vnc, webgl, xcb.

Has anyone ever experienced this? What could I try to fix that?

Upvotes: 4

Views: 1195

Answers (1)

Zan Lynx
Zan Lynx

Reputation: 54325

It fails to load because it cannot connect to the display. If this is remote as you said are you using SSH with X forwarding? You would need something like that.

Or alternatively you want the display on the RPi then the problem is the missing environment variables. Look in a regular shell session with printenv. Copy DISPLAY, XAUTHORITY and anything else that looks likely into your remote debug session.

Upvotes: 1

Related Questions