From 10:00 CET Friday 22nd November we will adjust how the server works to deal with some recently reported problems. Therefore there may be a load problem, if you experience more problems than usual trying to access the forum then please PM AndyS or any of the moderators so they can inform me.


Qt5 cross-compilation to raspberry pi3 - sh: tools/...../arm-linux-gnueabihf-g++: not found



  • Hello,

    I am following this guide for cross-compilation to raspberry pi 3 model B.
    I followed everything step by step and came to an error on step 10.

    First I did:

    git clone git://code.qt.io/qt/qtbase.git -b 5.10

    Next I did, to get my branch to 5.10.1 from tag v5.10.1:

    git checkout -b 5.10.1 v5.10.1

    Next I did:

    ./configure -release -opengl es2 -device linux-rasp-pi3-g++ -no-use-gold-linker -device-option CROSS_COMPILE=/home/worly/raspi/tools/arm-bcm2708/gcc-linaro-arm-linux-gnueabihf-raspbian/bin/arm-linux-gnueabihf- -sysroot /home/worly/raspi/sysroot -opensource -confirm-license -make libs -prefix /usr/local/qt5pi -extprefix /home/worly/raspi/qt5pi -hostprefix /home/worly/raspi/qt5 -v

    It was running for about a minute, when this error came out:

    Output:
    ===================
    sh: 1: /home/worly/raspi/tools/arm-bcm2708/gcc-linaro-arm-linux-gnueabihf-raspbian/bin/arm-linux-gnueabihf-g++: not found
    ===================
    Maybe you forgot to setup the environment?

    I navigated to that folder using terminal and that file is there...

    pwd
    /home/worly/raspi/tools/arm-bcm2708/gcc-linaro-arm-linux-gnueabihf-raspbian/bin

    ls
    arm-linux-gnueabihf-addr2line
    arm-linux-gnueabihf-gfortran
    arm-linux-gnueabihf-ar
    arm-linux-gnueabihf-gprof
    arm-linux-gnueabihf-as
    arm-linux-gnueabihf-ld
    arm-linux-gnueabihf-c++
    arm-linux-gnueabihf-ld.bfd
    arm-linux-gnueabihf-c++filt
    arm-linux-gnueabihf-ldd
    arm-linux-gnueabihf-cpp
    arm-linux-gnueabihf-ld.gold
    arm-linux-gnueabihf-ct-ng.config
    arm-linux-gnueabihf-nm
    arm-linux-gnueabihf-dwp
    arm-linux-gnueabihf-objcopy
    arm-linux-gnueabihf-elfedit
    arm-linux-gnueabihf-objdump
    arm-linux-gnueabihf-g++
    arm-linux-gnueabihf-pkg-config
    arm-linux-gnueabihf-gcc
    arm-linux-gnueabihf-pkg-config-real
    arm-linux-gnueabihf-gcc-4.8.3
    arm-linux-gnueabihf-ranlib
    arm-linux-gnueabihf-gcc-ar
    arm-linux-gnueabihf-readelf
    arm-linux-gnueabihf-gcc-nm
    arm-linux-gnueabihf-size
    arm-linux-gnueabihf-gcc-ranlib
    arm-linux-gnueabihf-strings
    arm-linux-gnueabihf-gcov
    arm-linux-gnueabihf-strip
    arm-linux-gnueabihf-gdb

    And when I try then:

    ./arm-linux-gnueabihf-g++

    It says:

    bash: ./arm-linux-gnueabihf-g++: No such file or directory

    Not sure what am I doing wrong here, I tried rebooting the machine - still not working...


  • Lifetime Qt Champion

    Hi,

    You should rather call your compiler with the -v option, that will give you information about it.
    What do you get if your call ls -la in that folder ?



  • I have -v option, if you want the complete log here is pastebin link.

    When calling ls -la in that folder I get:
    screenshot


  • Lifetime Qt Champion

    What do you get if you call /home/worly/rapsi/tools/arm-bcm2708/gcc-linaro-arm-linux-gnueabihf-raspbian/bin/arm-linux-gnueabihf-g++ -v ?



  • @SGaist I get this:

    bash: ./arm-linux-gnueabihf-g++: No such file or directory

    It's like Ubuntu can't find that file...



  • I have found a solution here.
    Looks like Ubuntu couldn't run 32bit binary, but it's working now.