RaspberryPi2EGLFS tutorial fail at Step 10 "./configure"
- 
I'm attempting to cross-compile on my MacBook (macOS Mojave 10.14.2) for a Raspberry Pi 3B with Raspbian Stretch Lite (actually, an OctoPi image of same). At Step 10 in the tutorial, there's a fairly cryptic command at the configurestep. Given that I've installed the host's raspi folder under a subfolder, I've modified the included code:./configure -release -opengl es2 -device linux-rasp-pi3-g++ -device-option CROSS_COMPILE=/Users/me/project/raspi/tools/arm-bcm2708/gcc-linaro-arm-linux-gnueabihf-raspbian-x64/bin/arm-linux-gnueabihf- -sysroot /Users/me/project/raspi/sysroot -opensource -confirm-license -make libs -prefix /usr/local/qt5pi -extprefix /Users/me/project/raspi/qt5pi -hostprefix /Users/me/project/raspi/qt5 -v -no-use-gold-linker- Per this section's recommendation, I appended "-no-use-gold-linker" since I'm targeting a version beyond 5.9.1.
- I'm targeting device linux-rasp-pi3-g++since I'm using a Raspberry Pi 3B
- At the git clonestep I pulledv5.10.1
- I've also tried the version for 32-bit (is that host-side or raspi-side, btw?) as seen here:
 -device-option CROSS_COMPILE=/Users/me/project/raspi/tools/arm-bcm2708/gcc-linaro-arm-linux-gnueabihf-raspbian/bin/arm-linux-gnueabihf-- I have done a git clean -dfxbetween attempts.
 The error regardless is: Project ERROR: Cannot run target compiler '/Users/me/project/raspi/tools/arm-bcm2708/gcc-linaro-arm-linux-gnueabihf-raspbian-x64/bin/arm-linux-gnueabihf-g++'. Output: =================== sh: /Users/me/project/raspi/tools/arm-bcm2708/gcc-linaro-arm-linux-gnueabihf-raspbian-x64/bin/arm-linux-gnueabihf-g++: cannot execute binary file =================== Maybe you forgot to setup the environment?I'm afraid this is going to be a show-stopper for me if I can't get past this step. @OutsourcedGuru could you please run the compiler by itself to see what's going on... /Users/me/project/raspi/tools/arm-bcm2708/gcc-linaro-arm-linux-gnueabihf-raspbian-x64/bin/arm-linux-gnueabihf-g++ --version
