Can't build Qt 5.9.2 from source. [Windows msvc2015 & MinGW]



  • I'm trying to build Qt 5.9.2 from the source code with the following method (wich I used before for build Qt 5.7.0 and it worked):
    For MSVC 2015 x85 build:

    1. Run "VS2015 x86 Native Tools Command Prompt"
    2. Go to Qt 5.9.2 source folder.
    3. configure.bat -prefix %CD%\qtbase -opensource -debug-and-release -skip qtwebengine -skip qtquickcontrols -no-icu -no-accessibility -nomake examples -nomake tests -opengl desktop
    4. nmake

    But after some build time I get the error:

    error: unable to read PCH file .pch\debug\Qt5Cored_pch.pch: 'no such file or directory'
    fatal error: PCH file '.pch\debug\Qt5Cored_pch.pch' not found: module file not found
    

    For the MinGW buidl I even can't configure it:

    1. Run mingw-w64.bat
    2. Go to Qt 5.9.2 source code
    3. configure.bat -prefix %CD%\qtbase -opensource -debug-and-release -skip qtwebengine -skip qtquickcontrols -no-icu -no-accessibility -nomake examples -nomake tests -opengl desktop

    And get ther error:

    v:\Qt\qt592gcc32>configure.bat -prefix %CD%\qtbase -opensource -debug-and-release -skip qtwebengine -skip qtquickcontrols -no-icu -no-accessibility -nomake examples -nomake tests -opengl desktop
    + cd qtbase
    + v:\Qt\qt592gcc32\qtbase\configure.bat -top-level -prefix v:\Qt\qt592gcc32\qtbase -opensource -debug-and-release -skip qtwebengine -skip qtquickcontrols -no-icu -no-accessibility -nomake examples -nomake tests -opengl desktop
    Bootstrapping qmake ...
    'nmake' is not recognized as an internal or external command,
    operable program or batch file.
    

    For the same time, this methods absolutely work for build Qt 5.7.0!
    Please, advice.


  • Moderators

    @nen777w said in Can't build Qt 5.9.2 from source. [Windows msvc2015 & MinGW]:

    For the MinGW buidl I even can't configure it:

    It looks like your trying to configure from the same polluted Qt source code directory, because configure still tries to use nmake which is only for VS.

    To solve the first issue try to add -no-pch to configure call



  • @jsulm
    Thanks for advice. I added "-no-pch" option to configure, build go ahead, but after some time again failed:

            cd windows\ && ( if not exist Makefile v:\Qt\qt-everywhere-opensource-src-5.9.2\qtbase\bin\qmake.exe -o Makefile V:\Qt\qt-everywhere-opensource-src-5.9.2\qtbase\src\plugins\platforms\windows\windows.pro ) && "C:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\BIN\nmake.exe" -f Makefile
    Project ERROR: Unknown module(s) in QT: accessibility_support-private
    

    Regarding the build on MinGW it's was absoluteness clean sources, I also wondering why it try to run namke.



  • Try another way for build.
    Create bath file:

    CALL "C:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\vcvarsall.bat" x86
    set QTDIR=
    set PATH=%CD%\qtbase\bin;%CD%\gnuwin32\bin;%PATH%
    configure.bat -prefix %CD%\..\qt5dll\ -opensource -debug-and-release -skip qtwebengine -skip qtquickcontrols -no-icu -no-accessibility -nomake examples -nomake tests -opengl desktop -mp
    

    run it from cmd, tan run nmake

    Result is same:

    error: unable to read PCH file .pch\debug\Qt5Cored_pch.pch: 'no such file or directory'
    fatal error: PCH file '.pch\debug\Qt5Cored_pch.pch' not found: module file not found
    

    The question is: Anybody tried to build Qt for Windows MSVC 2015 x86 and MinGW?


Log in to reply
 

Looks like your connection to Qt Forum was lost, please wait while we try to reconnect.