Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. General and Desktop
  4. Compiling Qt from sources

Compiling Qt from sources

Scheduled Pinned Locked Moved Solved General and Desktop
14 Posts 3 Posters 2.5k Views 2 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.
  • ODБOïO Offline
    ODБOïO Offline
    ODБOï
    wrote on last edited by
    #1

    I am trying to compile Qt 5.9.2 with mingw32

    windows 7 pro
    bison/flex/perl/python are avalable

    after 2 houres i have this, how to interpret this please ?

    g++ -c -fno-keep-inline-dllexport -DNDEBUG -DQT_IMAGE_DECODERS -DRAPIDJSON_HAS_STDSTRING=1 -D__QT__ -O3 -ftemplate-depth=1024 -fvisibility-inlines-hi
    den -fvisibility=hidden -D_WINDOWS -DNOGDI -DNOMINMAX -D_USE_MATH_DEFINES -DMBGL_USE_GLES2 -DMBGL_VERSION_REV=\"qt-v1.1.0\" -g -Og -std=c++1z -w -fex
    eptions -mthreads -DUNICODE -D_UNICODE -DQT_NO_NARROWING_CONVERSIONS_IN_CONNECT -DQT_NETWORK_LIB -DQT_GUI_LIB -DQT_SQL_LIB -DQT_CORE_LIB -I. -Ideps\a
    y\8fef1e9 -Ideps\any\8fef1e9\include -Ideps\boost\1.62.0 -Ideps\boost\1.62.0\include -Ideps/cheap-ruler/2.5.3 -Ideps/cheap-ruler/2.5.3/include -Ideps
    earcut\0.12.3 -Ideps\earcut\0.12.3\include -Ideps\geojson\0.4.0 -Ideps\geojson\0.4.0\include -Ideps\geojsonvt\6.2.1 -Ideps\geojsonvt\6.2.1\include -I
    eps\geometry\0.9.2 -Ideps\geometry\0.9.2\include -Ideps\kdbush\0.1.1-1 -Ideps\kdbush\0.1.1-1\include -Ideps/pixelmatch/0.10.0 -Ideps/pixelmatch/0.10.
    /include -Ideps\polylabel\1.0.3 -Ideps\polylabel\1.0.3\include -Ideps\protozero\1.5.2 -Ideps\protozero\1.5.2\include -Ideps\rapidjson\1.1.0 -Ideps\ra
    idjson\1.1.0\include -Ideps\shelf-pack\2.1.1 -Ideps\shelf-pack\2.1.1\include -Ideps\supercluster\0.2.2 -Ideps\supercluster\0.2.2\include -Ideps\uniqu
    _resource\cba309e -Ideps\unique_resource\cba309e\include -Ideps\variant\1.1.4 -Ideps\variant\1.1.4\include -Ideps\vector-tile\1.0.0-rc7 -Ideps\vector
    tile\1.0.0-rc7\include -Ideps\wagyu\0.4.3 -Ideps\wagyu\0.4.3\include -Iinclude -Iplatform\default -Iplatform\qt\include -Isrc -IC:\MyQt\qt-everywhere
    opensource-src-5.9.2\qtbase\include\QtNetwork\5.9.2 -IC:\MyQt\qt-everywhere-opensource-src-5.9.2\qtbase\include\QtNetwork\5.9.2\QtNetwork -IC:\MyQt\q
    -everywhere-opensource-src-5.9.2\qtbase\include\QtGui\5.9.2 -IC:\MyQt\qt-everywhere-opensource-src-5.9.2\qtbase\include\QtGui\5.9.2\QtGui -IC:\MyQt\q
    -everywhere-opensource-src-5.9.2\qtbase\include\QtSql\5.9.2 -IC:\MyQt\qt-everywhere-opensource-src-5.9.2\qtbase\include\QtSql\5.9.2\QtSql -IC:\MyQt\q
    -everywhere-opensource-src-5.9.2\qtbase\include\QtCore\5.9.2 -IC:\MyQt\qt-everywhere-opensource-src-5.9.2\qtbase\include\QtCore\5.9.2\QtCore -IC:\MyQ
    \qt-everywhere-opensource-src-5.9.2\qtbase\include -IC:\MyQt\qt-everywhere-opensource-src-5.9.2\qtbase\include\QtNetwork -IC:\MyQt\qt-everywhere-open
    ource-src-5.9.2\qtbase\include\QtGui -IC:\MyQt\qt-everywhere-opensource-src-5.9.2\qtbase\include\QtANGLE -IC:\MyQt\qt-everywhere-opensource-src-5.9.2
    qtbase\include\QtSql -IC:\MyQt\qt-everywhere-opensource-src-5.9.2\qtbase\include\QtCore -I.moc\debug -IC:\MyQt\qt-everywhere-opensource-src-5.9.2\qtb
    se\mkspecs\win32-g++  -o .obj\debug\async_task.o platform\qt\src\async_task.cpp
    In file included from include/mbgl/util/run_loop.hpp:4,
                     from platform\qt\src\async_task.cpp:4:
    include/mbgl/actor/mailbox.hpp:26:10: error: 'recursive_mutex' in namespace 'std' does not name a type
         std::recursive_mutex receivingMutex;
              ^~~~~~~~~~~~~~~
    include/mbgl/actor/mailbox.hpp:26:5: note: 'std::recursive_mutex' is defined in header '<mutex>'; did you forget to '#include <mutex>'?
    include/mbgl/actor/mailbox.hpp:6:1:
    +#include <mutex>
    
    include/mbgl/actor/mailbox.hpp:26:5:
         std::recursive_mutex receivingMutex;
         ^~~
    include/mbgl/actor/mailbox.hpp:27:10: error: 'mutex' in namespace 'std' does not name a type
         std::mutex pushingMutex;
              ^~~~~
    include/mbgl/actor/mailbox.hpp:27:5: note: 'std::mutex' is defined in header '<mutex>'; did you forget to '#include <mutex>'?
         std::mutex pushingMutex;
         ^~~
    include/mbgl/actor/mailbox.hpp:31:10: error: 'mutex' in namespace 'std' does not name a type
         std::mutex queueMutex;
              ^~~~~
    include/mbgl/actor/mailbox.hpp:31:5: note: 'std::mutex' is defined in header '<mutex>'; did you forget to '#include <mutex>'?
         std::mutex queueMutex;
         ^~~
    In file included from platform\qt\src\async_task.cpp:4:
    include/mbgl/util/run_loop.hpp:97:10: error: 'mutex' in namespace 'std' does not name a type
         std::mutex mutex;
              ^~~~~
    include/mbgl/util/run_loop.hpp:97:5: note: 'std::mutex' is defined in header '<mutex>'; did you forget to '#include <mutex>'?
    include/mbgl/util/run_loop.hpp:9:1:
    +#include <mutex>
    
    include/mbgl/util/run_loop.hpp:97:5:
         std::mutex mutex;
         ^~~
    include/mbgl/util/run_loop.hpp: In member function 'void mbgl::util::RunLoop::withMutex(std::function<void()>&&)':
    include/mbgl/util/run_loop.hpp:82:30: error: 'mutex' is not a member of 'std'
             std::lock_guard<std::mutex> lock(mutex);
                                  ^~~~~
    include/mbgl/util/run_loop.hpp:82:30: note: 'std::mutex' is defined in header '<mutex>'; did you forget to '#include <mutex>'?
    include/mbgl/util/run_loop.hpp:82:35: error: template argument 1 is invalid
             std::lock_guard<std::mutex> lock(mutex);
                                       ^
    include/mbgl/util/run_loop.hpp:82:42: error: 'mutex' was not declared in this scope
             std::lock_guard<std::mutex> lock(mutex);
                                              ^~~~~
    In file included from include/mbgl/util/run_loop.hpp:105,
                     from platform\qt\src\async_task.cpp:4:
    include/mbgl/util/work_task_impl.hpp: At global scope:
    include/mbgl/util/work_task_impl.hpp:46:10: error: 'recursive_mutex' in namespace 'std' does not name a type
         std::recursive_mutex mutex;
              ^~~~~~~~~~~~~~~
    include/mbgl/util/work_task_impl.hpp:46:5: note: 'std::recursive_mutex' is defined in header '<mutex>'; did you forget to '#include <mutex>'?
    include/mbgl/util/work_task_impl.hpp:1:1:
    +#include <mutex>
     #pragma once
    include/mbgl/util/work_task_impl.hpp:46:5:
         std::recursive_mutex mutex;
         ^~~
    include/mbgl/util/work_task_impl.hpp: In member function 'void mbgl::WorkTaskImpl<F, P>::operator()()':
    include/mbgl/util/work_task_impl.hpp:21:30: error: 'recursive_mutex' is not a member of 'std'
             std::lock_guard<std::recursive_mutex> lock(mutex);
                                  ^~~~~~~~~~~~~~~
    include/mbgl/util/work_task_impl.hpp:21:30: note: 'std::recursive_mutex' is defined in header '<mutex>'; did you forget to '#include <mutex>'?
    include/mbgl/util/work_task_impl.hpp:21:45: error: template argument 1 is invalid
             std::lock_guard<std::recursive_mutex> lock(mutex);
                                                 ^
    include/mbgl/util/work_task_impl.hpp:21:52: error: 'mutex' was not declared in this scope
             std::lock_guard<std::recursive_mutex> lock(mutex);
                                                        ^~~~~
    include/mbgl/util/work_task_impl.hpp: In member function 'void mbgl::WorkTaskImpl<F, P>::cancel()':
    include/mbgl/util/work_task_impl.hpp:36:30: error: 'recursive_mutex' is not a member of 'std'
             std::lock_guard<std::recursive_mutex> lock(mutex);
                                  ^~~~~~~~~~~~~~~
    include/mbgl/util/work_task_impl.hpp:36:30: note: 'std::recursive_mutex' is defined in header '<mutex>'; did you forget to '#include <mutex>'?
    include/mbgl/util/work_task_impl.hpp:36:45: error: template argument 1 is invalid
             std::lock_guard<std::recursive_mutex> lock(mutex);
                                                 ^
    include/mbgl/util/work_task_impl.hpp:36:52: error: 'mutex' was not declared in this scope
             std::lock_guard<std::recursive_mutex> lock(mutex);
                                                        ^~~~~
    mingw32-make[6]: *** [Makefile.Debug:2132: .obj/debug/async_task.o] Error 1
    mingw32-make[6]: Leaving directory 'C:/MyQt/qt-everywhere-opensource-src-5.9.2/qtlocation/src/3rdparty/mapbox-gl-native'
    mingw32-make[5]: *** [Makefile:40: debug-all] Error 2
    mingw32-make[5]: Leaving directory 'C:/MyQt/qt-everywhere-opensource-src-5.9.2/qtlocation/src/3rdparty/mapbox-gl-native'
    mingw32-make[4]: *** [Makefile:197: sub-------3rdparty-mapbox-gl-native-make_first] Error 2
    mingw32-make[4]: Leaving directory 'C:/MyQt/qt-everywhere-opensource-src-5.9.2/qtlocation/src/plugins/geoservices'
    mingw32-make[3]: *** [Makefile:67: sub-geoservices-make_first] Error 2
    mingw32-make[3]: Leaving directory 'C:/MyQt/qt-everywhere-opensource-src-5.9.2/qtlocation/src/plugins'
    mingw32-make[2]: *** [Makefile:201: sub-plugins-make_first] Error 2
    mingw32-make[2]: Leaving directory 'C:/MyQt/qt-everywhere-opensource-src-5.9.2/qtlocation/src'
    mingw32-make[1]: *** [Makefile:43: sub-src-make_first] Error 2
    mingw32-make[1]: Leaving directory 'C:/MyQt/qt-everywhere-opensource-src-5.9.2/qtlocation'
    mingw32-make: *** [Makefile:726: module-qtlocation-make_first] Error 2
    
    1 Reply Last reply
    0
    • mrjjM Offline
      mrjjM Offline
      mrjj
      Lifetime Qt Champion
      wrote on last edited by
      #2

      Hi
      What version of mingw ?
      I think mingw do not have support for std::recursive_mutex
      or at least not in the version that comes with 5.9.2
      Or at least thats what i found on google.
      But most post are few years old.

      ODБOïO 1 Reply Last reply
      3
      • mrjjM mrjj

        Hi
        What version of mingw ?
        I think mingw do not have support for std::recursive_mutex
        or at least not in the version that comes with 5.9.2
        Or at least thats what i found on google.
        But most post are few years old.

        ODБOïO Offline
        ODБOïO Offline
        ODБOï
        wrote on last edited by
        #3

        Hi,
        Thx for answer
        @mrjj said in Compiling Qt from sources:

        What version of mingw ?

        This is not a version that comes with Qt but a separate installation of minGw, is this bad ?

        mingw32-make - v
        output :
        GNU Make 4.2.1
        Built for x86_64-w64-mingw32

        I will try to :
        use more recent verions
        use minGw witch comes with qt tools

        Thank you

        mrjjM 1 Reply Last reply
        0
        • ODБOïO ODБOï

          Hi,
          Thx for answer
          @mrjj said in Compiling Qt from sources:

          What version of mingw ?

          This is not a version that comes with Qt but a separate installation of minGw, is this bad ?

          mingw32-make - v
          output :
          GNU Make 4.2.1
          Built for x86_64-w64-mingw32

          I will try to :
          use more recent verions
          use minGw witch comes with qt tools

          Thank you

          mrjjM Offline
          mrjjM Offline
          mrjj
          Lifetime Qt Champion
          wrote on last edited by
          #4

          @LeLev
          Hi
          Its not bad pr se, but i did burn my fingers using other version
          that the one Qt provides. One issue can be 64 bit but it seems you are using 32.
          so i would try the included mingw.
          I know the test is not trivial due to huge compile times:)

          ODБOïO 1 Reply Last reply
          3
          • mrjjM mrjj

            @LeLev
            Hi
            Its not bad pr se, but i did burn my fingers using other version
            that the one Qt provides. One issue can be 64 bit but it seems you are using 32.
            so i would try the included mingw.
            I know the test is not trivial due to huge compile times:)

            ODБOïO Offline
            ODБOïO Offline
            ODБOï
            wrote on last edited by
            #5

            @mrjj Thaks, i will try this tomorrow

            ODБOïO 1 Reply Last reply
            0
            • ODБOïO ODБOï

              @mrjj Thaks, i will try this tomorrow

              ODБOïO Offline
              ODБOïO Offline
              ODБOï
              wrote on last edited by ODБOï
              #6

              hi @mrjj

              6 houres ans 20 minutes and it is still running, is this normal ?

              Intel Core i5-6500 / 3.20 GHz
              8 Go RAM

              mrjjM 1 Reply Last reply
              0
              • ODБOïO ODБOï

                hi @mrjj

                6 houres ans 20 minutes and it is still running, is this normal ?

                Intel Core i5-6500 / 3.20 GHz
                8 Go RAM

                mrjjM Offline
                mrjjM Offline
                mrjj
                Lifetime Qt Champion
                wrote on last edited by
                #7

                @LeLev
                thats a bit long. does it uses all cores ?
                i mean did u use the -j option ?

                ODБOïO 1 Reply Last reply
                4
                • mrjjM mrjj

                  @LeLev
                  thats a bit long. does it uses all cores ?
                  i mean did u use the -j option ?

                  ODБOïO Offline
                  ODБOïO Offline
                  ODБOï
                  wrote on last edited by
                  #8

                  @mrjj No.. Sadly i have not used -j , next time, for sure i will use it, Thank you

                  1 Reply Last reply
                  0
                  • ODБOïO Offline
                    ODБOïO Offline
                    ODБOï
                    wrote on last edited by ODБOï
                    #9

                    Hi @mrjj, finally done!

                    But just a empty qtquick App 600Mo ?

                    I knew static makes the executable bigger but i was not expecting 600mo. There must be some techniques to optimise the executable size, no ?

                    edit : actually that was a debug build, release version is 20Mo

                    @mrjj meny thx for help

                    mrjjM 1 Reply Last reply
                    1
                    • ODБOïO ODБOï

                      Hi @mrjj, finally done!

                      But just a empty qtquick App 600Mo ?

                      I knew static makes the executable bigger but i was not expecting 600mo. There must be some techniques to optimise the executable size, no ?

                      edit : actually that was a debug build, release version is 20Mo

                      @mrjj meny thx for help

                      mrjjM Offline
                      mrjjM Offline
                      mrjj
                      Lifetime Qt Champion
                      wrote on last edited by
                      #10

                      @LeLev
                      Good work :)
                      and yes, debug builds are amazingly fat.

                      ODБOïO 1 Reply Last reply
                      2
                      • mrjjM mrjj

                        @LeLev
                        Good work :)
                        and yes, debug builds are amazingly fat.

                        ODБOïO Offline
                        ODБOïO Offline
                        ODБOï
                        wrote on last edited by
                        #11

                        @mrjj Hi,

                        I have a last question pls :

                        The folder where i installed Qt static version has now size of 638 Go ! is this 'normal' ?

                        mrjjM 1 Reply Last reply
                        0
                        • ODБOïO ODБOï

                          @mrjj Hi,

                          I have a last question pls :

                          The folder where i installed Qt static version has now size of 638 Go ! is this 'normal' ?

                          mrjjM Offline
                          mrjjM Offline
                          mrjj
                          Lifetime Qt Champion
                          wrote on last edited by mrjj
                          #12

                          @LeLev
                          I would check where you had build folder. it most like is in that folder too.
                          Seems a bit big :)
                          So there might be tons of .o files etc remaining.

                          1 Reply Last reply
                          3
                          • ODБOïO Offline
                            ODБOïO Offline
                            ODБOï
                            wrote on last edited by
                            #13

                            Hi
                            i have saved 300Go by deleting \mingw53_32_static\examples

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

                              Hi,

                              Always build with -nomake tests -nomake examples especially when doing a static build.

                              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
                              3

                              • Login

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