How to cross-compile QGroundControl for Raspberry Pi3

Thank you @kpetrykin and @kikislater

I got the Version 3.5.4 from the QGC and i worked with QT 5.11.3

Thank you very much!

Does the newest version of QGC (3.5.6) work with QT above 5.11.3?

You need qt 5.12 lts (long term support). It doesn’t land in raspbian at this time but could be fine in github but I don’t know if qt location private is embeded or not.

Running another distribution should be better … Rasbian is too conservative on package. Or running hypriot os which allow to run docker on rpi …

QGC 3.5.6 build is ok as well with Qt 5.11.3
Pretty slow on RPi 3 B+ …

1 Like

Started building Qt 5.12 LTS 2 hours ago on my RPi4 4GB) and it still goes on…

When it finishes I’ll try to test if QGC (Master Branch or v.4.0) can get compiled on it.

I’ll report back with my findings…

Edit 1: just a bit less than 3 hours now and it is still running (on building Qt 5.12 LTS), hence I decided to max overclock another RPi4 4GB that I have (over_voltage=6, arm_freq=2147 and gpu_freq=750) and run the same as above to see if it makes a difference…

Edit 2: It took 3h:16m for the build of Qt 5.12 LTS to finish on my 1st RPi4 (the non overclocked one)… Way better that the 8 hours on the RPi3 mentioned on the official site of Qt…!!! (see link above)

Edit 3: It took 2h:56m to build it on the overclocked RPi4… Not much of a difference…

More info on the progress, tomorrow…

1 Like

I build and run V4.0.6 with cmake successfully on RPI4 + 7inch screen with QT5.11.3. Thanks

1 Like

@kclin hello! Do you have tips to compile V4 qith QT5.11 ? Because I have those error :

$ qmake -r ../qgroundcontrol.pro CONFIG+=release
Project MESSAGE: Qt version 5.11.3
Project MESSAGE: Linux R-Pi2 build
Project MESSAGE: QGroundControl Development Stable_V4.0:333df24f4 2020-06-11 13:09:17 -0700
Project MESSAGE: Release flavor
Project MESSAGE: Using Default QtLocation headers
Project MESSAGE: Skipping support for Pairing
Project MESSAGE: Using MAVLink dialect 'ardupilotmega'.
Project MESSAGE: Skipping support for Zeroconf (unsupported platform)
Project MESSAGE: Looking for Airmap in folder "/home/pi/src/qgroundcontrol/libs/airmapd", variant: "Qt.5.11"
Project MESSAGE: Taisync disabled
Project MESSAGE: Microhard disabled
Project MESSAGE: Including support for video streaming
Project MESSAGE: This project is using private headers and will therefore be tied to this specific Qt module build version.
Project MESSAGE: Running this project against other versions of the Qt modules may crash at any arbitrary point.
Project MESSAGE: This is not a bug, but a result of using Qt internals. You have been warned!
Project ERROR: Library 'wayland-client' is not defined.

Regards

I tried this and am receiving the ERROR Wayland-client not found… you do anything different than the instructions above?

I have the same error output…wonder if any who succeeded to build 4.0.7 on qt 5.11.3 tweaked anything above or if they built before the wayland-client error started popping up?

you need to remove waylandclient from line 15 of the following file:
qgroundcontrol/src/VideoStreaming/VideoStreaming.pri
Along with following the instructions above I was able to build with both 4.0.7 and 3.5.5. 3.5.5 was my first success and after watching the make fail I searched apt for a few libraries and was able to get 4.0.7 to make/install

any update on this project

Gstreamer qt/qmlgl interface is not working in my build. Has anyone had the same issue?

GstreamerLog: (NULL) trying to link queue0:src and decoder:sink
GstreamerLog: <tee0:sink> pad has no peer
GstreamerLog: (NULL) queue0 and decoder in same bin, no need for ghost pads
GstreamerLog: (NULL) trying to link queue0:src and decoder:sink
GstreamerLog: <tee0:sink> pad has no peer
GstreamerLog: (NULL) linked queue0:src and decoder:sink, successful
GstreamerLog: (NULL) creating reconfigure event
GstreamerLog: <queue0:src> Received event on flushing pad. Discarding
GstreamerLog: <qgcvideosinkbin0> current NULL pending VOID_PENDING, desired nex$
GstreamerLog: <qtsink1> current NULL pending VOID_PENDING, desired next READY
GstreamerLog: (NULL) 0x3aaea10 failed to retrieve wrapped context (NULL)
GstreamerLog: <qtsink1> error: Could not initialize window system
GstreamerLog: <qtsink1> posting message: Could not initialize window system
GstreamerLog: (NULL) No value transform to serialize field 'gerror' of type 'GE$
GstreamerLog: (NULL) No value transform to serialize field 'gerror' of type 'GE$
GstreamerLog: (NULL) No value transform to serialize field 'gerror' of type 'GE$
VideoReceiverLog: Could not initialize window system
GstreamerLog: <qgcvideosinkbin0> current NULL pending READY, desired next NULL
GstreamerLog: <qtsink1> current NULL pending READY, desired next NULL

Where do you see this output? Its a first time I am building qt project, but I compiled QGC on RPi4 and only thing that does not work is video stream. So it might be the same issue.

Its in the console output of the application after activating gstreamer log. I cross-compiled QGC and could not get it running. Native compiling worked after hours of trying. I can only tell you that the error comes from different gl contexts of gstreamer and qt, but its hard to match it correctly because of the deb packages of qt and gst for pi are weird in this case.

Yes, I found it. It looked to me like it needs newer version of gstreamer packages. So I went easier way and just took Ubuntu image and after resolving few errors I managed to compile and have QGC with working video streaming.

Hey @SimonI ,

I am getting the same ‘waylandclient’ error.

Can you explain what are the steps modification required in @kpetrykin guide to make version QGC 3.5.4 with QT 5.11.3?

Thanks

does this work with the latest version of qgroundcontrol?

Hi, was just wondering. Would this same procedure work on the NVidia Jetson Xavier NX module? Because that works with arm architecture as well and that is a big requirement at the moment.

qgc on rpi 4

Hi Alex, Very Exciting to read this. This is gold and gives me hope. :slightly_smiling_face:
I wonder if this also works with a Rpi4B (8G), Rasbian Bullseye, and Qt 6.6.2? The archived SW versions in your post are quite outdated today.