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. Raspberry Pi toolchain on Ubuntu 16.04
Forum Updated to NodeBB v4.3 + New Features

Raspberry Pi toolchain on Ubuntu 16.04

Scheduled Pinned Locked Moved Unsolved Mobile and Embedded
8 Posts 3 Posters 1.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.
  • P Offline
    P Offline
    pkeshavarzi
    wrote on 22 Apr 2019, 13:42 last edited by pkeshavarzi
    #1

    Hello all,

    I have issues creating a tool-chain for cross compiling Raspberry Pi 3 Qt applications through Ubuntu. I used directions from this guide, https://wiki.qt.io/Raspberry_Pi_Beginners_Guide, to help me create the tool-chain. Currently, I am stuck on this step in the section Compiling qtbase in the 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
    

    The error I receive is the following in terminal:

    sudo ./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
    <srcbase> = /home/ubuntu16/opt/qt5/qtbase 
    <bldbase> = /home/ubuntu16/opt/qt5/qtbase 
    <outbase> = /home/ubuntu16/opt/qt5/qtbase 
    Creating qmake...
    .Done.
    Project ERROR: Cannot run target compiler '/home/ubuntu16/opt/gcc-4.7-linaro-rpi-gnueabihf/bin/arm-linux-gnueabihf-g++'. Output:
    ===================
    ===================
    Maybe you forgot to setup the environment?
    

    I am new Qt and have beginners understanding of Ubuntu. I am currently running Ubuntu 16.04 64-bit on within VirtualBox. How do I setup the environment? Should I have the Raspberry Pi 3 connected to my PC via SSH?

    Thank you for any help. Best,
    P. Keshavarzi

    P 1 Reply Last reply 22 Apr 2019, 15:33
    0
    • P pkeshavarzi
      22 Apr 2019, 13:42

      Hello all,

      I have issues creating a tool-chain for cross compiling Raspberry Pi 3 Qt applications through Ubuntu. I used directions from this guide, https://wiki.qt.io/Raspberry_Pi_Beginners_Guide, to help me create the tool-chain. Currently, I am stuck on this step in the section Compiling qtbase in the 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
      

      The error I receive is the following in terminal:

      sudo ./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
      <srcbase> = /home/ubuntu16/opt/qt5/qtbase 
      <bldbase> = /home/ubuntu16/opt/qt5/qtbase 
      <outbase> = /home/ubuntu16/opt/qt5/qtbase 
      Creating qmake...
      .Done.
      Project ERROR: Cannot run target compiler '/home/ubuntu16/opt/gcc-4.7-linaro-rpi-gnueabihf/bin/arm-linux-gnueabihf-g++'. Output:
      ===================
      ===================
      Maybe you forgot to setup the environment?
      

      I am new Qt and have beginners understanding of Ubuntu. I am currently running Ubuntu 16.04 64-bit on within VirtualBox. How do I setup the environment? Should I have the Raspberry Pi 3 connected to my PC via SSH?

      Thank you for any help. Best,
      P. Keshavarzi

      P Offline
      P Offline
      Pablo J. Rogina
      wrote on 22 Apr 2019, 15:33 last edited by
      #2

      @pkeshavarzi said in Raspberry Pi toolchain on Ubuntu 16.04:

      CROSS_COMPILE=~/opt/gcc-4.7-linaro-rpi-gnueabihf/bin/arm-linux-gnueabihf-

      This value must point to where you have downloaded/unpacked the cross-compiling toolchain. From the guide you referenced:

       Download the cross compiling toolchain:
      

      wget https://www.dropbox.com/s/sl919ly0q79m1e6/gcc-4.7-linaro-rpi-gnueabihf.tbz
      (or at http://de.sourceforge.jp/projects/sfnet_rfidmonitor/downloads/crosscompilation-resources/gcc-4.7-linaro-rpi-gnueabihf.tbz)
      tar -xf gcc-4.7-linaro-rpi-gnueabihf.tbz

      Please use the location where you unpacked the toolchain tarball

      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

      P 1 Reply Last reply 22 Apr 2019, 18:02
      4
      • P Pablo J. Rogina
        22 Apr 2019, 15:33

        @pkeshavarzi said in Raspberry Pi toolchain on Ubuntu 16.04:

        CROSS_COMPILE=~/opt/gcc-4.7-linaro-rpi-gnueabihf/bin/arm-linux-gnueabihf-

        This value must point to where you have downloaded/unpacked the cross-compiling toolchain. From the guide you referenced:

         Download the cross compiling toolchain:
        

        wget https://www.dropbox.com/s/sl919ly0q79m1e6/gcc-4.7-linaro-rpi-gnueabihf.tbz
        (or at http://de.sourceforge.jp/projects/sfnet_rfidmonitor/downloads/crosscompilation-resources/gcc-4.7-linaro-rpi-gnueabihf.tbz)
        tar -xf gcc-4.7-linaro-rpi-gnueabihf.tbz

        Please use the location where you unpacked the toolchain tarball

        P Offline
        P Offline
        pkeshavarzi
        wrote on 22 Apr 2019, 18:02 last edited by
        #3

        @Pablo-J.-Rogina Hey Pablo, Thanks for the reply. I double checked the unpacked tarball and it exists within in the folder. So do all the files that will be used. What else do you recommend to get past this?

        Best,
        P. Keshavarzi

        J 1 Reply Last reply 23 Apr 2019, 05:50
        0
        • P pkeshavarzi
          22 Apr 2019, 18:02

          @Pablo-J.-Rogina Hey Pablo, Thanks for the reply. I double checked the unpacked tarball and it exists within in the folder. So do all the files that will be used. What else do you recommend to get past this?

          Best,
          P. Keshavarzi

          J Offline
          J Offline
          jsulm
          Lifetime Qt Champion
          wrote on 23 Apr 2019, 05:50 last edited by
          #4

          @pkeshavarzi What happens if you call

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

          ?

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

          P 1 Reply Last reply 23 Apr 2019, 14:01
          2
          • J jsulm
            23 Apr 2019, 05:50

            @pkeshavarzi What happens if you call

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

            ?

            P Offline
            P Offline
            pkeshavarzi
            wrote on 23 Apr 2019, 14:01 last edited by pkeshavarzi
            #5

            @jsulm I just tried to run that in the terminal:

            ubuntu16@ubuntu16-VirtualBox:~/opt/qt5/qtbase$ sudo /home/opt/gcc-4.7-linaro-rpi-gnueabihf/bin/arm-linux-gnueabihf-g++ -v
            bash: /home/opt/gcc-4.7-linaro-rpi-gnueabihf/bin/arm-linux-gnueabihf-g++: No such file or directory
            

            The error says no file or directory. However, when I check the folder, it shows that it's there:

            0_1556027801280_e1e0b217-15f4-40b1-9991-b97c7606ad65-image.png

            Does this mean there is a problem with the 'symbolic links' from the earlier step of the guide? Another possibility and kind of a stupid question: Even though I ran with super user permissions, maybe there is an issue with permissions for the folder and it's contents?

            P 1 Reply Last reply 23 Apr 2019, 14:04
            0
            • P pkeshavarzi
              23 Apr 2019, 14:01

              @jsulm I just tried to run that in the terminal:

              ubuntu16@ubuntu16-VirtualBox:~/opt/qt5/qtbase$ sudo /home/opt/gcc-4.7-linaro-rpi-gnueabihf/bin/arm-linux-gnueabihf-g++ -v
              bash: /home/opt/gcc-4.7-linaro-rpi-gnueabihf/bin/arm-linux-gnueabihf-g++: No such file or directory
              

              The error says no file or directory. However, when I check the folder, it shows that it's there:

              0_1556027801280_e1e0b217-15f4-40b1-9991-b97c7606ad65-image.png

              Does this mean there is a problem with the 'symbolic links' from the earlier step of the guide? Another possibility and kind of a stupid question: Even though I ran with super user permissions, maybe there is an issue with permissions for the folder and it's contents?

              P Offline
              P Offline
              Pablo J. Rogina
              wrote on 23 Apr 2019, 14:04 last edited by
              #6

              @pkeshavarzi from command line, could you please do:

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

              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

              P 1 Reply Last reply 23 Apr 2019, 14:18
              1
              • P Pablo J. Rogina
                23 Apr 2019, 14:04

                @pkeshavarzi from command line, could you please do:

                ls -la /home/opt/gcc-4.7-linaro-rpi-gnueabihf/bin/arm-linux-gnueabihf-g++
                
                P Offline
                P Offline
                pkeshavarzi
                wrote on 23 Apr 2019, 14:18 last edited by pkeshavarzi
                #7

                @Pablo-J.-Rogina said in Raspberry Pi toolchain on Ubuntu 16.04:

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

                I just ran the command and received the message from terminal 'No such file or directory':

                ubuntu16@ubuntu16-VirtualBox:~$ ls -la /home/opt/gcc-4.7-linaro-rpi-gnueabihf/bin/arm-linux-gnueabihf-g++
                ls: cannot access '/home/opt/gcc-4.7-linaro-rpi-gnueabihf/bin/arm-linux-gnueabihf-g++': No such file or directory
                
                P 1 Reply Last reply 23 Apr 2019, 14:23
                0
                • P pkeshavarzi
                  23 Apr 2019, 14:18

                  @Pablo-J.-Rogina said in Raspberry Pi toolchain on Ubuntu 16.04:

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

                  I just ran the command and received the message from terminal 'No such file or directory':

                  ubuntu16@ubuntu16-VirtualBox:~$ ls -la /home/opt/gcc-4.7-linaro-rpi-gnueabihf/bin/arm-linux-gnueabihf-g++
                  ls: cannot access '/home/opt/gcc-4.7-linaro-rpi-gnueabihf/bin/arm-linux-gnueabihf-g++': No such file or directory
                  
                  P Offline
                  P Offline
                  Pablo J. Rogina
                  wrote on 23 Apr 2019, 14:23 last edited by
                  #8

                  @pkeshavarzi it looks like you're messing up the folders, one example shows /home/ubuntu16/opt/... and then you also use /home/opt/...

                  Anyway, what if you do:

                  sudo find / -name arm-linux-gnueabihf-g++
                  

                  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
                  1

                  5/8

                  23 Apr 2019, 14:01

                  • Login

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