Uploaded image for project: 'Qt'
  1. Qt
  2. QTBUG-37269

cross compilation for unix on windows/mingw should work

    XMLWordPrintable

    Details

      Description

      Trying to compile Qt5.2.1 for linux cross compilation on Windows/mingw32.

      The build fails in many ways. This is clearly a problem many people have, cf:
      http://qt-project.org/forums/viewthread/37298/
      http://c2143.blogspot.fr/2011/08/developping-for-qt-48-embedded-on.html

      I don't see it fixed in git, but maybe I'm wrong.

      I setup a new mkspec for my platform linux-arm-gnueabihf-win32g++.
      My batch file setup the paths and call configure.bat with correct parameters.

      0. The generic linux-arm-gnueabi-g++ mkspec don't autodetect we are compiling on Windows.
      So we have to include(../common/shell-win32.conf) in qmake.conf.
      Well, OK, but this one took me some time to find...

      1. First try with MAKEFILE_GENERATOR = MINGW
      After "Running configuration tests...", we have an error: [...]ld.exe: cannot find ./arch.obj
      The makefile are not generated, see "generator-mingw.log"

      2. First try with MAKEFILE_GENERATOR = UNIX
      make reports errors in a makefile about "{", "DESTDIR" and "true" beeing unknown commands.

      but in the end, the makefile is generated.

      3. When building

      global\qlibraryinfo.cpp:363:20: error: 'QT_CONFIGURE_SETTINGS_PATH' was not declared in this scope
      path = QT_CONFIGURE_SETTINGS_PATH;

      see "generator-unix.log"

      Some users fixed it and report further errors:
      thread\qwaitcondition_unix.cpp: In function 'void qt_initialize_pthread_cond(pthread_cond_t*, const char*)':
      thread\qwaitcondition_unix.cpp:83:61: error: 'pthread_condattr_setclock' was not declared in this scope

      Can you fix these ?

      PS: make confclean still does not work !
      this is really painful when we want to rebuild...

        Attachments

        1. AteisBuildQt.bat
          0.5 kB
        2. generator-mingw.log
          129 kB
        3. generator-unix.log
          131 kB
        4. qmake.conf
          1 kB

          Issue Links

          No reviews matched the request. Check your Options in the drop-down menu of this sections header.

            Activity

              People

              Assignee:
              buddenha Oswald Buddenhagen
              Reporter:
              cutti9876 Stéphane Lesage
              Votes:
              2 Vote for this issue
              Watchers:
              7 Start watching this issue

                Dates

                Created:
                Updated:
                Resolved:

                  Gerrit Reviews

                  There are no open Gerrit changes