Errors building QGC with docker

Hi everyone,

I’m very new to QGC and docker. I’m on MacOS 10.15 Catalina and I have a fresh Ubuntu 20.04 running on Parallels virtual machine.

It seems easier to compile QGC on Ubuntu 20.04 using docker container, so I chose this route. I’m able to build the container and then build QGC successfully (with sudo) following QGC build documentation.

I tried to run it with ./build/staging/ and I get libSDL2 no such file or directory

./build/staging/QGroundControl: error while loading shared libraries: cannot open shared object file: No such file or directory

Any idea?

So, I installed sudo aptitude install libsdl2-2.0-0 (aptitude is like apt-get, a bit smarter I find)

Now, I get another error

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: eglfs, linuxfb, minimal, minimalegl, offscreen, vnc, wayland-egl, wayland, wayland-xcomposite-egl, wayland-xcomposite-glx, xcb.

Aborted (core dumped)
1 Like

So here is the solution from this post
export QT_DEBUG_PLUGINS=1 to see what’s happening

Then running QGC the terminal gave me many info, and the relevant was

Got keys from plugin meta data ("xcb")
QFactoryLoader::QFactoryLoader() checking directory path "/home/romain/qgroundcontrol/build/staging/platforms" ...
Cannot load library /home/romain/qgroundcontrol/build/staging/Qt/plugins/platforms/ ( cannot open shared object file: No such file or directory)
QLibraryPrivate::loadPlugin failed on "/home/romain/qgroundcontrol/build/staging/Qt/plugins/platforms/" : "Cannot load library /home/romain/qgroundcontrol/build/staging/Qt/plugins/platforms/ ( cannot open shared object file: No such file or directory)"

So I installed sudo aptitude install libxcb-xinerama0 and then rerun and it worked!