Solved Qt 5.7 on Pi3 cross compiled on Ubuntu - let's build a how-to that really works
-
Hi and thanks for the post!
I am trying to compile Qt and faced an issue even on the stage of ./configure
My first question - do we need to have Raspberry Pi connected to PC when we execute ./configure ?
I do have Rasp Pi3 but I am trying to configure without it connected.I have ""Symbolic function binding on this architecture may be broken, disabling it (see QTBUG-36129)."" message then. Assuming that something wrong with slinking.
-
@Yurii-Chernyshov During ./configure you need the tool chain and the root file system of your Pi mounted at the sysroot-path given in the command line of configure. Usually you mount a clone of the Pi SD-card on your host. But I guess copying the relevant library and include folders (like /usr, /lib, /opt) from Pi to host should work too. See my comment on rsync above.
Regarding your error: I get something similar when I try to use the x64 flavour oft he toolchain. Using gcc-linaro-arm-linux-gnueabihf-raspbian instead of gcc-linaro-arm-linux-gnueabihf-raspbian-x64 should help. -
@stryga42 Thanks.
I ran configuration with Rasp Pi connected and slinked and it completed. There was some errors while configuration but it completed well.
Now, during "make" I am facing:
qxcbscreen.h:49:26: fatal error: xcb/xinerama.h: No such file or directory
#include <xcb/xinerama.h> -
I finally made it!
There was missing library on the Raspberry Pi side:
libxcb-xinerama0-devNow, I have Qt able to build and deploy from PC Ubuntu 16 into Raspberry Pi 3
-
Also,
In final step, when I tried to deploy application into RaspPi board I faced the issue:
https://github.com/hallamlab/metapathways2/issues/55
Solution provided in the link was enough to solve it. -
Hi,
I get it work with these two tutorials:
https://www.ics.com/blog/configuring-qt-creator-raspberry-pi
https://wiki.qt.io/RaspberryPi2EGLFSPlease keep in mind if you are using a 64 bit Ubuntu to edit the ./configure command. Refer to step 7 of the second tutorial.
Hope this helps. -
I have the same problem. The configuration went flawless with this configure:
./configure -release -opengl es2 -device linux-rasp-pi2-g++ -device-option CROSS_COMPILE=~/raspi/tools/arm-bcm2708/gcc-linaro-arm-linux-gnueabihf-raspbian/bin/arm-linux-gnueabihf- -sysroot ~/raspi/sysroot -opensource -confirm-license -make libs -prefix /usr/local/qt5pi -extprefix ~/raspi/qt5pi -hostprefix ~/raspi/qt5 -qt-xcb -qreal float -v
But when I run make it says after 15 minutes:
recipe for target '../../lib/libQt5Gui.so.5.6.2' failed
I followed the same tutorials as you did. I don't understand why I have an older version than you, maybe that could be my problem. I think my lib is in the right place..
I'll keep you updated if I found the solution. ;) -
Hi there,
If you still face issues to cross-compile Qt on Raspberry Pi, we created the qtrpi project to automate the full process with bash scripts.
Qtrpi can be used in 2 ways:
- qtrpi-full, in which everything is built automatically on your host machine (sysroot, Qt)
- qtrpi-minimal, in which you download a ready-to-use sysroot with pre-compiled Qt binaries
Everything is open-source, you can find more information at the following URLs:
- the official website http://www.qtrpi.com/
- the repository containing all the scripts: https://github.com/neuronalmotion/qtrpi
- The guide to use qtrpi: http://www.qtrpi.com/faq#howtoinstall
-
@synapticvoid This was the solution for me
-
@synapticvoid Great resource, many thanks!