Raspberry Pi toolchain on Ubuntu 16.04
-
wrote on 22 Apr 2019, 13:42 last edited by pkeshavarzi
Hello all,
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,
P. Keshavarzi -
Hello all,
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,
P. Keshavarziwrote on 22 Apr 2019, 15:33 last edited by@pkeshavarzi said in Raspberry Pi toolchain on Ubuntu 16.04:
CROSS_COMPILE=~/opt/gcc-4.7-linaro-rpi-gnueabihf/bin/arm-linux-gnueabihf-
This value must point to where you have downloaded/unpacked the cross-compiling toolchain. From the guide you referenced:
Download the cross compiling toolchain:
wget https://www.dropbox.com/s/sl919ly0q79m1e6/gcc-4.7-linaro-rpi-gnueabihf.tbz
(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.tbzPlease use the location where you unpacked the toolchain tarball
-
@pkeshavarzi said in Raspberry Pi toolchain on Ubuntu 16.04:
CROSS_COMPILE=~/opt/gcc-4.7-linaro-rpi-gnueabihf/bin/arm-linux-gnueabihf-
This value must point to where you have downloaded/unpacked the cross-compiling toolchain. From the guide you referenced:
Download the cross compiling toolchain:
wget https://www.dropbox.com/s/sl919ly0q79m1e6/gcc-4.7-linaro-rpi-gnueabihf.tbz
(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.tbzPlease use the location where you unpacked the toolchain tarball
wrote on 22 Apr 2019, 18:02 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?
Best,
P. Keshavarzi -
@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?
Best,
P. Keshavarzi@pkeshavarzi What happens if you call
/home/ubuntu16/opt/gcc-4.7-linaro-rpi-gnueabihf/bin/arm-linux-gnueabihf-g++ -v
?
-
@pkeshavarzi What happens if you call
/home/ubuntu16/opt/gcc-4.7-linaro-rpi-gnueabihf/bin/arm-linux-gnueabihf-g++ -v
?
wrote on 23 Apr 2019, 14:01 last edited by pkeshavarzi@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?
-
@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?
wrote on 23 Apr 2019, 14:04 last edited by@pkeshavarzi from command line, could you please do:
ls -la /home/opt/gcc-4.7-linaro-rpi-gnueabihf/bin/arm-linux-gnueabihf-g++
-
@pkeshavarzi from command line, could you please do:
ls -la /home/opt/gcc-4.7-linaro-rpi-gnueabihf/bin/arm-linux-gnueabihf-g++
wrote on 23 Apr 2019, 14:18 last edited by pkeshavarzi@Pablo-J.-Rogina said in Raspberry Pi toolchain on Ubuntu 16.04:
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
-
@Pablo-J.-Rogina said in Raspberry Pi toolchain on Ubuntu 16.04:
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
wrote on 23 Apr 2019, 14:23 last edited by@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++
1/8