Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. Qt Creator and other tools
  4. Setting qmake in QT Creator for cross-compilation raspberry pi
Forum Update on Monday, May 27th 2025

Setting qmake in QT Creator for cross-compilation raspberry pi

Scheduled Pinned Locked Moved Unsolved Qt Creator and other tools
11 Posts 5 Posters 1.6k 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.
  • V Offline
    V Offline
    VVKElectro
    wrote on last edited by
    #1

    Hi everyone.

    I want to run cross compilation/debugging for raspberry pi on a host with Ubuntu 22.04. I have compiled QT6.3 from source and tested hello world, it is working properly.
    Then I tried cross-debugging my project in vscode, it also works.

    Now I want to run debugging in QT Creator, but here I can't set a qmake file (in Tools -> Kits -> Qt Version). If I try to set the qmake for ARM, I see the message "Qmake Not Executable".

    Can someone tell me how to set qmake in QT Creator for cross-compilation for raspberry pi?

    1 Reply Last reply
    0
    • sierdzioS Offline
      sierdzioS Offline
      sierdzio
      Moderators
      wrote on last edited by
      #2

      Have you compiled Qt natively on Raspberry Pi (you run qmake on RPi itself) or cross-compiled it (you run qmake on Ubuntu)?

      (Z(:^

      1 Reply Last reply
      0
      • V Offline
        V Offline
        VVKElectro
        wrote on last edited by
        #3

        @sierdzio said in Setting qmake in QT Creator for cross-compilation raspberry pi:

        Have you compiled Qt natively on Raspberry Pi (you run qmake on RPi itself) or cross-compiled it (you run qmake on Ubuntu)?

        I have cross-compiled QT on Ubuntu. I did it according this instruction: https://github.com/PhysicsX/QTonRaspberryPi#build-qml-qtdeclerative--module

        This is screenshot of the error, if I try to add cross-compiled qmake:
        deee6711-fcbe-4de6-b65c-5c726e25dd2e-image.png

        1 Reply Last reply
        0
        • sierdzioS Offline
          sierdzioS Offline
          sierdzio
          Moderators
          wrote on last edited by
          #4

          You may need to add your compilers first but that would be odd. Sorry, I don't know how to fix this, normally Qt Creator has no problems working with cross-compiled Qt.

          (Z(:^

          1 Reply Last reply
          0
          • Z Offline
            Z Offline
            ziller
            wrote on last edited by
            #5

            Can you run "/home/vvk/qt-cross/bin/qmake -query" on a terminal? Does that succeed and print something?
            What build system are you actually using for your project?

            V 1 Reply Last reply
            0
            • Z ziller

              Can you run "/home/vvk/qt-cross/bin/qmake -query" on a terminal? Does that succeed and print something?
              What build system are you actually using for your project?

              V Offline
              V Offline
              VVKElectro
              wrote on last edited by
              #6

              @ziller said in Setting qmake in QT Creator for cross-compilation raspberry pi:

              Can you run "/home/vvk/qt-cross/bin/qmake -query" on a terminal? Does that succeed and print something?
              What build system are you actually using for your project?

              Result is "Exec format error":
              426fe13f-9168-4470-acd7-78d30ae5f899-image.png
              I think it is because qmake is compiled for ARM

              sierdzioS 1 Reply Last reply
              0
              • V VVKElectro

                @ziller said in Setting qmake in QT Creator for cross-compilation raspberry pi:

                Can you run "/home/vvk/qt-cross/bin/qmake -query" on a terminal? Does that succeed and print something?
                What build system are you actually using for your project?

                Result is "Exec format error":
                426fe13f-9168-4470-acd7-78d30ae5f899-image.png
                I think it is because qmake is compiled for ARM

                sierdzioS Offline
                sierdzioS Offline
                sierdzio
                Moderators
                wrote on last edited by
                #7

                @VVKElectro said in Setting qmake in QT Creator for cross-compilation raspberry pi:

                I think it is because qmake is compiled for ARM

                Then this is NOT cross-compiled Qt but a native build.

                (Z(:^

                1 Reply Last reply
                0
                • Z Offline
                  Z Offline
                  ziller
                  wrote on last edited by
                  #8

                  Since you (supposedly?) have Qt for cross-compiling to raspberry pi, you must have some directory where uic, moc, and other host-tools for building Qt applications are located. There should also be a qmake build for the host at the same location.

                  From looking over the instructions that you used, I'd guess that that could be "/home/vvk/qt6rpi/bin", but I'm not sure.

                  1 Reply Last reply
                  0
                  • T Offline
                    T Offline
                    Tian-123
                    wrote on last edited by
                    #9

                    Hi there,

                    i am using the same tutorial as input - and guess what am running into the same trouble.
                    the make is created and also located in the folder as expected - it is simply this error that pops up.
                    I am totally lost. /home/tian/at6rpt/bin - the make located there I am not able to add this.

                    Does anyone has an hint or a solution on this?

                    Regards,
                    Tian

                    1 Reply Last reply
                    0
                    • E Offline
                      E Offline
                      Eguven
                      wrote on last edited by
                      #10

                      I am experiencing same issue, I qmake under the qt-cross directory is compiled already for ARM architecture,

                      file ./qmake

                      ./qmake: ELF 64-bit LSB pie executable, ARM aarch64, version 1 (SYSV), dynamically linked, interpreter /lib/ld-linux-aarch64.so.1, BuildID[sha1]=108cf6bd2a58d3f3e2d3f52d33e3dfbc799fef65, for GNU/Linux 3.7.0, not stripped

                      It is a pity that the QTCreator tries executing it to collect some data. It will fail for sure. I believe this is QtCreator bug which will break cross-compilation possibility

                      sierdzioS 1 Reply Last reply
                      0
                      • E Eguven

                        I am experiencing same issue, I qmake under the qt-cross directory is compiled already for ARM architecture,

                        file ./qmake

                        ./qmake: ELF 64-bit LSB pie executable, ARM aarch64, version 1 (SYSV), dynamically linked, interpreter /lib/ld-linux-aarch64.so.1, BuildID[sha1]=108cf6bd2a58d3f3e2d3f52d33e3dfbc799fef65, for GNU/Linux 3.7.0, not stripped

                        It is a pity that the QTCreator tries executing it to collect some data. It will fail for sure. I believe this is QtCreator bug which will break cross-compilation possibility

                        sierdzioS Offline
                        sierdzioS Offline
                        sierdzio
                        Moderators
                        wrote on last edited by
                        #11

                        @Eguven said in Setting qmake in QT Creator for cross-compilation raspberry pi:

                        It is a pity that the QTCreator tries executing it to collect some data. It will fail for sure. I believe this is QtCreator bug which will break cross-compilation possibility

                        It is not a bug. You are trying to use a native build of Qt for ARM on a x86 machine. It will not work, not in Qt Creator and also not if you try to compile by hand. It's not just qmake that has wrong architecture, it is also moc, uic, and other essential tools.

                        If you want to cross-compile your apps, first cross-compile Qt properly. If you want to build on-device, do then you can use ARM Qt directly on device (including Qt Creator) and it will work - but likely be very slow.

                        (Z(:^

                        1 Reply Last reply
                        3

                        • Login

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