Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. General and Desktop
  4. Can't build Qt 5.9.2 from source. [Windows msvc2015 & MinGW]
Qt 6.12 LTS is out! See what's new in the release blog

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

Scheduled Pinned Locked Moved Unsolved General and Desktop
4 Posts 2 Posters 3.7k 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.
  • N Offline
    N Offline
    nen777w
    wrote on last edited by
    #1

    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.

    jsulmJ 1 Reply Last reply
    0
    • N nen777w

      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.

      jsulmJ Offline
      jsulmJ Offline
      jsulm
      Lifetime Qt Champion
      wrote on last edited by
      #2

      @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

      https://forum.qt.io/topic/113070/qt-code-of-conduct

      N 1 Reply Last reply
      0
      • jsulmJ jsulm

        @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

        N Offline
        N Offline
        nen777w
        wrote on last edited by
        #3

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

        1 Reply Last reply
        0
        • N Offline
          N Offline
          nen777w
          wrote on last edited by nen777w
          #4

          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?

          1 Reply Last reply
          0

          • Login

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