Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. Installation and Deployment
  4. Need help compiling Qt for embedded device (i.mx51 evk)
Qt 6.11 is out! See what's new in the release blog

Need help compiling Qt for embedded device (i.mx51 evk)

Scheduled Pinned Locked Moved Installation and Deployment
27 Posts 9 Posters 37.5k Views 1 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 Offline
    A Offline
    almagest
    wrote on last edited by
    #6

    Im still struggling with these errors.

    I have made a symbolic link to the path of my rootfs (for the target embedded device). This is to make the needed includes and libraries available to Qmake.

    It seems as if qmake does not find these files. The files and headers are all there (tslib, opengl etc.), and according to the howto i followed (se first post) the symbolic link should solve this.

    • almagest
    1 Reply Last reply
    0
    • N Offline
      N Offline
      ngrosjean
      wrote on last edited by
      #7

      Not easy to solve this problem, but note that you put some variable QMAKE???EGL on your qmake.conf but if I look on your "g++ -c -o qxmlutils.o -pipe -DQ..." command line, I don't see any of your EGL data...

      So here are some ideas:

      • Are you sure you read the right qmake.conf?
      • re-compile your qt lib, then when its fails, try to re-launch the "g++ -c -o qxmlutils.o -pipe -DQ..." command alone on the right directory, with adding the "-L..." and/or "-I..." you suppose to be neccessary.
      1 Reply Last reply
      0
      • A Offline
        A Offline
        almagest
        wrote on last edited by
        #8

        Hello again.

        I've had some time to attack this problem further.
        I decided to go for the -no-opengl option, to tackle one problem at the time.

        bq. Are you sure you read the right qmake.conf?

        Im certain i read the right qmake.conf. I received a warning (QMAKE_LFLAGS_RPATH stuff) with full path that verified the qmake in question.

        I still get the following error;

        The tslib functionality test failed!
        You might need to modify the include and library search paths by editing
        QMAKE_INCDIR and QMAKE_LIBDIR in/home/ael/Downloads/qtimx/qt-everywhere-opensource-src-4.7.0/mkspecs/qws/linux-mxc-g++

        But think i can rule out the problem with compilation since the touchscreen binaries works on the target hw.

        bq. re-compile your qt lib, then when its fails, try to re-launch the “g++ -c -o qxmlutils.o -pipe -DQ…” command alone on the right directory, with adding the ”-L…” and/or ”-I…” you suppose to be neccessary.

        I started reading the executed command really thoroughly when i came over this detail;

        -I/home/ael/Downloads/qt-imx/qt-everywhere-opensource-src-4.6.0/mkspecs/qws/linux-x86-g++

        which really does not make sense, since i am compiling for arm architecture and have specified all my paths in ../qws/linux-mxc-g++.

        Im just guessing here, but could this be the root of my problem?

        Thanks for your time.
        A.

        1 Reply Last reply
        0
        • N Offline
          N Offline
          ngrosjean
          wrote on last edited by
          #9

          Ah! A quick short idea (I've no time now) You need to export some data like :

          @# export ARCH=arm

          export CROSS_COMPILE=yourCompiler(arm-none-linux-gnueabi?)@

          I hope it's help.

          By the way, you should google for "qt export ARCH=arm"

          1 Reply Last reply
          0
          • A Offline
            A Offline
            almagest
            wrote on last edited by
            #10

            The problem was resolved by crosscompiling tslib from scratch. If i remember correctly, i also set CROSS_COMPILE=arm-none-linux-gnueabi . The opengl es error was due to an unreadable library. Found another one in another bsp-package. (not related to qt at all).

            If any one wants more detail regarding any of this, ill answer to the best of my knowledge.
            Dont hesitate to send me an email.

            And finally, thanks ngrosjean, for all the time invested. - You made a difference.

            • a.
            1 Reply Last reply
            0
            • Y Offline
              Y Offline
              yli_net
              wrote on last edited by
              #11

              I got same problem with a mips platform, why tslib is related to opengl qt build?
              Do you still need to specify the QMAKE_INCDIR and QMAKE_LIBDIR in the qmake.conf file? where is your opengl header/lib stored anyway, in the target rfs or in the host machine.

              Thanks

              1 Reply Last reply
              0
              • A Offline
                A Offline
                almagest
                wrote on last edited by
                #12

                Its guess its related since Qt on Embedded devices has its own window manager (qws), and many devices take input from the touchscreen.
                Yes, you still have to specify where the include and lib-files are, since they might be different from the host architecture. In my case, i had the rootfs on the host machine, in a directory named /tftp/rootfs/ where the usr/include and usr/lib resided. ( ex. /tftp/rootfs/usr/lib )

                I think its nicely explained here;
                "Qt Tslib":http://doc.trolltech.com/4.4/qt-embedded-pointer.html

                Hopefully that answered some of your questions.

                I have one though, what is your issue? tslib, opengl, or both?

                Regards
                almagest

                1 Reply Last reply
                0
                • B Offline
                  B Offline
                  bonil
                  wrote on last edited by
                  #13

                  I've been having similar compile problem with tslib:

                  The tslib functionality test failed!

                  I've tried the solution of almagest:

                  1 # export ARCH=arm
                  2 # export CROSS_COMPILE=yourCompiler(arm-none-linux-gnueabi?)

                  by setting these variable in the terminal and then restart the compile of qt for the target (imx51 evk) but the problem is still there.

                  Am I doing something wrong? Do I have to install tslib-dev library on my host?

                  If anyone could aid, it would be very appreciated. I've been trying to fix this problem for the last days.

                  Thank you for your time.
                  bonil

                  P.S.: I'll post more details later

                  1 Reply Last reply
                  0
                  • G Offline
                    G Offline
                    goetz
                    wrote on last edited by
                    #14

                    As a general rule of thumb:
                    If you compile things you almost always want the dev-packages of the libs used on your machine. They usually provide the header files, which are needed in the include parts of the sources, and debug symbols (that may help later on).

                    PS: I have no clue about Qt @ embedded, that's just a general rule to follow.

                    http://www.catb.org/~esr/faqs/smart-questions.html

                    1 Reply Last reply
                    0
                    • B Offline
                      B Offline
                      bonil
                      wrote on last edited by
                      #15

                      Probably I found out the problem:

                      QMAKE_INCDIR_OPENGL = /tftpboot/ltib/usr/include/GL

                      @$ ls /tftpboot/ltib/usr/include/GL
                      $ ls: cannot access /tftpboot/ltib/usr/include/GL: No such file or directory@
                      but the /GL folder does not exist.

                      how do I have to build my LTIB? Do I have to compile it with FSL Gnome?

                      Can somebody help me?

                      1 Reply Last reply
                      0
                      • S Offline
                        S Offline
                        sanjay1758
                        wrote on last edited by
                        #16

                        hi, i’m using i.mx51 with ubuntu 10.04

                        I have qt-everywhere-opensource-src-4.6.0.tar.gz and trying to install QT for my target i.MX51 evk.

                        I hav done my configuration successfully and i’m getting errors while executing make command.

                        the configuration command i had given is :
                        $ ./configure -embedded arm -xplatform qws/linux-mxc-g++ -release -prefix /usr/local/Trolltech/Qt-target-version -qt-gfx-linuxfb -qt-kbd-tty -qt-mouse-pc -webkit -exceptions -verbose -little-endian -host-little-endian

                        i had left openGL and tslib because i’m also getting errors with them related to “ qmake.conf “ file and my application doesn’t need those packages.

                        the error i’m getting while executing make command is:
                        —————————————————-

                        /opt/freescale/usr/local/gcc-4.4.4-glibc-2.11.1-multilib-1.0/arm-fsl-linux-gnueabi/bin/../lib/gcc/arm-fsl-linux-gnueabi/4.4.4/../../../../arm-fsl-linux-gnueabi/bin/ld: cannot find -lglib-2.0
                        collect2: ld returned 1 exit status
                        make1: *** [../../lib/libQtCore.so.4.6.0] Error 1
                        make1: Leaving directory `/home/ubuntu10/qt-src-4.6.0/qt-target/src/corelib’
                        make: *** [sub-corelib-make_default-ordered] Error 2

                        ————————————————————————

                        Please help me in solving this …..
                        i hav been trying this from the last 10 days but i’m unable to crack these errors.

                        if you know the compilation along with openGl ,es2, tslib,openssl then please help me in resolving those errors also….
                        ——————————————————————————
                        if possible usend me your qmake.conf file
                        —————————————————————————————

                        1 Reply Last reply
                        0
                        • N Offline
                          N Offline
                          ngrosjean
                          wrote on last edited by
                          #17

                          Hi!

                          I suppose you have these glib-2.0 install, haven't you? (try a "locate glib-2.0" perhaps).

                          1 Reply Last reply
                          0
                          • A Offline
                            A Offline
                            almagest
                            wrote on last edited by
                            #18

                            ngrosjean gave a good tip.

                            Also, sanjay1758, please dont post multiple identical posts on the same board.
                            It only creates confusion. "Your other thread":http://developer.qt.nokia.com/forums/viewthread/3693/


                            Hello.

                            When you try to compile for the target platform you have to point Qt toward the libraries compiled for that system. It is apparent that you miss the file libglib-2.0.so , either because the folder provided in qmake.conf is wrong or because the file simply isnt there. Obviously you cannot provide a path to your laptop/workstations version of these libraries to solve the issue.

                            If you use LTIB when setting up the image to be used on the card, look at the second link. It specifies that you use glib2.0 when you compile qt.

                            Regarding opengl, es2, tslib;
                            Tslib can be compiled from source (i did myself) to solve this issue.
                            You can also probably get away by copying the gl,es2 etc files from a precompiled image.
                            I have a Freescale i.MX51 EVK card, and downloaded a precompiled image from their website.
                            It contained all the files i needed to get these systems up and running.

                            Most of the questions related to LTIB (ubuntu) can be seen here;
                            "Builing LTIB on Ubuntu 10.04
                            ":http://imxcommunity.org/group/ubuntutipsandtricks/forum/topics/building-ltib-in-ubuntu-1004?xg_source=activity

                            As for compiling Qt for the Imx.51 EVK, look at this;
                            "All Boards Qt iMXwiki":http://www.imxdev.org/wiki/index.php?title=All_Boards_Qt

                            Best regards
                            almagest

                            1 Reply Last reply
                            0
                            • R Offline
                              R Offline
                              raikiri
                              wrote on last edited by
                              #19

                              check the configure scripts. mostly it is failing trying to make sample opengl file in src/config.tests/unix/opengles* , where * is 1 or 2 depending on the version you are compiling. cd to the directory and do a make.
                              This is auto generated make file. If it fails, you will get the opengl configuration error while doing a configure also.
                              Try setting right values in the make file. If you are able to build this, set the same values in qmake.conf.

                              1 Reply Last reply
                              0
                              • D Offline
                                D Offline
                                dreamerindia
                                wrote on last edited by
                                #20

                                Hi I tried to cross compile qt-everywhere-opensource-src-4.6.1 with openGL es2 support.

                                Details:
                                Host:Ubuntu 10.04.4 LTS
                                Target:ARM Cortex A8 (Freescale i.MX51 Processor)
                                Target Linux:linux-2.6.31.
                                Qt Version:4.6.1

                                Steps i did are,

                                1.downloaded qt-everywhere-opensource-src-4.6.1.tar.gz from ftp://ftp.qt.nokia.com/qt/source/ [ftp.qt.nokia.com]
                                2.Copied mkspecs for arm-cortex_a8-linux-gnueabi-g++ and modified its qmake.conf as given – https://dl.dropboxusercontent.com/u/12382973/linux-g++-mx5x/qmake.conf [dl.dropboxusercontent.com] . 3.then configured as,

                                @ ./configure -arch arm -xplatform linux-g++-mx5x -release -prefix / -multimedia -qt-gfx-linuxfb -qt-kbd-tty -little-endian -host-little-endian -fontconfig -sm -opengl es2@

                                And now i got the problem it shows,
                                “The EGL functionality test failed!
                                EGL is required for OpenGL ES to manage contexts & surfaces.
                                You might need to modify the include and library search paths by editing
                                QMAKE_INCDIR_EGL, QMAKE_LIBDIR_EGL and QMAKE_LIBS_EGL in
                                /home/elangovan/qt-everywhere-opensource-src-4.6.1/mkspecs/linux-g++-mx5x”

                                but in qmake.conf it has,

                                @ QMAKE_INCDIR_EGL = /usr/local/DigiEL-5.6/x-tools/arm-cortex_a8-linux-gnueabi/arm-cortex_a8-linux-gnueabi/sys-root/usr/include/EGL
                                QMAKE_LIBDIR_EGL = /usr/local/DigiEL-5.6/x-tools/arm-cortex_a8-linux-gnueabi/arm-cortex_a8-linux-gnueabi/sys-root/usr/lib

                                QMAKE_LIBS_EGL       = -lEGL
                                

                                @
                                when i use -v switching in config it gives errors as in the file – https://dl.dropboxusercontent.com/u/12382973/configError.txt [dl.dropboxusercontent.com]

                                Have you successfully compiled?

                                ~Ravivarman~

                                1 Reply Last reply
                                0
                                • A Offline
                                  A Offline
                                  almagest
                                  wrote on last edited by
                                  #21

                                  @usr/local/DigiEL-5.6/x-tools/arm-cortex_a8-linux-gnueabi/lib/gcc/arm-cortex_a8-linux-gnueabi/4.4.3/../../../../arm-cortex_a8-linux-gnueabi/bin/ld: cannot find -lxcb
                                  collect2: ld returned 1 exit status
                                  make: *** [egl4gles1] Error 1
                                  @

                                  Please use 'code'-tags around your code, much more readable then.

                                  From the errorlog you provided it looks like you are missing a libxcb.so library? Or variants of this.
                                  Search your filesystem for this library, and also verify that its location is in the build path of the application.

                                  Almagest.

                                  1 Reply Last reply
                                  0
                                  • D Offline
                                    D Offline
                                    dreamerindia
                                    wrote on last edited by
                                    #22

                                    I'm using qt-everywhere-opensource-src-4.6.1 and there is no xcb library in that i think so.

                                    ~Ravivarman~

                                    1 Reply Last reply
                                    0
                                    • A Offline
                                      A Offline
                                      almagest
                                      wrote on last edited by
                                      #23

                                      Have you searched for 'xcb' among your files? Do that. Maybe this is included among the freescale-files, or possibly something that you could install in ubuntu as a package.

                                      Please test these ideas first.

                                      A.

                                      1 Reply Last reply
                                      0
                                      • D Offline
                                        D Offline
                                        dreamerindia
                                        wrote on last edited by
                                        #24

                                        I can't find xcb library in QMAKE_LIBDIR "/usr/local/DigiEL-5.6/x-tools/arm-cortex_a8-linux-gnueabi/arm-cortex_a8-linux-gnueabi/lib".

                                        Is xcb library is necessary for opengl compilation?

                                        ~Ravivarman~

                                        1 Reply Last reply
                                        0
                                        • A Offline
                                          A Offline
                                          almagest
                                          wrote on last edited by
                                          #25

                                          I honestly dont know whether you need it or not. You compiled some code and requested that the library should be linked in, but it failed since it could not find it.

                                          Did you run this command to search?
                                          @find / -name xcb@

                                          Another option could be to extract the precompiled image you got, and search among those files. The library might be there (and in correct arm-variant).

                                          A.

                                          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