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 configure step. 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 clone step I pulled v5.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 -dfx between 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

  • @Pablo-J.-Rogina said in RaspberryPi2EGLFS tutorial fail at Step 10 "./configure":


     -bash: /Users/me/project/raspi/tools/arm-bcm2708/gcc-linaro-arm-linux-gnueabihf-raspbian-x64/bin/arm-linux-gnueabihf-g++: cannot execute binary file

    Altering for 32-bit version yields the same result.

     -bash: /Users/me/project/raspi/tools/arm-bcm2708/gcc-linaro-arm-linux-gnueabihf-raspbian/bin/arm-linux-gnueabihf-g++: cannot execute binary file
    uname -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

  • Lifetime Qt Champion


    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.

  • @SGaist I followed the tutorial.

    0_1546276227592_Screen Shot 2018-12-31 at 9.09.56 AM.png

  • Lifetime Qt Champion

    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

Looks like your connection to Qt Forum was lost, please wait while we try to reconnect.