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. How to cross-compile Qt 6.5 for aarch64 (including tools)

How to cross-compile Qt 6.5 for aarch64 (including tools)

Scheduled Pinned Locked Moved Unsolved Mobile and Embedded
4 Posts 2 Posters 1.2k 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.
  • A Offline
    A Offline
    adazem009
    wrote on last edited by
    #1

    I'd like to cross-compile Qt 6.5 so that I can use the Qt installation on an aarch64 system. I've found some tutorials for cross-compiling, but all of them only build the Qt libraries for aarch64. When I try to use the Qt installation on an aarch64 system, qmake is actually a script which executes the host qmake (x86_64). I need to cross-compile qmake and the other tools too.

    I've followed this tutorial: https://wiki.qt.io/Cross-Compile_Qt_6_for_Raspberry_Pi
    It builts Qt which can be used to cross-compile an application. However, I need to use the Qt I built on an aarch64 system. Is this possible? I need this in CI and I don't want to build Qt in aarch64 container using QEMU because it's too slow.

    jsulmJ 1 Reply Last reply
    0
    • A adazem009

      I'd like to cross-compile Qt 6.5 so that I can use the Qt installation on an aarch64 system. I've found some tutorials for cross-compiling, but all of them only build the Qt libraries for aarch64. When I try to use the Qt installation on an aarch64 system, qmake is actually a script which executes the host qmake (x86_64). I need to cross-compile qmake and the other tools too.

      I've followed this tutorial: https://wiki.qt.io/Cross-Compile_Qt_6_for_Raspberry_Pi
      It builts Qt which can be used to cross-compile an application. However, I need to use the Qt I built on an aarch64 system. Is this possible? I need this in CI and I don't want to build Qt in aarch64 container using QEMU because it's too slow.

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

      @adazem009 said in How to cross-compile Qt 6.5 for aarch64 (including tools):

      When I try to use the Qt installation on an aarch64 system, qmake is actually a script which executes the host qmake (x86_64)

      That's the whole point of cross compilation: the libs are built for the target platform but the tools needed for building are built for host/development platform, because cross compilation is done on that platform, not on target platform. So, why do you need qmake on the target platform?

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

      A 1 Reply Last reply
      0
      • jsulmJ jsulm

        @adazem009 said in How to cross-compile Qt 6.5 for aarch64 (including tools):

        When I try to use the Qt installation on an aarch64 system, qmake is actually a script which executes the host qmake (x86_64)

        That's the whole point of cross compilation: the libs are built for the target platform but the tools needed for building are built for host/development platform, because cross compilation is done on that platform, not on target platform. So, why do you need qmake on the target platform?

        A Offline
        A Offline
        adazem009
        wrote on last edited by
        #3

        @jsulm said in How to cross-compile Qt 6.5 for aarch64 (including tools):

        @adazem009 said in How to cross-compile Qt 6.5 for aarch64 (including tools):

        When I try to use the Qt installation on an aarch64 system, qmake is actually a script which executes the host qmake (x86_64)

        That's the whole point of cross compilation: the libs are built for the target platform but the tools needed for building are built for host/development platform, because cross compilation is done on that platform, not on target platform. So, why do you need qmake on the target platform?

        I want to build an AppImage for aarch64 using linuxdeploy and linuxdeploy-plugin-qt. However, it uses qmake, probably to determine the Qt modules my application uses. I've already tried to point linuxdeploy to the cross-compilation toolchain (it uses tools such as strip), but the x86_64 qmake couldn't determine any Qt modules from the executable.

        jsulmJ 1 Reply Last reply
        0
        • A adazem009

          @jsulm said in How to cross-compile Qt 6.5 for aarch64 (including tools):

          @adazem009 said in How to cross-compile Qt 6.5 for aarch64 (including tools):

          When I try to use the Qt installation on an aarch64 system, qmake is actually a script which executes the host qmake (x86_64)

          That's the whole point of cross compilation: the libs are built for the target platform but the tools needed for building are built for host/development platform, because cross compilation is done on that platform, not on target platform. So, why do you need qmake on the target platform?

          I want to build an AppImage for aarch64 using linuxdeploy and linuxdeploy-plugin-qt. However, it uses qmake, probably to determine the Qt modules my application uses. I've already tried to point linuxdeploy to the cross-compilation toolchain (it uses tools such as strip), but the x86_64 qmake couldn't determine any Qt modules from the executable.

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

          @adazem009 said in How to cross-compile Qt 6.5 for aarch64 (including tools):

          but the x86_64 qmake couldn't determine any Qt modules from the executable

          You have to use qmake from your cross compiled Qt

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

          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