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. [TUTO] Build Qt to cross compile for arm
Forum Updated to NodeBB v4.3 + New Features

[TUTO] Build Qt to cross compile for arm

Scheduled Pinned Locked Moved Mobile and Embedded
armcross compilecross platformlinux
68 Posts 15 Posters 55.7k Views 5 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.
  • A Abhijeet 0
    1 Feb 2024, 07:55

    @jsulm Version: QT 4.8.5

    ARM Compiler : ARM Compiler

    Whenever execute : make -j9 ARCH=arm CROSS_COMPILE=home/odroid/installQt/gcc-linaro-arm-linux-gnueabihf-4.8-2013.10_linux/bin/arm-linux-gnueabihf-

    Error Come : ^
    make[1]: *** [Makefile:132921: .obj/release-shared-emb-arm/qpagesetupdialog_unix.o] Error 1
    make[1]: *** [Makefile:135029: .obj/release-shared-emb-arm/qfiledialog.o] Error 1
    make[1]: Leaving directory '/home/odroid/installQt/qt-everywhere-opensource-src-4.8.5/src/gui'
    make: *** [Makefile:385: sub-gui-make_default-ordered] Error 2

    J Offline
    J Offline
    jsulm
    Lifetime Qt Champion
    wrote on 1 Feb 2024, 08:46 last edited by
    #58

    @Abhijeet-0 said in [TUTO] Build Qt to cross compile for arm:

    make[1]: *** [Makefile:132921: .obj/release-shared-emb-arm/qpagesetupdialog_unix.o] Error 1

    Please post actual error which are somewhere above this line...
    Is there a reason why you're using this ancient Qt version?

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

    A 2 Replies Last reply 1 Feb 2024, 08:56
    0
    • J jsulm
      1 Feb 2024, 08:46

      @Abhijeet-0 said in [TUTO] Build Qt to cross compile for arm:

      make[1]: *** [Makefile:132921: .obj/release-shared-emb-arm/qpagesetupdialog_unix.o] Error 1

      Please post actual error which are somewhere above this line...
      Is there a reason why you're using this ancient Qt version?

      A Offline
      A Offline
      Abhijeet 0
      wrote on 1 Feb 2024, 08:56 last edited by
      #59

      @jsulm Sorry, completely new in this filed. Wanted to work with QT Creator 4.11.0 but many file is missing in QT Creator 4.11.0 such as mkspecs, do you suggest how to do this if go with QT Creator 4.11.0.

      And secondly, please find error screenshot here.

      Yes.png

      Can you please guide to exact direction without errors ?

      A 1 Reply Last reply 1 Feb 2024, 09:27
      0
      • A Abhijeet 0
        1 Feb 2024, 08:56

        @jsulm Sorry, completely new in this filed. Wanted to work with QT Creator 4.11.0 but many file is missing in QT Creator 4.11.0 such as mkspecs, do you suggest how to do this if go with QT Creator 4.11.0.

        And secondly, please find error screenshot here.

        Yes.png

        Can you please guide to exact direction without errors ?

        A Offline
        A Offline
        Abhijeet 0
        wrote on 1 Feb 2024, 09:27 last edited by
        #60

        @Abhijeet-0 Error is very large. So shared screenshoot. Unable to copy and paste text error due to virtual machine limitation.

        1 Reply Last reply
        0
        • J jsulm
          1 Feb 2024, 08:46

          @Abhijeet-0 said in [TUTO] Build Qt to cross compile for arm:

          make[1]: *** [Makefile:132921: .obj/release-shared-emb-arm/qpagesetupdialog_unix.o] Error 1

          Please post actual error which are somewhere above this line...
          Is there a reason why you're using this ancient Qt version?

          A Offline
          A Offline
          Abhijeet 0
          wrote on 2 Feb 2024, 00:46 last edited by
          #61

          @jsulm How to solve error ? Can you please answer ? Suggestion other option ?

          A 1 Reply Last reply 2 Feb 2024, 05:17
          0
          • A Abhijeet 0
            2 Feb 2024, 00:46

            @jsulm How to solve error ? Can you please answer ? Suggestion other option ?

            A Offline
            A Offline
            Abhijeet 0
            wrote on 2 Feb 2024, 05:17 last edited by Abhijeet 0 2 Feb 2024, 05:18
            #62

            @jsulm @ @Abhijeet-0 Changed platform now : Qt-5.12.8-
            ARM : gcc-arm-9.2-2019.12-x86_64-aarch64-none-linux-gnu

            Whenever write command get errors :

            odroid@odroid:~/installQt/qtbase-everywhere-src-5.12.8$ ./configure -opensource -confirm-license -prefix /usr/local/Qt-5.12.8-aarch-little-endian -no-pch -xplatform qws/linux-aarch-gnu-g++
            Creating qmake...
            .Done.
            ERROR: Invalid target platform 'qws/linux-aarch-gnu-g++'.

            How to solve it ?

            J 1 Reply Last reply 2 Feb 2024, 06:17
            0
            • A Abhijeet 0
              2 Feb 2024, 05:17

              @jsulm @ @Abhijeet-0 Changed platform now : Qt-5.12.8-
              ARM : gcc-arm-9.2-2019.12-x86_64-aarch64-none-linux-gnu

              Whenever write command get errors :

              odroid@odroid:~/installQt/qtbase-everywhere-src-5.12.8$ ./configure -opensource -confirm-license -prefix /usr/local/Qt-5.12.8-aarch-little-endian -no-pch -xplatform qws/linux-aarch-gnu-g++
              Creating qmake...
              .Done.
              ERROR: Invalid target platform 'qws/linux-aarch-gnu-g++'.

              How to solve it ?

              J Offline
              J Offline
              jsulm
              Lifetime Qt Champion
              wrote on 2 Feb 2024, 06:17 last edited by
              #63

              @Abhijeet-0 said in [TUTO] Build Qt to cross compile for arm:

              odroid@odroid:~/installQt/qtbase-everywhere-src-5.12.8$ ./configure -opensource -confirm-license -prefix /usr/local/Qt-5.12.8-aarch-little-endian -no-pch -xplatform qws/linux-aarch-gnu-g++

              First of all: do NOT build inside source code folder!
              Create a build folder, go to this folder and call configure from there.
              If you then still get errors then post the FIRST error.

              What you're doing has nothing to do with QtCreator.

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

              A 1 Reply Last reply 2 Feb 2024, 07:31
              0
              • J jsulm
                2 Feb 2024, 06:17

                @Abhijeet-0 said in [TUTO] Build Qt to cross compile for arm:

                odroid@odroid:~/installQt/qtbase-everywhere-src-5.12.8$ ./configure -opensource -confirm-license -prefix /usr/local/Qt-5.12.8-aarch-little-endian -no-pch -xplatform qws/linux-aarch-gnu-g++

                First of all: do NOT build inside source code folder!
                Create a build folder, go to this folder and call configure from there.
                If you then still get errors then post the FIRST error.

                What you're doing has nothing to do with QtCreator.

                A Offline
                A Offline
                Abhijeet 0
                wrote on 2 Feb 2024, 07:31 last edited by Abhijeet 0 2 Feb 2024, 07:35
                #64

                @jsulm @ thank you for your explanation : Actually followed same step mentioned in :

                Fourth : Execute the Qt configure

                Go to /home/<yourUserName>/qt-everywhere-opensource-src-4.8.5/

                Execute this command to install Qt in the /usr/local/Qt-4.8.5-arm/ directory : ./configure -opensource -confirm-license -prefix /usr/local/Qt-4.8.5-arm -embedded arm -little-endian -no-pch -xplatform qws/linux-arm-gnueabi-g++

                Done Changes :

                odroid@odroid:~/installQt/qtbase-everywhere-src-5.12.8$ ./configure -opensource -confirm-license -prefix /usr/local/Qt-5.12.8-aarch-little-endian -no-pch -xplatform qws/linux-aarch-gnu-g++
                Creating qmake...
                .Done.
                ERROR: Invalid target platform 'qws/linux-aarch-gnu-g++'.

                How to solve it ? Where is source folder ? Where to build source code folder ?

                Another Approach :

                @jsulm ,

                Now Changed :

                QT : qt-everywhere-opensource-src-4.8.6

                ARM : gcc-linaro-arm-linux-gnueabihf-4.8-2013.10_linux

                Get following Error :

                make[1]: Entering directory '/home/odroid/installQt/qt-everywhere-opensource-src-4.8.5/src/corelib'
                arm-none-linux-gnueabi-g++ -c -pipe -O2 -Wall -W -D_REENTRANT -fPIC -DQT_SHARED -DQT_BUILD_CORE_LIB -DQT_NO_USING_NAMESPACE -DQT_NO_CAST_TO_ASCII -DQT_ASCII_CAST_WARNINGS -DQT3_SUPPORT -DQT_MOC_COMPAT -DQT_USE_QSTRINGBUILDER -DELF_INTERPRETER="/lib64/ld-linux-x86-64.so.2" -DHB_EXPORT=Q_CORE_EXPORT -DQT_NO_DEBUG -D_LARGEFILE64_SOURCE -D_LARGEFILE_SOURCE -I../../mkspecs/qws/linux-arm-gnueabi-g++ -I. -I../../include -I../../include/QtCore -I.rcc/release-shared-emb-arm -Iglobal -I../3rdparty/zlib -I../3rdparty/harfbuzz/src -I../3rdparty/md5 -I../3rdparty/md4 -I.moc/release-shared-emb-arm -o .obj/release-shared-emb-arm/qabstractanimation.o animation/qabstractanimation.cpp
                make[1]: arm-none-linux-gnueabi-g++: Command not found
                make[1]: *** [Makefile:6917: .obj/release-shared-emb-arm/qabstractanimation.o] Error 127
                make[1]: Leaving directory '/home/odroid/installQt/qt-everywhere-opensource-src-4.8.5/src/corelib'
                make: *** [Makefile:200: sub-corelib-make_default-ordered] Error 2
                Explanation : It seems like we've configured qmake to use the compiler arm-linux-gnueabihf-g++. However, the error message suggests that the build process is looking for arm-none-linux-gnueabi-g++, which indicates a mismatch between the expected compiler name and the actual compiler name Then where is arm-none-linux-gnueabi-g++ ? only arm-linux-gnueabihf-g++ exits

                J 1 Reply Last reply 2 Feb 2024, 07:38
                0
                • A Abhijeet 0
                  2 Feb 2024, 07:31

                  @jsulm @ thank you for your explanation : Actually followed same step mentioned in :

                  Fourth : Execute the Qt configure

                  Go to /home/<yourUserName>/qt-everywhere-opensource-src-4.8.5/

                  Execute this command to install Qt in the /usr/local/Qt-4.8.5-arm/ directory : ./configure -opensource -confirm-license -prefix /usr/local/Qt-4.8.5-arm -embedded arm -little-endian -no-pch -xplatform qws/linux-arm-gnueabi-g++

                  Done Changes :

                  odroid@odroid:~/installQt/qtbase-everywhere-src-5.12.8$ ./configure -opensource -confirm-license -prefix /usr/local/Qt-5.12.8-aarch-little-endian -no-pch -xplatform qws/linux-aarch-gnu-g++
                  Creating qmake...
                  .Done.
                  ERROR: Invalid target platform 'qws/linux-aarch-gnu-g++'.

                  How to solve it ? Where is source folder ? Where to build source code folder ?

                  Another Approach :

                  @jsulm ,

                  Now Changed :

                  QT : qt-everywhere-opensource-src-4.8.6

                  ARM : gcc-linaro-arm-linux-gnueabihf-4.8-2013.10_linux

                  Get following Error :

                  make[1]: Entering directory '/home/odroid/installQt/qt-everywhere-opensource-src-4.8.5/src/corelib'
                  arm-none-linux-gnueabi-g++ -c -pipe -O2 -Wall -W -D_REENTRANT -fPIC -DQT_SHARED -DQT_BUILD_CORE_LIB -DQT_NO_USING_NAMESPACE -DQT_NO_CAST_TO_ASCII -DQT_ASCII_CAST_WARNINGS -DQT3_SUPPORT -DQT_MOC_COMPAT -DQT_USE_QSTRINGBUILDER -DELF_INTERPRETER="/lib64/ld-linux-x86-64.so.2" -DHB_EXPORT=Q_CORE_EXPORT -DQT_NO_DEBUG -D_LARGEFILE64_SOURCE -D_LARGEFILE_SOURCE -I../../mkspecs/qws/linux-arm-gnueabi-g++ -I. -I../../include -I../../include/QtCore -I.rcc/release-shared-emb-arm -Iglobal -I../3rdparty/zlib -I../3rdparty/harfbuzz/src -I../3rdparty/md5 -I../3rdparty/md4 -I.moc/release-shared-emb-arm -o .obj/release-shared-emb-arm/qabstractanimation.o animation/qabstractanimation.cpp
                  make[1]: arm-none-linux-gnueabi-g++: Command not found
                  make[1]: *** [Makefile:6917: .obj/release-shared-emb-arm/qabstractanimation.o] Error 127
                  make[1]: Leaving directory '/home/odroid/installQt/qt-everywhere-opensource-src-4.8.5/src/corelib'
                  make: *** [Makefile:200: sub-corelib-make_default-ordered] Error 2
                  Explanation : It seems like we've configured qmake to use the compiler arm-linux-gnueabihf-g++. However, the error message suggests that the build process is looking for arm-none-linux-gnueabi-g++, which indicates a mismatch between the expected compiler name and the actual compiler name Then where is arm-none-linux-gnueabi-g++ ? only arm-linux-gnueabihf-g++ exits

                  J Offline
                  J Offline
                  jsulm
                  Lifetime Qt Champion
                  wrote on 2 Feb 2024, 07:38 last edited by
                  #65

                  @Abhijeet-0 So, you're still building inside the source folder? You really should not. Please start with a fresh source folder without any build artefacts and build in a build folder.
                  "Now Changed" - do you mean you changed the configure parameters? If so post the new configure call.

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

                  A 1 Reply Last reply 2 Feb 2024, 07:45
                  0
                  • J jsulm
                    2 Feb 2024, 07:38

                    @Abhijeet-0 So, you're still building inside the source folder? You really should not. Please start with a fresh source folder without any build artefacts and build in a build folder.
                    "Now Changed" - do you mean you changed the configure parameters? If so post the new configure call.

                    A Offline
                    A Offline
                    Abhijeet 0
                    wrote on 2 Feb 2024, 07:45 last edited by
                    #66

                    @jsulm , thank you for your explanation. Left that part. From Yesterday doing it does not solve anything. Kindly focus on below, requesting you to help solve below errors.

                    Now focusing on

                    @jsulm ,

                    Now Changed :

                    QT : qt-everywhere-opensource-src-4.8.6

                    ARM : gcc-linaro-arm-linux-gnueabihf-4.8-2013.10_linux

                    Get following Error :

                    make[1]: Entering directory '/home/odroid/installQt/qt-everywhere-opensource-src-4.8.5/src/corelib'
                    arm-none-linux-gnueabi-g++ -c -pipe -O2 -Wall -W -D_REENTRANT -fPIC -DQT_SHARED -DQT_BUILD_CORE_LIB -DQT_NO_USING_NAMESPACE -DQT_NO_CAST_TO_ASCII -DQT_ASCII_CAST_WARNINGS -DQT3_SUPPORT -DQT_MOC_COMPAT -DQT_USE_QSTRINGBUILDER -DELF_INTERPRETER="/lib64/ld-linux-x86-64.so.2" -DHB_EXPORT=Q_CORE_EXPORT -DQT_NO_DEBUG -D_LARGEFILE64_SOURCE -D_LARGEFILE_SOURCE -I../../mkspecs/qws/linux-arm-gnueabi-g++ -I. -I../../include -I../../include/QtCore -I.rcc/release-shared-emb-arm -Iglobal -I../3rdparty/zlib -I../3rdparty/harfbuzz/src -I../3rdparty/md5 -I../3rdparty/md4 -I.moc/release-shared-emb-arm -o .obj/release-shared-emb-arm/qabstractanimation.o animation/qabstractanimation.cpp
                    make[1]: arm-none-linux-gnueabi-g++: Command not found
                    make[1]: *** [Makefile:6917: .obj/release-shared-emb-arm/qabstractanimation.o] Error 127
                    make[1]: Leaving directory '/home/odroid/installQt/qt-everywhere-opensource-src-4.8.5/src/corelib'
                    make: *** [Makefile:200: sub-corelib-make_default-ordered] Error 2
                    Explanation : It seems like we've configured qmake to use the compiler arm-linux-gnueabihf-g++. However, the error message suggests that the build process is looking for arm-none-linux-gnueabi-g++, which indicates a mismatch between the expected compiler name and the actual compiler name Then where is arm-none-linux-gnueabi-g++ ? only arm-linux-gnueabihf-g++ exits How to do this ?

                    J 1 Reply Last reply 2 Feb 2024, 07:58
                    0
                    • A Abhijeet 0
                      2 Feb 2024, 07:45

                      @jsulm , thank you for your explanation. Left that part. From Yesterday doing it does not solve anything. Kindly focus on below, requesting you to help solve below errors.

                      Now focusing on

                      @jsulm ,

                      Now Changed :

                      QT : qt-everywhere-opensource-src-4.8.6

                      ARM : gcc-linaro-arm-linux-gnueabihf-4.8-2013.10_linux

                      Get following Error :

                      make[1]: Entering directory '/home/odroid/installQt/qt-everywhere-opensource-src-4.8.5/src/corelib'
                      arm-none-linux-gnueabi-g++ -c -pipe -O2 -Wall -W -D_REENTRANT -fPIC -DQT_SHARED -DQT_BUILD_CORE_LIB -DQT_NO_USING_NAMESPACE -DQT_NO_CAST_TO_ASCII -DQT_ASCII_CAST_WARNINGS -DQT3_SUPPORT -DQT_MOC_COMPAT -DQT_USE_QSTRINGBUILDER -DELF_INTERPRETER="/lib64/ld-linux-x86-64.so.2" -DHB_EXPORT=Q_CORE_EXPORT -DQT_NO_DEBUG -D_LARGEFILE64_SOURCE -D_LARGEFILE_SOURCE -I../../mkspecs/qws/linux-arm-gnueabi-g++ -I. -I../../include -I../../include/QtCore -I.rcc/release-shared-emb-arm -Iglobal -I../3rdparty/zlib -I../3rdparty/harfbuzz/src -I../3rdparty/md5 -I../3rdparty/md4 -I.moc/release-shared-emb-arm -o .obj/release-shared-emb-arm/qabstractanimation.o animation/qabstractanimation.cpp
                      make[1]: arm-none-linux-gnueabi-g++: Command not found
                      make[1]: *** [Makefile:6917: .obj/release-shared-emb-arm/qabstractanimation.o] Error 127
                      make[1]: Leaving directory '/home/odroid/installQt/qt-everywhere-opensource-src-4.8.5/src/corelib'
                      make: *** [Makefile:200: sub-corelib-make_default-ordered] Error 2
                      Explanation : It seems like we've configured qmake to use the compiler arm-linux-gnueabihf-g++. However, the error message suggests that the build process is looking for arm-none-linux-gnueabi-g++, which indicates a mismatch between the expected compiler name and the actual compiler name Then where is arm-none-linux-gnueabi-g++ ? only arm-linux-gnueabihf-g++ exits How to do this ?

                      J Offline
                      J Offline
                      jsulm
                      Lifetime Qt Champion
                      wrote on 2 Feb 2024, 07:58 last edited by
                      #67

                      @Abhijeet-0 You can follow suggestions or not, you can answer questions or not - up to you...

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

                      A 1 Reply Last reply 2 Feb 2024, 09:03
                      0
                      • J jsulm
                        2 Feb 2024, 07:58

                        @Abhijeet-0 You can follow suggestions or not, you can answer questions or not - up to you...

                        A Offline
                        A Offline
                        Abhijeet 0
                        wrote on 2 Feb 2024, 09:03 last edited by Abhijeet 0 2 Feb 2024, 09:05
                        #68

                        @jsulm , Unable to understand your suggestion. Sorry, for not getting you.

                        then how to do this ? Create a build folder, go to this folder and call configure from there. How to change configure command ?

                        odroid@odroid:~/installQt/qtbase-everywhere-src-5.12.8$ ./configure -opensource -confirm-license -prefix /usr/local/Qt-5.12.8-aarch-little-endian -no-pch -xplatform qws/linux-aarch-gnu-g++

                        If you build folder, how you write above commond ?

                        1 Reply Last reply
                        0

                        67/68

                        2 Feb 2024, 07:58

                        • Login

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