Important: Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct

Can't build Qt source with wine



  • 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



  • @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.



  • @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.



  • @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.


  • Lifetime Qt Champion

    @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.


Log in to reply