Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. Installation and Deployment
  4. Compiling QT on windows for cross compilation with raspberry, fails. Project ERROR: Cannot run target compiler
QtWS25 Last Chance

Compiling QT on windows for cross compilation with raspberry, fails. Project ERROR: Cannot run target compiler

Scheduled Pinned Locked Moved Unsolved Installation and Deployment
qt 5.10raspberrypiraspberry eglfscompilerconfigure
12 Posts 9 Posters 8.7k Views
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • C Offline
    C Offline
    cskr
    wrote on last edited by
    #1

    Hello,

    I am running windows on my computer, trying to build QT 5.10.1 for cross compilation on my Raspberry Pi Zero Wireless.

    I am trying to follow the tutorial here: https://wiki.qt.io/RaspberryPi2EGLFS

    I came all the way until step 10, and stuck there.

    Running the following command:

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

    the output is:

    C:\qt\raspi\qtbase>configure -release -opengl es2 -device linux-rasp-pi3-g++ -device-option CROSS_COMPILE=C:/qt/raspi/tools/arm-bcm2708/gcc-linaro-arm-linux-gnueabihf-raspbian/bin/arm-linux-gnueabihf- -sysroot C:/qt/raspi/sysroot -no-use-gold-linker -opensource -confirm-license -make libs -prefix /usr/local/qt5pi -extprefix C:/qt/raspi/qt5pi -hostprefix C:/qt/raspi/qt5 -v
    Running syncqt ...
    <srcbase> = C:/qt/raspi/qtbase
    <outbase> = C:/qt/raspi/qtbase
    Bootstrapping qmake ...
    mingw32-make: Nothing to be done for 'first'.
    Command line: -release -opengl es2 -device linux-rasp-pi3-g++ -device-option "CROSS_COMPILE=C:/qt/raspi/tools/arm-bcm2708/gcc-linaro-arm-linux-gnueabihf-raspbian/bin/arm-linux-gnueabihf-" -sysroot C:/qt/raspi/sysroot -no-use-gold-linker -opensource -confirm-license -make libs -prefix /usr/local/qt5pi -extprefix C:/qt/raspi/qt5pi -hostprefix C:/qt/raspi/qt5 -v
    Project ERROR: Cannot run target compiler 'C:/qt/raspi/tools/arm-bcm2708/gcc-linaro-arm-linux-gnueabihf-raspbian/bin/arm-linux-gnueabihf-g++'. Output:
    ===================
    'C:/qt/raspi/tools/arm-bcm2708/gcc-linaro-arm-linux-gnueabihf-raspbian/bin/arm-linux-gnueabihf-g++' is not recognized as an internal or external command,
    operable program or batch file.
    ===================
    Maybe you forgot to setup the environment?
    

    I checked, and the file exists but windows doesnt let me to run it this way. any help appreciated.

    Thanks in advance.

    jsulmJ 1 Reply Last reply
    0
    • C cskr

      Hello,

      I am running windows on my computer, trying to build QT 5.10.1 for cross compilation on my Raspberry Pi Zero Wireless.

      I am trying to follow the tutorial here: https://wiki.qt.io/RaspberryPi2EGLFS

      I came all the way until step 10, and stuck there.

      Running the following command:

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

      the output is:

      C:\qt\raspi\qtbase>configure -release -opengl es2 -device linux-rasp-pi3-g++ -device-option CROSS_COMPILE=C:/qt/raspi/tools/arm-bcm2708/gcc-linaro-arm-linux-gnueabihf-raspbian/bin/arm-linux-gnueabihf- -sysroot C:/qt/raspi/sysroot -no-use-gold-linker -opensource -confirm-license -make libs -prefix /usr/local/qt5pi -extprefix C:/qt/raspi/qt5pi -hostprefix C:/qt/raspi/qt5 -v
      Running syncqt ...
      <srcbase> = C:/qt/raspi/qtbase
      <outbase> = C:/qt/raspi/qtbase
      Bootstrapping qmake ...
      mingw32-make: Nothing to be done for 'first'.
      Command line: -release -opengl es2 -device linux-rasp-pi3-g++ -device-option "CROSS_COMPILE=C:/qt/raspi/tools/arm-bcm2708/gcc-linaro-arm-linux-gnueabihf-raspbian/bin/arm-linux-gnueabihf-" -sysroot C:/qt/raspi/sysroot -no-use-gold-linker -opensource -confirm-license -make libs -prefix /usr/local/qt5pi -extprefix C:/qt/raspi/qt5pi -hostprefix C:/qt/raspi/qt5 -v
      Project ERROR: Cannot run target compiler 'C:/qt/raspi/tools/arm-bcm2708/gcc-linaro-arm-linux-gnueabihf-raspbian/bin/arm-linux-gnueabihf-g++'. Output:
      ===================
      'C:/qt/raspi/tools/arm-bcm2708/gcc-linaro-arm-linux-gnueabihf-raspbian/bin/arm-linux-gnueabihf-g++' is not recognized as an internal or external command,
      operable program or batch file.
      ===================
      Maybe you forgot to setup the environment?
      

      I checked, and the file exists but windows doesnt let me to run it this way. any help appreciated.

      Thanks in advance.

      jsulmJ Offline
      jsulmJ Offline
      jsulm
      Lifetime Qt Champion
      wrote on last edited by
      #2

      @cskr You compiler executable looks like the one for Linux. Is it possible you installed Linux tool chain on your Windows? The link you posted describes how to do it on Linux. I highly recommend to do cross compilation on Linux (can be a virtual machine) instead on Windows - it is way easier.

      https://forum.qt.io/topic/113070/qt-code-of-conduct

      1 Reply Last reply
      1
      • C Offline
        C Offline
        cskr
        wrote on last edited by cskr
        #3

        @jsulm thank you for your help.

        I set up a virtual box ubuntu, and followed the same tutorial. And I am stuck at the same step.

        I run the command:

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

        The end of the output is:

        Info: creating cache file /home/sakir/qtbase/.qmake.cache
        Command line: -release -opengl es2 -device linux-rasp-pi3-g++ -no-use-gold-linker -device-option CROSS_COMPILE=/home/sakir/raspi/tools/arm-bcm2708/gcc-linaro-arm-linux-gnueabihf-raspbian/bin/arm-linux-gnueabihf- -sysroot /home/sakir/raspi/sysroot -opensource -confirm-license -make libs -prefix /usr/local/qt5pi -extprefix /home/sakir/raspi/qt5pi -hostprefix /home/sakir/raspi/qt5 -v
        Project ERROR: Cannot run target compiler '/home/sakir/raspi/tools/arm-bcm2708/gcc-linaro-arm-linux-gnueabihf-raspbian/bin/arm-linux-gnueabihf-g++'. Output:
        ===================
        sh: 1: /home/sakir/raspi/tools/arm-bcm2708/gcc-linaro-arm-linux-gnueabihf-raspbian/bin/arm-linux-gnueabihf-g++: not found
        ===================
        Maybe you forgot to setup the environment?
        
        

        The file exists, I made sure of it.

        0_1519308252592_ss.png

        I tried the clean command and run it again. It didn't work. I tried to run the same command with sudo, it didn't work.

        Is the tutorial missing a step? What am I doing wrong?

        1 Reply Last reply
        0
        • C Offline
          C Offline
          cskr
          wrote on last edited by
          #4

          All right, I managed to overcome that error by changing to x64 compiler. But that command still does not work.

          My config.log is as follows:

          Command line: -release -opengl es2 -device linux-rasp-pi3-g++ -device-option CROSS_COMPILE=/home/sakir/raspi/tools/arm-bcm2708/gcc-linaro-arm-linux-gnueabihf-raspbian-x64/bin/arm-linux-gnueabihf- -sysroot /home/sakir/raspi/sysroot -opensource -confirm-license -make libs -prefix /usr/local/qt5pi -extprefix /home/sakir/raspi/qt5pi -hostprefix /home/sakir/raspi/qt5 -v -no-use-gold-linker
          executing config test machineTuple
          + /home/sakir/raspi/tools/arm-bcm2708/gcc-linaro-arm-linux-gnueabihf-raspbian-x64/bin/arm-linux-gnueabihf-g++ -dumpmachine
          > arm-linux-gnueabihf
          test config.qtbase.tests.machineTuple succeeded
          executing config test verifyspec
          + cd /home/sakir/qtbase/config.tests/verifyspec && /home/sakir/qtbase/bin/qmake "CONFIG -= qt debug_and_release app_bundle lib_bundle" "CONFIG += shared warn_off console single_arch" "QMAKE_CFLAGS += --sysroot=/home/sakir/raspi/sysroot" "QMAKE_CXXFLAGS += --sysroot=/home/sakir/raspi/sysroot" "QMAKE_LFLAGS += --sysroot=/home/sakir/raspi/sysroot" -early "CONFIG += cross_compile" /home/sakir/qtbase/config.tests/verifyspec
          > Info: creating stash file /home/sakir/qtbase/config.tests/.qmake.stash
          + cd /home/sakir/qtbase/config.tests/verifyspec && MAKEFLAGS= /usr/bin/make
          > /home/sakir/raspi/tools/arm-bcm2708/gcc-linaro-arm-linux-gnueabihf-raspbian-x64/bin/arm-linux-gnueabihf-g++ -c -march=armv8-a -mtune=cortex-a53 -mfpu=crypto-neon-fp-armv8 -mfloat-abi=hard --sysroot=/home/sakir/raspi/sysroot -O2 -std=gnu++11 -w -fPIC  -I. -I/home/sakir/qtbase/mkspecs/devices/linux-rasp-pi3-g++ -o verifyspec.o verifyspec.cpp
          > /home/sakir/raspi/tools/arm-bcm2708/gcc-linaro-arm-linux-gnueabihf-raspbian-x64/bin/arm-linux-gnueabihf-g++ -mfloat-abi=hard --sysroot=/home/sakir/raspi/sysroot -Wl,-O1 -Wl,-rpath-link,/home/sakir/raspi/sysroot/opt/vc/lib -Wl,-rpath-link,/home/sakir/raspi/sysroot/usr/lib/arm-linux-gnueabihf -Wl,-rpath-link,/home/sakir/raspi/sysroot/lib/arm-linux-gnueabihf -o verifyspec verifyspec.o    
          > /home/sakir/raspi/tools/arm-bcm2708/gcc-linaro-arm-linux-gnueabihf-raspbian-x64/bin/../lib/gcc/arm-linux-gnueabihf/4.8.3/../../../../arm-linux-gnueabihf/bin/ld: cannot find crt1.o: No such file or directory
          > /home/sakir/raspi/tools/arm-bcm2708/gcc-linaro-arm-linux-gnueabihf-raspbian-x64/bin/../lib/gcc/arm-linux-gnueabihf/4.8.3/../../../../arm-linux-gnueabihf/bin/ld: cannot find crti.o: No such file or directory
          > /home/sakir/raspi/tools/arm-bcm2708/gcc-linaro-arm-linux-gnueabihf-raspbian-x64/bin/../lib/gcc/arm-linux-gnueabihf/4.8.3/../../../../arm-linux-gnueabihf/bin/ld: cannot find -lm
          > collect2: error: ld returned 1 exit status
          > Makefile:66: recipe for target 'verifyspec' failed
          > make: *** [verifyspec] Error 1
          

          Any help appreciated. Thanks in advance.

          jsulmJ A 2 Replies Last reply
          0
          • C cskr

            All right, I managed to overcome that error by changing to x64 compiler. But that command still does not work.

            My config.log is as follows:

            Command line: -release -opengl es2 -device linux-rasp-pi3-g++ -device-option CROSS_COMPILE=/home/sakir/raspi/tools/arm-bcm2708/gcc-linaro-arm-linux-gnueabihf-raspbian-x64/bin/arm-linux-gnueabihf- -sysroot /home/sakir/raspi/sysroot -opensource -confirm-license -make libs -prefix /usr/local/qt5pi -extprefix /home/sakir/raspi/qt5pi -hostprefix /home/sakir/raspi/qt5 -v -no-use-gold-linker
            executing config test machineTuple
            + /home/sakir/raspi/tools/arm-bcm2708/gcc-linaro-arm-linux-gnueabihf-raspbian-x64/bin/arm-linux-gnueabihf-g++ -dumpmachine
            > arm-linux-gnueabihf
            test config.qtbase.tests.machineTuple succeeded
            executing config test verifyspec
            + cd /home/sakir/qtbase/config.tests/verifyspec && /home/sakir/qtbase/bin/qmake "CONFIG -= qt debug_and_release app_bundle lib_bundle" "CONFIG += shared warn_off console single_arch" "QMAKE_CFLAGS += --sysroot=/home/sakir/raspi/sysroot" "QMAKE_CXXFLAGS += --sysroot=/home/sakir/raspi/sysroot" "QMAKE_LFLAGS += --sysroot=/home/sakir/raspi/sysroot" -early "CONFIG += cross_compile" /home/sakir/qtbase/config.tests/verifyspec
            > Info: creating stash file /home/sakir/qtbase/config.tests/.qmake.stash
            + cd /home/sakir/qtbase/config.tests/verifyspec && MAKEFLAGS= /usr/bin/make
            > /home/sakir/raspi/tools/arm-bcm2708/gcc-linaro-arm-linux-gnueabihf-raspbian-x64/bin/arm-linux-gnueabihf-g++ -c -march=armv8-a -mtune=cortex-a53 -mfpu=crypto-neon-fp-armv8 -mfloat-abi=hard --sysroot=/home/sakir/raspi/sysroot -O2 -std=gnu++11 -w -fPIC  -I. -I/home/sakir/qtbase/mkspecs/devices/linux-rasp-pi3-g++ -o verifyspec.o verifyspec.cpp
            > /home/sakir/raspi/tools/arm-bcm2708/gcc-linaro-arm-linux-gnueabihf-raspbian-x64/bin/arm-linux-gnueabihf-g++ -mfloat-abi=hard --sysroot=/home/sakir/raspi/sysroot -Wl,-O1 -Wl,-rpath-link,/home/sakir/raspi/sysroot/opt/vc/lib -Wl,-rpath-link,/home/sakir/raspi/sysroot/usr/lib/arm-linux-gnueabihf -Wl,-rpath-link,/home/sakir/raspi/sysroot/lib/arm-linux-gnueabihf -o verifyspec verifyspec.o    
            > /home/sakir/raspi/tools/arm-bcm2708/gcc-linaro-arm-linux-gnueabihf-raspbian-x64/bin/../lib/gcc/arm-linux-gnueabihf/4.8.3/../../../../arm-linux-gnueabihf/bin/ld: cannot find crt1.o: No such file or directory
            > /home/sakir/raspi/tools/arm-bcm2708/gcc-linaro-arm-linux-gnueabihf-raspbian-x64/bin/../lib/gcc/arm-linux-gnueabihf/4.8.3/../../../../arm-linux-gnueabihf/bin/ld: cannot find crti.o: No such file or directory
            > /home/sakir/raspi/tools/arm-bcm2708/gcc-linaro-arm-linux-gnueabihf-raspbian-x64/bin/../lib/gcc/arm-linux-gnueabihf/4.8.3/../../../../arm-linux-gnueabihf/bin/ld: cannot find -lm
            > collect2: error: ld returned 1 exit status
            > Makefile:66: recipe for target 'verifyspec' failed
            > make: *** [verifyspec] Error 1
            

            Any help appreciated. Thanks in advance.

            jsulmJ Offline
            jsulmJ Offline
            jsulm
            Lifetime Qt Champion
            wrote on last edited by
            #5

            @cskr said in Compiling QT on windows for cross compilation with raspberry, fails. Project ERROR: Cannot run target compiler:

            /home/sakir/raspi/sysroot

            Is this valid sysroot for your RPi?

            https://forum.qt.io/topic/113070/qt-code-of-conduct

            1 Reply Last reply
            1
            • C cskr

              All right, I managed to overcome that error by changing to x64 compiler. But that command still does not work.

              My config.log is as follows:

              Command line: -release -opengl es2 -device linux-rasp-pi3-g++ -device-option CROSS_COMPILE=/home/sakir/raspi/tools/arm-bcm2708/gcc-linaro-arm-linux-gnueabihf-raspbian-x64/bin/arm-linux-gnueabihf- -sysroot /home/sakir/raspi/sysroot -opensource -confirm-license -make libs -prefix /usr/local/qt5pi -extprefix /home/sakir/raspi/qt5pi -hostprefix /home/sakir/raspi/qt5 -v -no-use-gold-linker
              executing config test machineTuple
              + /home/sakir/raspi/tools/arm-bcm2708/gcc-linaro-arm-linux-gnueabihf-raspbian-x64/bin/arm-linux-gnueabihf-g++ -dumpmachine
              > arm-linux-gnueabihf
              test config.qtbase.tests.machineTuple succeeded
              executing config test verifyspec
              + cd /home/sakir/qtbase/config.tests/verifyspec && /home/sakir/qtbase/bin/qmake "CONFIG -= qt debug_and_release app_bundle lib_bundle" "CONFIG += shared warn_off console single_arch" "QMAKE_CFLAGS += --sysroot=/home/sakir/raspi/sysroot" "QMAKE_CXXFLAGS += --sysroot=/home/sakir/raspi/sysroot" "QMAKE_LFLAGS += --sysroot=/home/sakir/raspi/sysroot" -early "CONFIG += cross_compile" /home/sakir/qtbase/config.tests/verifyspec
              > Info: creating stash file /home/sakir/qtbase/config.tests/.qmake.stash
              + cd /home/sakir/qtbase/config.tests/verifyspec && MAKEFLAGS= /usr/bin/make
              > /home/sakir/raspi/tools/arm-bcm2708/gcc-linaro-arm-linux-gnueabihf-raspbian-x64/bin/arm-linux-gnueabihf-g++ -c -march=armv8-a -mtune=cortex-a53 -mfpu=crypto-neon-fp-armv8 -mfloat-abi=hard --sysroot=/home/sakir/raspi/sysroot -O2 -std=gnu++11 -w -fPIC  -I. -I/home/sakir/qtbase/mkspecs/devices/linux-rasp-pi3-g++ -o verifyspec.o verifyspec.cpp
              > /home/sakir/raspi/tools/arm-bcm2708/gcc-linaro-arm-linux-gnueabihf-raspbian-x64/bin/arm-linux-gnueabihf-g++ -mfloat-abi=hard --sysroot=/home/sakir/raspi/sysroot -Wl,-O1 -Wl,-rpath-link,/home/sakir/raspi/sysroot/opt/vc/lib -Wl,-rpath-link,/home/sakir/raspi/sysroot/usr/lib/arm-linux-gnueabihf -Wl,-rpath-link,/home/sakir/raspi/sysroot/lib/arm-linux-gnueabihf -o verifyspec verifyspec.o    
              > /home/sakir/raspi/tools/arm-bcm2708/gcc-linaro-arm-linux-gnueabihf-raspbian-x64/bin/../lib/gcc/arm-linux-gnueabihf/4.8.3/../../../../arm-linux-gnueabihf/bin/ld: cannot find crt1.o: No such file or directory
              > /home/sakir/raspi/tools/arm-bcm2708/gcc-linaro-arm-linux-gnueabihf-raspbian-x64/bin/../lib/gcc/arm-linux-gnueabihf/4.8.3/../../../../arm-linux-gnueabihf/bin/ld: cannot find crti.o: No such file or directory
              > /home/sakir/raspi/tools/arm-bcm2708/gcc-linaro-arm-linux-gnueabihf-raspbian-x64/bin/../lib/gcc/arm-linux-gnueabihf/4.8.3/../../../../arm-linux-gnueabihf/bin/ld: cannot find -lm
              > collect2: error: ld returned 1 exit status
              > Makefile:66: recipe for target 'verifyspec' failed
              > make: *** [verifyspec] Error 1
              

              Any help appreciated. Thanks in advance.

              A Offline
              A Offline
              ajitborude
              wrote on last edited by
              #6

              @cskr
              Hello, Did you find any solution for this problem???

              1 Reply Last reply
              1
              • F Offline
                F Offline
                FluxDice
                wrote on last edited by
                #7

                @cskr said in Compiling QT on windows for cross compilation with raspberry, fails. Project ERROR: Cannot run target compiler:

                a virtual box ubuntu, and followed the same tutorial. And I am stuck a

                I'm stuck at the same place. Any luck on a solution?

                Pablo J. RoginaP 1 Reply Last reply
                0
                • F FluxDice

                  @cskr said in Compiling QT on windows for cross compilation with raspberry, fails. Project ERROR: Cannot run target compiler:

                  a virtual box ubuntu, and followed the same tutorial. And I am stuck a

                  I'm stuck at the same place. Any luck on a solution?

                  Pablo J. RoginaP Offline
                  Pablo J. RoginaP Offline
                  Pablo J. Rogina
                  wrote on last edited by
                  #8

                  @FluxDice said in Compiling QT on windows for cross compilation with raspberry, fails. Project ERROR: Cannot run target compiler:

                  I'm stuck at the same place.

                  What place/step is that?
                  What error message you've got?

                  Upvote the answer(s) that helped you solve the issue
                  Use "Topic Tools" button to mark your post as Solved
                  Add screenshots via postimage.org
                  Don't ask support requests via chat/PM. Please use the forum so others can benefit from the solution in the future

                  1 Reply Last reply
                  0
                  • M Offline
                    M Offline
                    mjohn
                    wrote on last edited by
                    #9

                    I'm see the same error the original poster encountered. Qt's configure script seems to not be able to run the cross compiler but I can running it manually.

                    vbox:~/qt-everywhere-src-5.13.0$ ./configure -release -static -verbose -opensource -device linux-imx6-g++ -device-option CROSS_COMPILE=/home/ghguest/Toolchain/arm-linux-gnueabihf- -sysroot /home/ghguest/Development/fs/debian-stretch-armhf-rootfs_dl-dm-x -hostprefix $PWD/build
                    + cd qtbase
                    + /home/ghguest/qt-everywhere-src-5.13.0/qtbase/configure -top-level -release -static -verbose -opensource -device linux-imx6-g++ -device-option CROSS_COMPILE=/home/ghguest/Toolchain/arm-linux-gnueabihf- -sysroot /home/ghguest/Development/fs/debian-stretch-armhf-rootfs_dl-dm-x -hostprefix /home/ghguest/qt-everywhere-src-5.13.0/build
                    Creating qmake...
                    make: Nothing to be done for 'first'.
                    Command line: -release -static -verbose -opensource -device linux-imx6-g++ -device-option CROSS_COMPILE=/home/ghguest/Toolchain/arm-linux-gnueabihf- -sysroot /home/ghguest/Development/fs/debian-stretch-armhf-rootfs_dl-dm-x -hostprefix /home/ghguest/qt-everywhere-src-5.13.0/build
                    Project ERROR: Cannot run target compiler '/home/ghguest/Toolchain/arm-linux-gnueabihf-g++'. Output:
                    ===================
                    ===================
                    Maybe you forgot to setup the environment?
                    
                    vbox:~/qt-everywhere-src-5.13.0$ /home/ghguest/Toolchain/arm-linux-gnueabihf-g++ --version
                    arm-linux-gnueabihf-g++ (Debian 6.3.0-18) 6.3.0 20170516
                    Copyright (C) 2016 Free Software Foundation, Inc.
                    This is free software; see the source for copying conditions.  There is NO
                    warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
                    
                    aha_1980A 1 Reply Last reply
                    0
                    • M mjohn

                      I'm see the same error the original poster encountered. Qt's configure script seems to not be able to run the cross compiler but I can running it manually.

                      vbox:~/qt-everywhere-src-5.13.0$ ./configure -release -static -verbose -opensource -device linux-imx6-g++ -device-option CROSS_COMPILE=/home/ghguest/Toolchain/arm-linux-gnueabihf- -sysroot /home/ghguest/Development/fs/debian-stretch-armhf-rootfs_dl-dm-x -hostprefix $PWD/build
                      + cd qtbase
                      + /home/ghguest/qt-everywhere-src-5.13.0/qtbase/configure -top-level -release -static -verbose -opensource -device linux-imx6-g++ -device-option CROSS_COMPILE=/home/ghguest/Toolchain/arm-linux-gnueabihf- -sysroot /home/ghguest/Development/fs/debian-stretch-armhf-rootfs_dl-dm-x -hostprefix /home/ghguest/qt-everywhere-src-5.13.0/build
                      Creating qmake...
                      make: Nothing to be done for 'first'.
                      Command line: -release -static -verbose -opensource -device linux-imx6-g++ -device-option CROSS_COMPILE=/home/ghguest/Toolchain/arm-linux-gnueabihf- -sysroot /home/ghguest/Development/fs/debian-stretch-armhf-rootfs_dl-dm-x -hostprefix /home/ghguest/qt-everywhere-src-5.13.0/build
                      Project ERROR: Cannot run target compiler '/home/ghguest/Toolchain/arm-linux-gnueabihf-g++'. Output:
                      ===================
                      ===================
                      Maybe you forgot to setup the environment?
                      
                      vbox:~/qt-everywhere-src-5.13.0$ /home/ghguest/Toolchain/arm-linux-gnueabihf-g++ --version
                      arm-linux-gnueabihf-g++ (Debian 6.3.0-18) 6.3.0 20170516
                      Copyright (C) 2016 Free Software Foundation, Inc.
                      This is free software; see the source for copying conditions.  There is NO
                      warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
                      
                      aha_1980A Offline
                      aha_1980A Offline
                      aha_1980
                      Lifetime Qt Champion
                      wrote on last edited by
                      #10

                      @mjohn

                      Maybe you forgot to setup the environment?

                      Have you?

                      Qt has to stay free or it will die.

                      1 Reply Last reply
                      0
                      • Matthew11M Offline
                        Matthew11M Offline
                        Matthew11
                        wrote on last edited by Matthew11
                        #11

                        I also stuck in that place with error:

                        Project ERROR: Cannot run target compiler '<path>/arm-linux-gnueabihf-g++'.

                        but indeed as @aha_1980 said:

                        @aha_1980 said in Compiling QT on windows for cross compilation with raspberry, fails. Project ERROR: Cannot run target compiler:

                        Maybe you forgot to setup the environment?

                        The best checkout if compiler is accessible is to run in root dir where Qt sources are:

                        // with entry in bashrc
                        $ arm-linux-gnueabihf-g++ --version
                        //or with absolute path:
                        $ /home/<user_name>/<path-to-bin-where-compiler-is-located>/arm-linux-gnueabihf-g++ --version

                        NOTE: replace <user_name> with your's user name, and replace <path-to-bin-where-compiler-is-located> with proper path as stated below.

                        And then we should get info:

                        arm-linux-gnueabihf-g++ (crosstool-NG linaro-1.13.1+bzr2650 - Linaro GCC 2014.03) 4.8.3 20140303 (prerelease)
                        ...

                        The problem was with path to compiler: paths with "~" don't work, the best is to provide absolute path, for example:

                        /home/<user_name>/<path-to-bin-where-compiler-is-located>
                        // in my case:
                        /home/<user_name>/raspi/tools/arm-bcm2708/gcc-linaro-arm-linux-gnueabihf-raspbian-x64/bin

                        Or add in .bashrc path to compiler by adding at the end of file:

                        export PATH=$PATH:/home/<user_name>/<path-to-bin-where-compiler-is-located>
                        // in my case:
                        export PATH=$PATH:/home/<user_name>/raspi/tools/arm-bcm2708/gcc-linaro-arm-linux-gnueabihf-raspbian-x64/bin

                        Then running configure script we have:

                        • with absolute path:

                        $ ./configure <other options> -device-option CROSS_COMPILE=/home/<user_name>/<path-to-bin-where-compiler-is-located>/arm-linux-gnueabihf- <other options>
                        // in my case:
                        $ ./configure <other options> -device-option CROSS_COMPILE=/home/<user_name>/raspi/tools/arm-bcm2708/gcc-linaro-arm-linux-gnueabihf-raspbian-x64/bin/arm-linux-gnueabihf- <other options>

                        • with entry in bashrc:

                        $ ./configure <other options> -device-option CROSS_COMPILE=/home/<user_name>/<path-to-bin-where-compiler-is-located>/arm-linux-gnueabihf- <other options>
                        //in my case:
                        $ ./configure <other options> -device-option CROSS_COMPILE=arm-linux-gnueabihf- <other options>

                        Tested on RPi3 (with Raspbian from 2019-09-26) and Qt 5.12.6, on Ubuntu 18.03.4

                        Cheers!

                        1 Reply Last reply
                        2
                        • S Offline
                          S Offline
                          SherifOmran
                          wrote on last edited by
                          #12

                          you forgot to do
                          source ˜/.bashrc

                          to let this command get activated
                          export PATH=$PATH:/opt/qt5pi/tools/arm-bcm2708/gcc-linaro-arm-linux-gnueabihf-raspbian-x64/bin

                          1 Reply Last reply
                          0

                          • Login

                          • Login or register to search.
                          • First post
                            Last post
                          0
                          • Categories
                          • Recent
                          • Tags
                          • Popular
                          • Users
                          • Groups
                          • Search
                          • Get Qt Extensions
                          • Unsolved