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

[TUTO] Build Qt to cross compile for arm

Scheduled Pinned Locked Moved Mobile and Embedded
armcross compilecross platformlinux
68 Posts 15 Posters 50.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.
  • C Offline
    C Offline
    citiustech
    wrote on 8 Mar 2016, 09:49 last edited by
    #12

    QOpenglwidget file is included in my application..it is build on qt5.5. but giving file error while make using QT4.8 that QOpenGLWidget no such file.

    1 Reply Last reply
    0
    • S Offline
      S Offline
      SGaist
      Lifetime Qt Champion
      wrote on 8 Mar 2016, 21:53 last edited by
      #13

      Hi,

      That's because QOpenGLWidget is a new class of Qt 5. Qt 4 has QGLWidget.

      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
      • C Offline
        C Offline
        citiustech
        wrote on 9 Mar 2016, 06:24 last edited by
        #14

        Thank for your valueable reply

        1 Reply Last reply
        0
        • C Offline
          C Offline
          citiustech
          wrote on 9 Mar 2016, 06:34 last edited by
          #15

          i am trying to build qt5.5 for arm but getting error while build.
          i am using ./configue -xplatform inux-arm-gnueabi-g++ command. it gives openssl error. openssl.h no such file?

          can you please suggest

          1 Reply Last reply
          0
          • S Offline
            S Offline
            SGaist
            Lifetime Qt Champion
            wrote on 9 Mar 2016, 08:23 last edited by
            #16

            Unless you specified that you want OpenSSL support it should not stop the build. If you want OpenSSL support then you need to provide that dependencies for your target.

            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
            • C Offline
              C Offline
              citiustech
              wrote on 9 Mar 2016, 09:05 last edited by
              #17

              DO you have any Build steps like QT4.8.5 for QT5.5?

              1 Reply Last reply
              0
              • S Offline
                S Offline
                SGaist
                Lifetime Qt Champion
                wrote on 9 Mar 2016, 20:47 last edited by
                #18

                That usually depends partly on the device you are targeting.

                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
                • C Offline
                  C Offline
                  citiustech
                  wrote on 11 Mar 2016, 10:20 last edited by
                  #19

                  i am cross compiling qt for cubieboard 4.
                  can you please suggest me ./configure command ?

                  1 Reply Last reply
                  0
                  • S Offline
                    S Offline
                    SGaist
                    Lifetime Qt Champion
                    wrote on 11 Mar 2016, 20:34 last edited by
                    #20

                    I don't know this board but a quick search returns this blog entry which step 4 is likely what you are looking for to get started.

                    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
                    • C Offline
                      C Offline
                      citiustech
                      wrote on 7 Apr 2016, 06:11 last edited by
                      #21

                      Hello. The above solution is working fine for no-opengl.
                      once opengl es2 enable for cross compile it gives opengl functionality test failed error. i have copied all the GL/GLES2 file from arm board to ubuntu pc and edit qmake.conf file. but it gives the same error.
                      how to cross compile qt for arm with opengl. can you please suggest?

                      1 Reply Last reply
                      0
                      • S Offline
                        S Offline
                        SGaist
                        Lifetime Qt Champion
                        wrote on 7 Apr 2016, 20:36 last edited by
                        #22

                        The headers are not enough, did you also copied the libraries ?

                        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 24 Jun 2016, 12:38 last edited by
                          #23

                          Hello,
                          I know this is a late reply, but hopefully someone is still reading this thread and active. I followed all the steps, and have everything setup. I compiled the file, but when I try and run the make I get an error saying their is no such file or directory of QGLWidget.
                          I am looking for assistance as to how I can rectify this problem, and finally get my applications building and running. I have included the terminal log below:

                          /home/sam/Downloads/qt-everywhere-opensource-src-4.8.5/bin/qmake -spec qt-everywhere-opensource-src-4.8.5/mkspecs/qws/linux-arm-gnueabi-g++ CONFIG+=debug -o Makefile ../Qt5.0.2/5.0.2/gcc/examples/opengl/2dpainting/2dpainting.pro
                          /home/sam/Downloads/gcc-linaro-arm-linux-gnueabihf-4.8-2013.10_linux/bin/arm-linux-gnueabihf-g++ -c -pipe -g -Wall -W -D_REENTRANT -DQT_OPENGL_LIB -DQT_GUI_LIB -DQT_NETWORK_LIB -DQT_CORE_LIB -DQT_SHARED -Iqt-everywhere-opensource-src-4.8.5/mkspecs/qws/linux-arm-gnueabi-g++ -I../Qt5.0.2/5.0.2/gcc/examples/opengl/2dpainting -I/usr/local/Qt-4.8.5-arm/include/QtCore -I/usr/local/Qt-4.8.5-arm/include/QtNetwork -I/usr/local/Qt-4.8.5-arm/include/QtGui -I/usr/local/Qt-4.8.5-arm/include/QtOpenGL -I/usr/local/Qt-4.8.5-arm/include -I. -I../Qt5.0.2/5.0.2/gcc/examples/opengl/2dpainting -I. -o glwidget.o ../Qt5.0.2/5.0.2/gcc/examples/opengl/2dpainting/glwidget.cpp
                          In file included from ../Qt5.0.2/5.0.2/gcc/examples/opengl/2dpainting/glwidget.cpp:41:0:
                          ../Qt5.0.2/5.0.2/gcc/examples/opengl/2dpainting/glwidget.h:44:21: fatal error: QGLWidget: No such file or directory
                          #include <QGLWidget>

                          THANKS!!!

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

                            Hi and welcome to devnet,

                            Are you trying to build a Qt 5 example with Qt 4 ?

                            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 24 Jun 2016, 14:55 last edited by
                              #25

                              Yes I am, wow I am an idiot.
                              If I try to use a qt 4 example should it work?

                              1 Reply Last reply
                              0
                              • S Offline
                                S Offline
                                samapollo
                                wrote on 24 Jun 2016, 15:07 last edited by
                                #26

                                So I am using the proper example now, it compiles, but when I run the make It says:

                                make: Nothing to be done for 'first'.

                                I have attached the entire command and response below:

                                sam@sam-VirtualBox:~/Downloads$ "/home/sam/Downloads/qt-everywhere-opensource-src-4.8.5/bin/qmake" '/home/sam/classwizard/classwizard.pro' -r CONFIG+=debug -spec /home/sam/Downloads/qt-everywhere-opensource-src-4.8.5/mkspecs/qws/linux-arm-gnueabi-g++
                                sam@sam-VirtualBox:~/Downloads$ make
                                make: Nothing to be done for `first'.

                                1 Reply Last reply
                                0
                                • 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

                                          • Login

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