Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Special Interest Groups
  3. QtonPi
  4. RaspberryPi2EGLFS tutorial fail at Step 10 "./configure"
QtWS25 Last Chance

RaspberryPi2EGLFS tutorial fail at Step 10 "./configure"

Scheduled Pinned Locked Moved Unsolved QtonPi
raspberry eglfsconfigure toolcross-compilemac os x
13 Posts 4 Posters 3.5k 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.
  • O Offline
    O Offline
    OutsourcedGuru
    wrote on 28 Dec 2018, 23:41 last edited by
    #1

    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.

    P 1 Reply Last reply 29 Dec 2018, 11:24
    0
    • O OutsourcedGuru
      28 Dec 2018, 23:41

      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.

      P Offline
      P Offline
      Pablo J. Rogina
      wrote on 29 Dec 2018, 11:24 last edited by
      #2

      @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
      

      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

      O 1 Reply Last reply 30 Dec 2018, 02:18
      1
      • P Pablo J. Rogina
        29 Dec 2018, 11:24

        @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
        
        O Offline
        O Offline
        OutsourcedGuru
        wrote on 30 Dec 2018, 02:18 last edited by
        #3

        @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 file
        

        Altering 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 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
        
        1 Reply Last reply
        0
        • S Offline
          S Offline
          SGaist
          Lifetime Qt Champion
          wrote on 30 Dec 2018, 14:21 last edited by
          #4

          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.

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

          O 1 Reply Last reply 31 Dec 2018, 17:11
          1
          • S SGaist
            30 Dec 2018, 14:21

            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.

            O Offline
            O Offline
            OutsourcedGuru
            wrote on 31 Dec 2018, 17:11 last edited by
            #5

            @SGaist I followed the tutorial.

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

            1 Reply Last reply
            0
            • S Offline
              S Offline
              SGaist
              Lifetime Qt Champion
              wrote on 1 Jan 2019, 21:31 last edited by
              #6

              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++ ?

              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
              • O Offline
                O Offline
                OutsourcedGuru
                wrote on 3 Jan 2019, 20:03 last edited by
                #7

                @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
                
                1 Reply Last reply
                0
                • P Offline
                  P Offline
                  PatZim
                  wrote on 13 Apr 2020, 13:53 last edited by PatZim
                  #8

                  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, stripped
                  

                  and 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, stripped
                  

                  Any 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?

                  P 1 Reply Last reply 13 Apr 2020, 14:02
                  0
                  • P PatZim
                    13 Apr 2020, 13:53

                    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, stripped
                    

                    and 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, stripped
                    

                    Any 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?

                    P Offline
                    P Offline
                    Pablo J. Rogina
                    wrote on 13 Apr 2020, 14:02 last edited by
                    #9

                    @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?

                    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
                    • P Offline
                      P Offline
                      PatZim
                      wrote on 13 Apr 2020, 14:19 last edited by PatZim
                      #10

                      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-linker
                      

                      I 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-mac

                      As 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.

                      1 Reply Last reply
                      0
                      • S Offline
                        S Offline
                        SGaist
                        Lifetime Qt Champion
                        wrote on 13 Apr 2020, 14:32 last edited by
                        #11

                        You really should consider using a virtual machine with Linux on it. It's going to be faster to setup.

                        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
                        • P Offline
                          P Offline
                          PatZim
                          wrote on 13 Apr 2020, 14:36 last edited by PatZim
                          #12

                          @SGaist

                          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.

                          P 1 Reply Last reply 13 Apr 2020, 15:09
                          0
                          • P PatZim
                            13 Apr 2020, 14:36

                            @SGaist

                            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.

                            P Offline
                            P Offline
                            Pablo J. Rogina
                            wrote on 13 Apr 2020, 15:09 last edited by
                            #13

                            @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

                            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

                            • Login

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