Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. Mobile and Embedded
  4. Maybe you forgot to setup the environment?
Qt 6.11 is out! See what's new in the release blog

Maybe you forgot to setup the environment?

Scheduled Pinned Locked Moved Unsolved Mobile and Embedded
10 Posts 4 Posters 9.4k Views 1 Watching
  • 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.
  • S Offline
    S Offline
    Softtoon
    wrote on last edited by
    #1

    Hello

    I am new to QT and i am following the "Raspberry Pi Beginners Guide" on your website because i want to cross compile for a raspberry pi 3.

    Everything works fine untill "Compiling Qtbase" . Here i get this error

    Project ERROR: Cannot run target compiler '/home/tonnie/opt/gcc-4.7-linaro-rpi-gnueabihf/bin/arm-linux-gnueabihf-g++'. Output:

    sh: 1: /home/tonnie/opt/gcc-4.7-linaro-rpi-gnueabihf/bin/arm-linux-gnueabihf-g++: not found

    Maybe you forgot to setup the environment?

    But when i check the path, the file "arm-linux-gnueabihf-g++" is there.
    I don't know what i have to do in the enviroment ????

    Thanks in advance

    1 Reply Last reply
    0
    • SGaistS Offline
      SGaistS Offline
      SGaist
      Lifetime Qt Champion
      wrote on last edited by
      #2

      Hi,

      You should show the configure options you used to cross-compile Qt.

      Interested in AI ? www.idiap.ch
      Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct

      1 Reply Last reply
      1
      • S Offline
        S Offline
        Softtoon
        wrote on last edited by
        #3

        Hello

        This is the command i use (copied from the website http://wiki.qt.io/Raspberry_Pi_Beginners_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

        I followed the instruction on this website and everything works fine until here

        1 Reply Last reply
        0
        • SGaistS Offline
          SGaistS Offline
          SGaist
          Lifetime Qt Champion
          wrote on last edited by
          #4

          @Softtoon said in Maybe you forgot to setup the environment?:

          /home/tonnie/opt/gcc-4.7-linaro-rpi-gnueabihf/bin/arm-linux-gnueabihf-g++

          What do you get if you run that line in your terminal ?

          Interested in AI ? www.idiap.ch
          Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct

          1 Reply Last reply
          0
          • S Offline
            S Offline
            Softtoon
            wrote on last edited by
            #5

            Hello

            When ik run the ./configure command i get

            • cd qtbase
            • /home/tonnie/opt/qt5/qtbase/configure -top-level -opengl es2 -device linux-rasp-pi-g++ -device-option CROSS_COMPILE=/home/tonnie/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/tonnie/opt/qt5/qtbase
              <bldbase> = /home/tonnie/opt/qt5/qtbase
              <outbase> = /home/tonnie/opt/qt5/qtbase
              Creating qmake...
              .Done.
              Info: creating super cache file /home/tonnie/opt/qt5/.qmake.super
              Project ERROR: Cannot run target compiler '/home/tonnie/opt/gcc-4.7-linaro-rpi-gnueabihf/bin/arm-linux-gnueabihf-g++'. Output:
              ===================
              sh: 1: /home/tonnie/opt/gcc-4.7-linaro-rpi-gnueabihf/bin/arm-linux-gnueabihf-g++: not found
              ===================
              Maybe you forgot to setup the environment?

            It complains that it cant find the compiler but the compiler is the correct location
            ~/opt/gcc-4.7-linaro-rpi-gnueabihf/bin

            Do i have to add a path somewhere ? I am not familiar with linux

            1 Reply Last reply
            0
            • SGaistS Offline
              SGaistS Offline
              SGaist
              Lifetime Qt Champion
              wrote on last edited by
              #6

              What do you get if you call /home/tonnie/opt/gcc-4.7-linaro-rpi-gnueabihf/bin/arm-linux-gnueabihf-gcc --version ?

              Interested in AI ? www.idiap.ch
              Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct

              1 Reply Last reply
              0
              • S Offline
                S Offline
                Softtoon
                wrote on last edited by
                #7

                Hello

                Sorry for the misunderstanding.
                After running the command that you suggested i had to install gcc-arm-linux-gnueabihf
                I did this by entering

                sudo apt install gcc-arm-linux-gnueabihf

                Now when i run
                ~/opt/qt5/qtbase$ ./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 -make tools -prefix /usr/local/qt5pi -hostprefix /usr/local/qt5pi

                I get this error :
                ERROR: You cannot configure qtbase separately within a top-level build.

                What does this mean ?

                1 Reply Last reply
                0
                • SGaistS Offline
                  SGaistS Offline
                  SGaist
                  Lifetime Qt Champion
                  wrote on last edited by
                  #8

                  Are you building from a clear source ?

                  You should rather do out of source builds, it makes things easier when you have to restart.

                  Interested in AI ? www.idiap.ch
                  Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct

                  1 Reply Last reply
                  0
                  • L Offline
                    L Offline
                    le_chembal
                    wrote on last edited by
                    #9

                    try the command below before runnig the ./configure :
                    sudo apt-get install lib32stdc++6

                    1 Reply Last reply
                    0
                    • M Offline
                      M Offline
                      MhmRhm
                      wrote on last edited by MhmRhm
                      #10

                      Had the same issue but it was showing no message between these two lines:

                      ===================

                      ===================

                      I was using 32 bit compiler for -device-option CROSS_COMPILE I changed it to x64 and problem solved. it is now compiling.

                      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