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. How to cross compile qt code from x64 linux to linux ARM
Forum Updated to NodeBB v4.3 + New Features

How to cross compile qt code from x64 linux to linux ARM

Scheduled Pinned Locked Moved Unsolved Installation and Deployment
7 Posts 3 Posters 1.9k Views 2 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.
  • Q Offline
    Q Offline
    qjqj
    wrote on last edited by
    #1

    Hi,

    I am trying to cross compile my qt code to be deploy in linux ARM machine.

    I have searched online how to cross compile but I am not sure at one step which is load the qmake of the arm qt. When I load that it prompt "Exec format error". I have added gcc and g++ compiler for ARM inside qt and I am left with the qmake step which I am confuse about.

    0_1568712765654_Screenshot from 2019-09-17 17-30-45.png

    Does anyone know?

    Thanks!

    K Pablo J. RoginaP 2 Replies Last reply
    0
    • Q qjqj

      Hi,

      I am trying to cross compile my qt code to be deploy in linux ARM machine.

      I have searched online how to cross compile but I am not sure at one step which is load the qmake of the arm qt. When I load that it prompt "Exec format error". I have added gcc and g++ compiler for ARM inside qt and I am left with the qmake step which I am confuse about.

      0_1568712765654_Screenshot from 2019-09-17 17-30-45.png

      Does anyone know?

      Thanks!

      K Offline
      K Offline
      koahnig
      wrote on last edited by
      #2

      @qjqj

      Do you have already a cross-compile toolchain for ARM installed?
      Do you have Qt library source cross-compiled?

      Vote the answer(s) that helped you to solve your issue(s)

      Q 2 Replies Last reply
      1
      • Q qjqj

        Hi,

        I am trying to cross compile my qt code to be deploy in linux ARM machine.

        I have searched online how to cross compile but I am not sure at one step which is load the qmake of the arm qt. When I load that it prompt "Exec format error". I have added gcc and g++ compiler for ARM inside qt and I am left with the qmake step which I am confuse about.

        0_1568712765654_Screenshot from 2019-09-17 17-30-45.png

        Does anyone know?

        Thanks!

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

        @qjqj this guide may help you regarding cross-compiling ARM on Linux...

        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

        Q 1 Reply Last reply
        1
        • K koahnig

          @qjqj

          Do you have already a cross-compile toolchain for ARM installed?
          Do you have Qt library source cross-compiled?

          Q Offline
          Q Offline
          qjqj
          wrote on last edited by
          #4

          @koahnig I have the tool chain for the arm. Do I also need to download the cross compile for arm qt?

          K 1 Reply Last reply
          0
          • K koahnig

            @qjqj

            Do you have already a cross-compile toolchain for ARM installed?
            Do you have Qt library source cross-compiled?

            Q Offline
            Q Offline
            qjqj
            wrote on last edited by
            #5

            @koahnig Do you mean the qt library in qt linux arm? If so I have also.

            1 Reply Last reply
            0
            • Q qjqj

              @koahnig I have the tool chain for the arm. Do I also need to download the cross compile for arm qt?

              K Offline
              K Offline
              koahnig
              wrote on last edited by
              #6

              @qjqj said in How to cross compile qt code from x64 linux to linux ARM:

              @koahnig I have the tool chain for the arm. Do I also need to download the cross compile for arm qt?

              @qjqj said in How to cross compile qt code from x64 linux to linux ARM:

              @koahnig Do you mean the qt library in qt linux arm? If so I have also.

              You need to have a specific cross-compiler for your ARM device installed on the desktop computer you like to use for cross-compiling. As a general rule with this cross-compiler you need to cross-compile all source including all libraries. Note some cross-compiled libs might be already provided already where you can download the cross-compiler.

              Therefore you need to install a specific cross-compiler for your ARM device. You need also in most cases to cross-compile qt libraries including its tools with your cross-compiler on your desktop. The important part after successful cross-compilation is the freshly generated qmake, which holds all information of your cross-compile toolchain. You need to make sure that this is used by Qt creator.
              Note: Sometimes you can also find pre-cross-compiled Qt libs for some ARM or other embedded devices. However, they are mostly outdated versions, but may work better for tricky devices.

              See also the guide mentioned in here:
              @pablo-j-rogina said in How to cross compile qt code from x64 linux to linux ARM:

              @qjqj this guide may help you regarding cross-compiling ARM on Linux...

              There are other similar guides around.

              Vote the answer(s) that helped you to solve your issue(s)

              1 Reply Last reply
              2
              • Pablo J. RoginaP Pablo J. Rogina

                @qjqj this guide may help you regarding cross-compiling ARM on Linux...

                Q Offline
                Q Offline
                qjqj
                wrote on last edited by
                #7

                @pablo-j-rogina

                Thanks for the guide! It was helpful

                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