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. Can't build Qt source with wine
Forum Update on Monday, May 27th 2025

Can't build Qt source with wine

Scheduled Pinned Locked Moved Solved Installation and Deployment
4 Posts 3 Posters 994 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.
  • D Offline
    D Offline
    dsant
    wrote on 9 Jun 2020, 13:53 last edited by dsant 6 Sept 2020, 15:38
    #1

    Hello,
    I try to build Qt for Windows from source using wine on Linux :

    • Downloaded qt-opensource-windows-x86-5.12.8.exe (or qt-opensource-windows-x86-5.9.4.exe) and installed it on wine, not forgetting mingw and Sources.
    • Added in PATH : C:\Qt\Qt5.12.8\5.12.8\mingw73_32\bin , C:/Qt/Qt5.12.8/Tools/mingw730_32\bin
    • configure.bat -static -release -platform win32-g++ -prefix "C:/Qt/Static" -opensource -confirm-license -optimize-size -opengl desktop -qt-zlib -qt-pcre -qt-libpng -qt-libjpeg -qt-freetype -no-openssl -make libs -nomake tools -nomake examples -nomake tests -skip webengine -skip webview -skip qt3d

    I always have this error :

    Cannot read C:/Qt/Qt5.12.8/5.12.8/Src/qtbase/mkspecs/qmake.conf: No such file or directory
    Could not read qmake configuration file C:/Qt/Qt5.12.8/5.12.8/Src/qtbase/mkspecs/qmake.conf.
    Error processing project file: C:\Qt\Qt5.12.8\5.12.8\Src\qtbase\qtbase.pro
    

    BUT this file does not exist here ! Rather it is in C:/Qt/Qt5.12.8/5.12.8/Src/qtbase/mkspecs/win32-g++/qmake.conf

    Is it a bug ? Or did I forget a path ?

    Note : If I try to set QMAKESPEC by hand, I have the error :

    Please make sure to unset the QMAKESPEC, XQMAKESPEC, QMAKEPATH, and QMAKEFEATURES environment variables prior to building Qt.
    

    Note2 : In C:/Qt/Qt5.12.8/5.12.8/Src/qtbase/qtbase.pro there is :

    mkspecs.path = $$[QT_HOST_DATA]/mkspecs
    

    Changing to "mkspecs.path = $$[QT_HOST_DATA]/mkspecs/win32-g++" does not seem to change anything

    P 1 Reply Last reply 9 Jun 2020, 15:44
    0
    • D Offline
      D Offline
      dsant
      wrote on 10 Jun 2020, 16:48 last edited by dsant 6 Nov 2020, 08:03
      #3

      @Pablo : Thanks a lot. You gave me the good advice !
      I tried in a VM, it's night and day : on wine "configure.bat" does nothing, in the VM it builds a lot of things.
      My advice : give up wine for buiding Qt.
      More over, as you might know MS gives 90 days VM images for free ( https://developer.microsoft.com/en-us/microsoft-edge/tools/vms/ ) . And I will have to test anyway.
      SOLVED.

      M 1 Reply Last reply 10 Jun 2020, 16:56
      0
      • D dsant
        9 Jun 2020, 13:53

        Hello,
        I try to build Qt for Windows from source using wine on Linux :

        • Downloaded qt-opensource-windows-x86-5.12.8.exe (or qt-opensource-windows-x86-5.9.4.exe) and installed it on wine, not forgetting mingw and Sources.
        • Added in PATH : C:\Qt\Qt5.12.8\5.12.8\mingw73_32\bin , C:/Qt/Qt5.12.8/Tools/mingw730_32\bin
        • configure.bat -static -release -platform win32-g++ -prefix "C:/Qt/Static" -opensource -confirm-license -optimize-size -opengl desktop -qt-zlib -qt-pcre -qt-libpng -qt-libjpeg -qt-freetype -no-openssl -make libs -nomake tools -nomake examples -nomake tests -skip webengine -skip webview -skip qt3d

        I always have this error :

        Cannot read C:/Qt/Qt5.12.8/5.12.8/Src/qtbase/mkspecs/qmake.conf: No such file or directory
        Could not read qmake configuration file C:/Qt/Qt5.12.8/5.12.8/Src/qtbase/mkspecs/qmake.conf.
        Error processing project file: C:\Qt\Qt5.12.8\5.12.8\Src\qtbase\qtbase.pro
        

        BUT this file does not exist here ! Rather it is in C:/Qt/Qt5.12.8/5.12.8/Src/qtbase/mkspecs/win32-g++/qmake.conf

        Is it a bug ? Or did I forget a path ?

        Note : If I try to set QMAKESPEC by hand, I have the error :

        Please make sure to unset the QMAKESPEC, XQMAKESPEC, QMAKEPATH, and QMAKEFEATURES environment variables prior to building Qt.
        

        Note2 : In C:/Qt/Qt5.12.8/5.12.8/Src/qtbase/qtbase.pro there is :

        mkspecs.path = $$[QT_HOST_DATA]/mkspecs
        

        Changing to "mkspecs.path = $$[QT_HOST_DATA]/mkspecs/win32-g++" does not seem to change anything

        P Offline
        P Offline
        Pablo J. Rogina
        wrote on 9 Jun 2020, 15:44 last edited by
        #2

        @dsant

        build Qt for Windows from source using wine on Linux

        maybe not the best experience... but "beauty lies in the eye of the beholder"

        Just in case, have you checked the "Qt for Windows - Building from Source" guide?

        Downloaded qt-opensource-windows-x86-5.12.8.exe

        Although I guess you can have the sources by using such installer, I guess it's better to grab sources as instructed in the guide I mentioned previously.

        Upvote the answer(s) that helped you solve the issue
        Use "Topic Tools" button to mark your post as Solved
        Add screenshots via postimage.org
        Don't ask support requests via chat/PM. Please use the forum so others can benefit from the solution in the future

        1 Reply Last reply
        1
        • D Offline
          D Offline
          dsant
          wrote on 10 Jun 2020, 16:48 last edited by dsant 6 Nov 2020, 08:03
          #3

          @Pablo : Thanks a lot. You gave me the good advice !
          I tried in a VM, it's night and day : on wine "configure.bat" does nothing, in the VM it builds a lot of things.
          My advice : give up wine for buiding Qt.
          More over, as you might know MS gives 90 days VM images for free ( https://developer.microsoft.com/en-us/microsoft-edge/tools/vms/ ) . And I will have to test anyway.
          SOLVED.

          M 1 Reply Last reply 10 Jun 2020, 16:56
          0
          • D dsant
            10 Jun 2020, 16:48

            @Pablo : Thanks a lot. You gave me the good advice !
            I tried in a VM, it's night and day : on wine "configure.bat" does nothing, in the VM it builds a lot of things.
            My advice : give up wine for buiding Qt.
            More over, as you might know MS gives 90 days VM images for free ( https://developer.microsoft.com/en-us/microsoft-edge/tools/vms/ ) . And I will have to test anyway.
            SOLVED.

            M Offline
            M Offline
            mrjj
            Lifetime Qt Champion
            wrote on 10 Jun 2020, 16:56 last edited by
            #4

            @dsant
            Hi
            Yes and if using vmware or virtual box, you can use the snapshot feature to make it work for
            longer.
            Wine is cool tech but its not a complete window Os.
            So yes a virtual machines are much more fun.

            1 Reply Last reply
            0

            1/4

            9 Jun 2020, 13:53

            • Login

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