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
QtWS25 Last Chance

[TUTO] Build Qt to cross compile for arm

Scheduled Pinned Locked Moved Mobile and Embedded
armcross compilecross platformlinux
68 Posts 15 Posters 50.1k 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.
  • S Offline
    S Offline
    SGaist
    Lifetime Qt Champion
    wrote on 24 Jun 2016, 20:07 last edited by
    #27

    Did you cross-compile Qt ? If so did you install it ?

    Interested in AI ? www.idiap.ch
    Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct

    1 Reply Last reply
    1
    • S Offline
      S Offline
      samapollo
      wrote on 27 Jun 2016, 08:14 last edited by
      #28

      I thought I built it for ARM and it would just run on its own.
      Do I need Qt installed on my ARM hardware?
      When I move the folder to my ARM hardware I get this error when I try to run it:
      ./classwizard: undefined symbol: _ZN7QWidget8qwsEventEP8QSEvent

      1 Reply Last reply
      0
      • S Offline
        S Offline
        SGaist
        Lifetime Qt Champion
        wrote on 27 Jun 2016, 09:09 last edited by
        #29

        Looks like you cross-compiled your application with Qt 4 and try to run it against Qt 5.

        Interested in AI ? www.idiap.ch
        Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct

        1 Reply Last reply
        1
        • S Offline
          S Offline
          samapollo
          wrote on 27 Jun 2016, 11:40 last edited by samapollo
          #30

          I have Qt 4 on my arm device, but I am still getting the same error. Not sure what to do here?
          I have Qt 4 on Raspbian on a Raspberry Pi 3 model B.
          Not sure why this error keeps coming up.

          1 Reply Last reply
          0
          • S Offline
            S Offline
            SGaist
            Lifetime Qt Champion
            wrote on 27 Jun 2016, 11:46 last edited by
            #31

            Because the Qt 4 you have installed with Raspbian is a standard Qt build for ARM not a Qt for embedded device build.

            You have have to cross-compile your Qt 4 again without the embedded option.

            Interested in AI ? www.idiap.ch
            Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct

            1 Reply Last reply
            1
            • S Offline
              S Offline
              samapollo
              wrote on 27 Jun 2016, 12:12 last edited by samapollo
              #32

              But the Qt I have on my linux where I built the project is for ARM. Its the one for this project.
              So should I just use the build from this post on my pi?

              1 Reply Last reply
              0
              • S Offline
                S Offline
                SGaist
                Lifetime Qt Champion
                wrote on 27 Jun 2016, 12:20 last edited by
                #33

                I didn't say the contrary: both builds are valid. The one you have on your desktop machine is a Qt For Embedded Linux build which uses QWS while on your Raspbian you have a standard as in "desktop standard" build of Qt 4.

                It depends on how you want to use your application on your Pi. If its the QWS functionality that you need then you have to install your self-built Qt 4 on the Pi.

                Interested in AI ? www.idiap.ch
                Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct

                1 Reply Last reply
                1
                • S Offline
                  S Offline
                  samapollo
                  wrote on 27 Jun 2016, 12:30 last edited by samapollo
                  #34

                  What if I just created a deb package on my Linux machine, and then used that on the Pi?
                  Or is it better to just do the custom build? (really dont want to do that painful process)
                  Is this a guide I can use as a base for this build?:
                  http://processors.wiki.ti.com/index.php/Building_Qt_with_OpenGL_ES_accelerated_by_SGX

                  1 Reply Last reply
                  0
                  • S Offline
                    S Offline
                    samapollo
                    wrote on 27 Jun 2016, 14:50 last edited by
                    #35

                    So I managed to compile and run a Hello World project. Creating the make and executable on my Linux with this ARM build. Then moving it onto the Pi and running it. But when I try anything more complex I am getting the same error.

                    1 Reply Last reply
                    0
                    • S Offline
                      S Offline
                      SGaist
                      Lifetime Qt Champion
                      wrote on 27 Jun 2016, 16:13 last edited by
                      #36

                      Again: this is an Qt for Embedded Linux build see the -embedded arm configure option. Thus my question, are you going to use the X Server of your Pi ?

                      If yes, you have to rebuild Qt without the embedded options but keep the ARM target.

                      If no, then one basic option is to copy the content of the cross-compiled Qt installation folder over to your Pi at the same place and you should be good to go (you can later remove stuff like the host tools headers etc.)

                      Interested in AI ? www.idiap.ch
                      Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct

                      1 Reply Last reply
                      0
                      • S Offline
                        S Offline
                        samapollo
                        wrote on 14 Jul 2016, 11:22 last edited by
                        #37

                        How can I do this compilation with opengl?

                        1 Reply Last reply
                        0
                        • S Offline
                          S Offline
                          SGaist
                          Lifetime Qt Champion
                          wrote on 14 Jul 2016, 20:58 last edited by
                          #38

                          Which version of Qt are you currently using ?

                          Interested in AI ? www.idiap.ch
                          Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct

                          1 Reply Last reply
                          0
                          • H Offline
                            H Offline
                            HafsaElif
                            wrote on 17 Jul 2019, 06:49 last edited by
                            #39

                            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++

                            In this step Did you create /usr/local/Qt-4.8.5-arm/ directory ? or Did created by qt creator when installitaion?

                            1 Reply Last reply
                            0
                            • A Offline
                              A Offline
                              Asha
                              wrote on 12 Sept 2019, 10:28 last edited by
                              #40
                              This post is deleted!
                              1 Reply Last reply
                              0
                              • A Offline
                                A Offline
                                Asha
                                wrote on 12 Sept 2019, 10:53 last edited by
                                #41

                                Hi,

                                I am not understood that fourth step,

                                Go to /home/<yourUserName>/
                                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++
                                qt-everywhere-opensource-src-4.8.5/

                                why beacuse,when i go /home/<username> there is no such file called (this present in installQt directory) and in /usr/local also not present the Qt-4.8.5

                                anyone help how to processed next..
                                thankyou

                                jsulmJ 1 Reply Last reply 12 Sept 2019, 10:57
                                0
                                • A Asha
                                  12 Sept 2019, 10:53

                                  Hi,

                                  I am not understood that fourth step,

                                  Go to /home/<yourUserName>/
                                  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++
                                  qt-everywhere-opensource-src-4.8.5/

                                  why beacuse,when i go /home/<username> there is no such file called (this present in installQt directory) and in /usr/local also not present the Qt-4.8.5

                                  anyone help how to processed next..
                                  thankyou

                                  jsulmJ Online
                                  jsulmJ Online
                                  jsulm
                                  Lifetime Qt Champion
                                  wrote on 12 Sept 2019, 10:57 last edited by
                                  #42

                                  @asha You should not copy the steps exactly, you have to adapt them to your environment:
                                  Go to /home/<yourUserName>/ - this means go to your home directory
                                  Qt-4.8.5 - change that to the Qt version you want to compile.

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

                                  1 Reply Last reply
                                  0
                                  • A Offline
                                    A Offline
                                    Asha
                                    wrote on 12 Sept 2019, 12:31 last edited by
                                    #43

                                    Sir,

                                    I have uninstalled everything(which means cross compiler and my first qt version)

                                    now i followed the steps,as said in above..

                                    so now I am not getting where to execute.

                                    can I execute where i am getting the configure file.

                                    jsulmJ 1 Reply Last reply 12 Sept 2019, 12:44
                                    0
                                    • A Asha
                                      12 Sept 2019, 12:31

                                      Sir,

                                      I have uninstalled everything(which means cross compiler and my first qt version)

                                      now i followed the steps,as said in above..

                                      so now I am not getting where to execute.

                                      can I execute where i am getting the configure file.

                                      jsulmJ Online
                                      jsulmJ Online
                                      jsulm
                                      Lifetime Qt Champion
                                      wrote on 12 Sept 2019, 12:44 last edited by
                                      #44

                                      @asha said in [TUTO] Build Qt to cross compile for arm:

                                      so now I am not getting where to execute

                                      execute what? configure?
                                      "can I execute where i am getting the configure file" - configure file is part of Qt source code. So, download Qt source code, extract it to a directory, go to that directory and execute configure there...

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

                                      1 Reply Last reply
                                      0
                                      • A Offline
                                        A Offline
                                        Asha
                                        wrote on 12 Sept 2019, 13:18 last edited by
                                        #45

                                        Hi,
                                        I execute the configure file,as you can see here

                                        0_1568294113805_successbuild.png

                                        After this Executed the make,the result is:

                                        0_1568294186956_error2.png

                                        so what that error says?how to solve this..

                                        1 Reply Last reply
                                        0
                                        • A Offline
                                          A Offline
                                          Asha
                                          wrote on 13 Sept 2019, 04:47 last edited by
                                          #46

                                          Hi,

                                          Any suggestions,

                                          jsulmJ 1 Reply Last reply 13 Sept 2019, 06:32
                                          0

                                          • Login

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