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. Qt4.8 Cross-Compile to IMX6
Forum Updated to NodeBB v4.3 + New Features

Qt4.8 Cross-Compile to IMX6

Scheduled Pinned Locked Moved Unsolved Installation and Deployment
9 Posts 2 Posters 3.6k 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.
  • C Offline
    C Offline
    Cart_man
    wrote on last edited by
    #1

    Hi everyone.

    I have been having a real hard time compiling Qt4 embedded for my IMX6 board. ( qt-everywhere-opensource-src-4.8.6.tar.gz )
    I have a Host machine running Linux(Ubuntu 14) and I want to code and compile on this machine and then send the binary to my IMX machine for execution. Snag is I have to use QWS and Debian 7 as the OS on the IMX6 board.
    So far I have been trying the following to make this work.
    I have installed and tried arm-linux-gcc-4.3.2.tgz
    Also gcc-arm-none-eabi-5_4 which when exported crashed with an error saying it can not find arm-none-linux-gcc.
    Also tried gcc-linaro-arm-linux-gnueabi-2012 ...it had the same problem.
    I have also installed a TON of libs to try and make it work.
    None of this worked.

    I have changed my PATH variable several times with no luck... I can not even remember half of the stuff I tried.
    I use the ./config command like this -> " ./configure -embedded arm -xplatform qws/linux-arm-gnueabi-g++ -no-webkit -little-endian "

    So finally I have tried using arm-linux-gcc-4.3.2.tgz which is really old
    with PATH="/usr/local/arm/4.3.2/bin:/usr/local/gcc-arm-none-eabi-5_4/bin/:/usr/local/gcc-arm-none-eabi-5_4/:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/local/games "

    and it got the furthest so far but still crashed with the following.

    obj/release/UStringImpl.o: In function QTWTF::CrossThreadRefCounted<QTWTF::OwnFastMallocPtr<unsigned short> >::deref()': UStringImpl.cpp:(.text._ZN5QTWTF21CrossThreadRefCountedINS_16OwnFastMallocPtrItEEE5derefEv[QTWTF::CrossThreadRefCounted<QTWTF::OwnFastMallocPtr<unsigned short> >::deref()]+0x28): undefined reference to __sync_sub_and_fetch_4'
    collect2: ld returned 1 exit status
    make[1]: *** [../../lib/libQtScript.so.4.8.6] Error 1
    make[1]: Leaving directory `/home/gss/QtEmbedded/src/script'
    make: *** [sub-script-make_default-ordered] Error 2

    I have make cleanconf before starting the process all over again before this crash.

    Anyway I do not know what to do anymore. I have been at this for 2 days now and I need to go sleep.

    If anyone can please help me I would greatly appreciate it.

    Thanks
    Cart

    1 Reply Last reply
    0
    • SGaistS Offline
      SGaistS Offline
      SGaist
      Lifetime Qt Champion
      wrote on last edited by
      #2

      Hi and welcome to devnet,

      AFAIK, Ubuntu has packages for cross-compiler. Try sudo apt-get install gcc-arm-linux-gnueabihf, it should get you the basic stuff in. But before, you should check whether you have a hard float Debian installed.

      Hope it helps

      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
        Cart_man
        wrote on last edited by
        #3

        Hi SGaist.

        Thanks allot for the reply!

        I have indeed installed the package named " gcc-arm-linux-gnueabihf " but the compiler complained about missing arm-none-linux-gnueabi-gcc or arm-none-linux-gnueabi-g++ .

        I dont understand why Qt would use such ancient packages anyway though? Is there any way of fooling the OS to rather use some newer of from the stock Arm tool chain at least?

        Thanks

        1 Reply Last reply
        0
        • SGaistS Offline
          SGaistS Offline
          SGaist
          Lifetime Qt Champion
          wrote on last edited by
          #4

          Because that's what you are asking for on your configure command line.

          You also have to realize that Qt 4.8.6 is pretty old by now and that if you can't go on Qt 5 which is currently in 5.8 Beta you should at least go with 4.8.7.

          If you want (or have) to use hard-float, then just copy the linux-arm-gnueabi-g++ mkspec and modify qmake.conf to use the cross-compiler you just installed.

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

          C 1 Reply Last reply
          0
          • SGaistS SGaist

            Because that's what you are asking for on your configure command line.

            You also have to realize that Qt 4.8.6 is pretty old by now and that if you can't go on Qt 5 which is currently in 5.8 Beta you should at least go with 4.8.7.

            If you want (or have) to use hard-float, then just copy the linux-arm-gnueabi-g++ mkspec and modify qmake.conf to use the cross-compiler you just installed.

            C Offline
            C Offline
            Cart_man
            wrote on last edited by Cart_man
            #5

            @SGaist

            Hi there.

            Ok soo i have come a long way since last time.
            I managed to compile QT4.8 with gcc-arm-linux-gnueabihf-4.9 by manipulating the symbolic links.
            After quite some time I have managed to make Qt connect to my Target Board and display/run a basic Qt Application.
            But when try and load an example from the QtExamples file I get the following.
            Failed to upload file " /home/user/QtProjFile/examples/dialogs/README ".

            That is the one problem.
            The other problem is that I can not seem to DEBUG " Step through " the code running on the board since it just comes back with an error 127.
            Even if the code runs when I click run it will still come back with error 127 if I try and debug.
            I have to initialize the gdbserver but I have no idea how to do that. If I do that then I can not manage to mix my program with it somehow.

            Why can I not debug?
            Why can I only send over some projects files instead of all of them?

            Thanks.

            1 Reply Last reply
            0
            • SGaistS Offline
              SGaistS Offline
              SGaist
              Lifetime Qt Champion
              wrote on last edited by
              #6

              Do you have gdbserver install on 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

              C 1 Reply Last reply
              0
              • SGaistS SGaist

                Do you have gdbserver install on your target ?

                C Offline
                C Offline
                Cart_man
                wrote on last edited by
                #7

                @SGaist

                It is installed but it does not launch automatically and I can not seem to get it started up correctly.

                Also if I give i a IP:PORT it just sits there and waits fora connection and I try to then run the program from HOST but nothing happens.

                Thanks

                1 Reply Last reply
                0
                • C Offline
                  C Offline
                  Cart_man
                  wrote on last edited by
                  #8

                  So I installed GDBServer on the Target.
                  Now when I debug it says.

                  Listening on port 10001
                  Remote debugging from host 192.168.0.237
                  Process /home/bunutu/project/untitled9 created; pid = 15963
                  Architecture rejected target-supplied description
                  Killing process(es): 15963

                  Any ideas?
                  Thanks

                  1 Reply Last reply
                  0
                  • SGaistS Offline
                    SGaistS Offline
                    SGaist
                    Lifetime Qt Champion
                    wrote on last edited by
                    #9

                    Are you sure you are build your application for the right architecture ?

                    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

                    • Login

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