Important: Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct
Raspberry Pi toolchain on Ubuntu 16.04
I have issues creating a tool-chain for cross compiling Raspberry Pi 3 Qt applications through Ubuntu. I used directions from this guide, https://wiki.qt.io/Raspberry_Pi_Beginners_Guide, to help me create the tool-chain. Currently, I am stuck on this step in the section Compiling qtbase in the guide:
./configure -opengl es2 -device linux-rasp-pi-g++ -device-option CROSS_COMPILE=~/opt/gcc-4.7-linaro-rpi-gnueabihf/bin/arm-linux-gnueabihf- -sysroot /mnt/rasp-pi-rootfs -opensource -confirm-license -optimized-qmake -reduce-exports -release -make libs -prefix /usr/local/qt5pi -hostprefix /usr/local/qt5pi
The error I receive is the following in terminal:
sudo ./configure -opengl es2 -device linux-rasp-pi-g++ -device-option CROSS_COMPILE=~/opt/gcc-4.7-linaro-rpi-gnueabihf/bin/arm-linux-gnueabihf- -sysroot /mnt/rasp-pi-rootfs -opensource -confirm-license -optimized-qmake -reduce-exports -release -make libs -prefix /usr/local/qt5pi -hostprefix /usr/local/qt5pi <srcbase> = /home/ubuntu16/opt/qt5/qtbase <bldbase> = /home/ubuntu16/opt/qt5/qtbase <outbase> = /home/ubuntu16/opt/qt5/qtbase Creating qmake... .Done. Project ERROR: Cannot run target compiler '/home/ubuntu16/opt/gcc-4.7-linaro-rpi-gnueabihf/bin/arm-linux-gnueabihf-g++'. Output: =================== =================== Maybe you forgot to setup the environment?
I am new Qt and have beginners understanding of Ubuntu. I am currently running Ubuntu 16.04 64-bit on within VirtualBox. How do I setup the environment? Should I have the Raspberry Pi 3 connected to my PC via SSH?
Thank you for any help. Best,
This value must point to where you have downloaded/unpacked the cross-compiling toolchain. From the guide you referenced:
Download the cross compiling toolchain:
(or at http://de.sourceforge.jp/projects/sfnet_rfidmonitor/downloads/crosscompilation-resources/gcc-4.7-linaro-rpi-gnueabihf.tbz)
tar -xf gcc-4.7-linaro-rpi-gnueabihf.tbz
Please use the location where you unpacked the toolchain tarball
pkeshavarzi last edited by
@Pablo-J.-Rogina Hey Pablo, Thanks for the reply. I double checked the unpacked tarball and it exists within in the folder. So do all the files that will be used. What else do you recommend to get past this?
@pkeshavarzi What happens if you call
@jsulm I just tried to run that in the terminal:
ubuntu16@ubuntu16-VirtualBox:~/opt/qt5/qtbase$ sudo /home/opt/gcc-4.7-linaro-rpi-gnueabihf/bin/arm-linux-gnueabihf-g++ -v bash: /home/opt/gcc-4.7-linaro-rpi-gnueabihf/bin/arm-linux-gnueabihf-g++: No such file or directory
The error says no file or directory. However, when I check the folder, it shows that it's there:
Does this mean there is a problem with the 'symbolic links' from the earlier step of the guide? Another possibility and kind of a stupid question: Even though I ran with super user permissions, maybe there is an issue with permissions for the folder and it's contents?
@pkeshavarzi from command line, could you please do:
ls -la /home/opt/gcc-4.7-linaro-rpi-gnueabihf/bin/arm-linux-gnueabihf-g++
I just ran the command and received the message from terminal 'No such file or directory':
ubuntu16@ubuntu16-VirtualBox:~$ ls -la /home/opt/gcc-4.7-linaro-rpi-gnueabihf/bin/arm-linux-gnueabihf-g++ ls: cannot access '/home/opt/gcc-4.7-linaro-rpi-gnueabihf/bin/arm-linux-gnueabihf-g++': No such file or directory
@pkeshavarzi it looks like you're messing up the folders, one example shows /home/ubuntu16/opt/... and then you also use /home/opt/...
Anyway, what if you do:
sudo find / -name arm-linux-gnueabihf-g++