Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. Qt Creator and other tools
  4. QtCreator on Windows to Cross Compile for Linux ARM with CodeSourcery Toolchain

QtCreator on Windows to Cross Compile for Linux ARM with CodeSourcery Toolchain

Scheduled Pinned Locked Moved Qt Creator and other tools
15 Posts 3 Posters 22.9k 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.
  • P Offline
    P Offline
    phil999
    wrote on 12 Jul 2012, 17:56 last edited by
    #5

    Nevermind - I was able to build Qt 4.8 with the CodeSourcery toolchain. Now I need to figure out how to get it in the Qt Creator IDE.

    Here are my notes if it helps anyone:
    Run from the top level >> configure
    Then go to \tools\configure and run >> qmake && mingw32-make
    Modify the makespec in mkspecs\linux-arm-gnueabi-g++ via the blog post http://c2143.blogspot.com/?view=classic
    Then go to back to top level and run:

    configure.exe -debug -embedded -arch arm -neon -platform win32-win32-g++ -xplatform linux-arm-gnueabi-g++
    Now there is a Makefile in the top level , invoke mingw32-make
    Go to movie and dinner and come back...

    1 Reply Last reply
    0
    • P Offline
      P Offline
      phil999
      wrote on 12 Jul 2012, 17:57 last edited by
      #6

      Woops just saw your reply - thanks for the info!

      1 Reply Last reply
      0
      • F Offline
        F Offline
        franku
        wrote on 12 Jul 2012, 18:01 last edited by
        #7

        You may need a newer QtCreator like 2.5.0. There you go to "Tools" menu, "Options", "Qt4". There you'll find a Toolchain tab (afaik - don't have one here), in this tab you can set the toolchain options, including the makespec.

        This, Jen, is the internet.

        1 Reply Last reply
        0
        • P Offline
          P Offline
          phil999
          wrote on 13 Jul 2012, 15:04 last edited by
          #8

          Would you have any insight on this problem? I've used the CodeSourcery toolchain to build the Qt 4.8 library with no error and I have the .so files in the /lib directory. Now I am trying to hook in the CodeSourcery compiler and built Qt 4.8 to Qt Creator so I can build an example app for the target board.

          I read the articles you sent describing how to add a Qt version new toolchain to Qt Creator. Please see the images attached for how I've configured Qt Creator. I am using Qt Creator 2.4.1.

          I could only post images here --> http://stackoverflow.com/questions/11420984/qtcreator-on-windows-to-cross-compile-for-linux-arm-with-codesourcery-toolchain

          I'm getting an error without much information pasted below... Any thoughts on this or my configuration?
          09:51:07: Running build steps for project analogclock...
          09:51:07: Configuration unchanged, skipping qmake step.
          09:51:07: Starting: "C:\QtSDK\mingw\bin\mingw32-make.exe"
          arm-none-linux-gnueabi-g++ -c -pipe -march=armv7-a -mtune=cortex-a8 -mthumb -mfpu=neon -mfloat-abi=softfp -Wa,-mimplicit-it=thumb -O2 -Wall -W -DQT_NO_DEBUG -DQT_GUI_LIB -DQT_NETWORK_LIB -DQT_CORE_LIB -DQT_SHARED -I"..\qt-4.8-src\include\QtCore" -I"..\qt-4.8-src\include\QtNetwork" -I"..\qt-4.8-src\include\QtGui" -I"..\qt-4.8-src\include" -I"." -I"c:\QtSDK\Examples\4.7\widgets\analogclock" -I"." -I"..\qt-4.8-src\mkspecs\default" -o analogclock.obj c:\QtSDK\Examples\4.7\widgets\analogclock\analogclock.cpp
          arm-none-linux-gnueabi-g++ -c -pipe -march=armv7-a -mtune=cortex-a8 -mthumb -mfpu=neon -mfloat-abi=softfp -Wa,-mimplicit-it=thumb -O2 -Wall -W -DQT_NO_DEBUG -DQT_GUI_LIB -DQT_NETWORK_LIB -DQT_CORE_LIB -DQT_SHARED -I"..\qt-4.8-src\include\QtCore" -I"..\qt-4.8-src\include\QtNetwork" -I"..\qt-4.8-src\include\QtGui" -I"..\qt-4.8-src\include" -I"." -I"c:\QtSDK\Examples\4.7\widgets\analogclock" -I"." -I"..\qt-4.8-src\mkspecs\default" -o main.obj c:\QtSDK\Examples
          \4.7\widgets\analogclock\main.cpp
          C:\Users\pclass\Desktop\qt_creator_toolchain\qt-4.8-src\bin\moc.exe -DQT_NO_DEBUG -DQT_GUI_LIB -DQT_NETWORK_LIB -DQT_CORE_LIB -DQT_SHARED -I"..\qt-4.8-src\include\QtCore" -I"..\qt-4.8-src\include\QtNetwork" -I"..\qt-4.8-src\include\QtGui" -I"..\qt-4.8-src\include" -I"." -I"c:\QtSDK\Examples\4.7\widgets\analogclock" -I"." -I"..\qt-4.8-src\mkspecs\default" c:\QtSDK\Examples\4.7\widgets\analogclock\analogclock.h -o moc_analogclock.cpp
          mingw32-make.exe: *** [moc_analogclock.cpp] Error -1073741515
          09:51:09: The process "C:\QtSDK\mingw\bin\mingw32-make.exe" exited with code 2.
          Error while building project analogclock (target: Desktop)
          When executing build step 'Make'*

          1 Reply Last reply
          0
          • F Offline
            F Offline
            franku
            wrote on 13 Jul 2012, 15:17 last edited by
            #9

            Two items:

            1. Apply the right mkspec to the toolchain now it seems to be ”..\qt-4.8-src\mkspecs\default”
            2. Right-click on the project and select "run qmake" or similar, so qmake will create the appropriate makefiles with the right makespec in.
            3. Did you add the path to mingw/bin and qt/bin to your PATH environment? moc.exe depends on two or three dlls out of that folders.

            This, Jen, is the internet.

            1 Reply Last reply
            0
            • P Offline
              P Offline
              phil999
              wrote on 13 Jul 2012, 15:39 last edited by
              #10

              Thank you.. I added mingw to the path and then did a build and it succeeded. If I do a 'file' command on the example it gives me the following, which looks promising. Now to try it on the board.

              $ file analogclock
              analogclock: ELF 32-bit LSB executable, ARM, version 1 (SYSV), dynamically linked (uses shared libs), for GNU/Linux 2.6.16, not stripped

              1 Reply Last reply
              0
              • P Offline
                P Offline
                phil999
                wrote on 16 Jul 2012, 20:39 last edited by
                #11

                I've tried to run the executable on the board after copying it and the CodeSourcery sysroot to the board. I get the following error:

                ./analogclock

                @Inconsistency detected by ld.so: dl-deps.c: 622: _dl_map_object_deps: Assertion `nlist > 1' failed!@

                On an Ubuntu VM I can see the following information about the executables:
                @user@ubuntu:~/exported/test_build$ readelf -l analogclock| grep "program interpreter"
                [Requesting program interpreter: /CodeSourcery-sysroot/lib/ld-linux.so.3]
                user@ubuntu:~/exported/test_build$
                user@ubuntu:~/exported/test_build$ ldd analogclock
                not a dynamic executable@

                I've tried to investigate but am not sure what dependencies are missing. Do you have any insight here? Thanks alot.

                1 Reply Last reply
                0
                • F Offline
                  F Offline
                  franku
                  wrote on 16 Jul 2012, 21:28 last edited by
                  #12

                  Maybe a "bug":http://sourceware.org/bugzilla/show_bug.cgi?id=12454 in the toolchain (glibc)?

                  I.e. search on "Google":http://www.google.com for '_dl_map_object_deps'.

                  This, Jen, is the internet.

                  1 Reply Last reply
                  0
                  • P Offline
                    P Offline
                    phil999
                    wrote on 17 Jul 2012, 12:45 last edited by
                    #13

                    Yep, I think you are correct:
                    http://communities.mentor.com/mgcx/message/25589#25589

                    1 Reply Last reply
                    0
                    • F Offline
                      F Offline
                      franku
                      wrote on 18 Jul 2012, 16:01 last edited by
                      #14

                      Why are you using CodeSourcery? Are there specific feratures you use? As I know there are several other IDE/embedded tools providers.

                      This, Jen, is the internet.

                      1 Reply Last reply
                      0
                      • D Offline
                        D Offline
                        D.DeVOE
                        wrote on 9 Aug 2012, 19:15 last edited by
                        #15

                        I also thought I was experiencing an issue with the glibc toolchain, but our resident toolchain guru set me straight. We quickly built up the "strace" tool and added that to our embedded system. It immediately told us there was a library dependency that was not being met (libQtOpenGL in our case). This may not be your issue, but I wanted to share how we dissected the error to identify the root cause.
                        Good Luck!

                        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