- 
@OutsourcedGuru could you please run the compiler by itself to see what's going on... /Users/me/project/raspi/tools/arm-bcm2708/gcc-linaro-arm-linux-gnueabihf-raspbian-x64/bin/arm-linux-gnueabihf-g++ --version@Pablo-J.-Rogina said in RaspberryPi2EGLFS tutorial fail at Step 10 "./configure": /Users/me/project/raspi/tools/arm-bcm2708/gcc-linaro-arm-linux-gnueabihf-raspbian-x64/bin/arm-linux-gnueabihf-g++ -bash: /Users/me/project/raspi/tools/arm-bcm2708/gcc-linaro-arm-linux-gnueabihf-raspbian-x64/bin/arm-linux-gnueabihf-g++: cannot execute binary fileAltering for 32-bit version yields the same result. /Users/me/project/raspi/tools/arm-bcm2708/gcc-linaro-arm-linux-gnueabihf-raspbian/bin/arm-linux-gnueabihf-g++ -bash: /Users/me/project/raspi/tools/arm-bcm2708/gcc-linaro-arm-linux-gnueabihf-raspbian/bin/arm-linux-gnueabihf-g++: cannot execute binary fileuname -a Darwin macbook-air.local 18.2.0 Darwin Kernel Version 18.2.0: Mon Nov 12 20:24:46 PST 2018; root:xnu-4903.231.4~2/RELEASE_X86_64 x86_64
- 
Hi, Did you install the toolchain for Linux ? Because from the looks of it, you are trying to run a Linux executable on your macOS machine which you can't. 
- 
Hi, Did you install the toolchain for Linux ? Because from the looks of it, you are trying to run a Linux executable on your macOS machine which you can't. 
- 
What do you get if you call file /Users/me/project/raspi/tools/arm-bcm2708/gcc-linaro-arm-linux-gnueabihf-raspbian/bin/arm-linux-gnueabihf-g++?
- 
@SGaist said in RaspberryPi2EGLFS tutorial fail at Step 10 "./configure": file /Users/me/project/raspi/tools/arm-bcm2708/gcc-linaro-arm-linux-gnueabihf-raspbian/bin/arm-linux-gnueabihf-g++ ELF 32-bit LSB executable, Intel 80386, version 1 (SYSV), dynamically linked, interpreter /lib/ld-linux.so.2, for GNU/Linux 2.6.15, stripped
- 
I am also stuck at the exact same step. I followed the Tutorial https://wiki.qt.io/RaspberryPi2EGLFS to be able to crosscompile for Raspbian Buster (on RPi3) using the Qt Creator on my local mac (10.13.6). @OutsourcedGuru @SGaist I also dis the steps in the above mentioned tutorial just like @OutsourcedGuru summarized it. So far everything seemed to go fine, but I am also stuck at step 10 of the tutorial. Also tried bother versions, the 32bit and 64bit. The output from the file command gives for the two binaries gives: for the 64bit version: ./tools/arm-bcm2708/gcc-linaro-arm-linux-gnueabihf-raspbian-x64/bin/arm-linux-gnueabihf-g++: ELF 64-bit LSB executable, x86-64, version 1 (SYSV), dynamically linked, interpreter /lib64/ld-linux-x86-64.so.2, for GNU/Linux 2.6.24, BuildID[sha1]=b2f00203f8231a1bf4923f20c03fac5cf1d0a239, strippedand for the 32big version: ./tools/arm-bcm2708/gcc-linaro-arm-linux-gnueabihf-raspbian/bin/arm-linux-gnueabihf-g++: ELF 32-bit LSB executable, Intel 80386, version 1 (SYSV), dynamically linked, interpreter /lib/ld-linux.so.2, for GNU/Linux 2.6.15, strippedAny advice on how to proceed would be much appreciated. I am not really sure what to make out of this "environment error", because it's the first time I try to setup Qt to cross-compile for an RPi. @OutsourcedGuru it is quite a while ago since your last post. Could you solve the problem somehow? 
- 
I am also stuck at the exact same step. I followed the Tutorial https://wiki.qt.io/RaspberryPi2EGLFS to be able to crosscompile for Raspbian Buster (on RPi3) using the Qt Creator on my local mac (10.13.6). @OutsourcedGuru @SGaist I also dis the steps in the above mentioned tutorial just like @OutsourcedGuru summarized it. So far everything seemed to go fine, but I am also stuck at step 10 of the tutorial. Also tried bother versions, the 32bit and 64bit. The output from the file command gives for the two binaries gives: for the 64bit version: ./tools/arm-bcm2708/gcc-linaro-arm-linux-gnueabihf-raspbian-x64/bin/arm-linux-gnueabihf-g++: ELF 64-bit LSB executable, x86-64, version 1 (SYSV), dynamically linked, interpreter /lib64/ld-linux-x86-64.so.2, for GNU/Linux 2.6.24, BuildID[sha1]=b2f00203f8231a1bf4923f20c03fac5cf1d0a239, strippedand for the 32big version: ./tools/arm-bcm2708/gcc-linaro-arm-linux-gnueabihf-raspbian/bin/arm-linux-gnueabihf-g++: ELF 32-bit LSB executable, Intel 80386, version 1 (SYSV), dynamically linked, interpreter /lib/ld-linux.so.2, for GNU/Linux 2.6.15, strippedAny advice on how to proceed would be much appreciated. I am not really sure what to make out of this "environment error", because it's the first time I try to setup Qt to cross-compile for an RPi. @OutsourcedGuru it is quite a while ago since your last post. Could you solve the problem somehow? @PatZim said in RaspberryPi2EGLFS tutorial fail at Step 10 "./configure": but I am also stuck at step 10 of the tutorial could you please show your exact error message? 
- 
Hello @Pablo-J-Rogina , thanks for the reply. That same as reported above by @OutsourcedGuru 
 When I run the ./configure command in step 10 of the tutorial./configure -release -opengl es2 -device linux-rasp-pi3-g++ -device-option CROSS_COMPILE=~/raspi/tools/arm-bcm2708/gcc-linaro-arm-linux-gnueabihf-raspbian-x64/bin/arm-linux-gnueabihf- -sysroot ~/raspi/sysroot -opensource -confirm-license -make libs -prefix /usr/local/qt5pi -extprefix ~/raspi/qt5pi -hostprefix ~/raspi/qt5 -v -no-use-gold-linkerI get the same environment error: Project ERROR: Cannot run target compiler '/Users/<username>/raspi/tools/arm-bcm2708/gcc-linaro-arm-linux-gnueabihf-raspbian-x64/bin/arm-linux-gnueabihf-g++'. Output: =================== =================== Maybe you forgot to setup the environment?Edit: I found another report here: https://stackoverflow.com/questions/49018581/issue-with-qt-and-cross-compiling-from-mac-to-raspbian-stretchrpi3/54502633 There is an answer saying: 
 The cross-compilation toolchain Raspberry Pi provides is probably built for Linux host systems.
 You need to use a toolchain built for macOS hosts, such as this: https://github.com/Illuminux/ct-ng-linaro-macAs that sounds like it would make sense, I tried to install the "crosstool-NG Linaro for Mac OS X" which it is referring to. But that unfortunately fails, as it's using an outdated brew package it seems (Error: homebrew/dupes was deprecated.) - Last commit was also 5 years ago. So, I am now trying to find a more recent toolchain-howto for mac os to build for RPi. 
- 
You really should consider using a virtual machine with Linux on it. It's going to be faster to setup. 
- 
Thanks for the reply. I was in deed also considering to run a VM with a Linux. 
 If there is no other solution I guess I will try that.However, I am wondering if there is no native solution for Macs. MacOS as well as Raspberries are quite common nowadays, therefor I would expect that there should be a way to get this to work somehow. 
- 
Thanks for the reply. I was in deed also considering to run a VM with a Linux. 
 If there is no other solution I guess I will try that.However, I am wondering if there is no native solution for Macs. MacOS as well as Raspberries are quite common nowadays, therefor I would expect that there should be a way to get this to work somehow. @PatZim said in RaspberryPi2EGLFS tutorial fail at Step 10 "./configure": I am wondering if there is no native solution for Macs As you figured out yourself, I guess it all just comes down to get a cross-compiler for ARM that runs on Mac... But I bet using the VM with Linux is a good approach, given that lots of guides/tutorials are based on such platform 
 

