Uploaded image for project: 'Qt'
  1. Qt
  2. QTBUG-115242

Ninja Multi-Config build with MSVC fails after successfull configuration

    XMLWordPrintable

Details

    • Bug
    • Resolution: Invalid
    • P2: Important
    • None
    • 6.5.1
    • Build System: CMake
    • None
    • Windows

    Description

      Start a Visual Studio 64 Bit native PowerShell by:

      C:\Windows\System32\WindowsPowerShell\v1.0\powershell.exe -noe -c "&{Import-Module """C:\Program Files (x86)\Microsoft Visual Studio\2019\Professional\Common7\Tools\Microsoft.VisualStudio.DevShell.dll"""; Enter-VsDevShell 0be9bd99 -DevCmdArguments -arch=x64}"

      Configure and generate via CMake:

      cmake  "-GNinja Multi-Config" "-DCMAKE_CONFIGURATION_TYPES=Release;Debug" "-DQT_BUILD_BENCHMARKS=OFF" "-DQT_BUILD_EXAMPLES=OFF" "-DQT_BUILD_TESTS=OFF" "-DBUILD_WITH_PCH=OFF" "-DQT_BUILD_SUBMODULES=qtbase" --trace-expand --trace-redirect=cmake_trace.txt --log-level=STATUS ../qt

      Build in debug mode:

      cmake "-build" "." "-config" "Debug"

      Output:

      [126/2113] Compiling syncqt
      [1/1] Cleaning all built files...
      Cleaning... 2 files.
      [1/2] Building CXX object CMakeFiles\syncqt.dir\RelWithDebInfo\main.cpp.obj
      [2/2] Linking CXX executable C:\Temp\qt_build\qtbase\bin\RelWithDebInfo\syncqt.exe
      [1190/2113] Running rcc for resource gui_shaders
      FAILED: qtbase/src/gui/.rcc/qrc_gui_shaders.cpp
      cmd.exe /C "cd /D C:\Temp\qt_build\qtbase\src\gui && C:\Temp\qt_build\qtbase\bin\Debug\rcc.exe --output C:/Temp/qt_build/qtbase/src/gui/.rcc/qrc_gui_shaders.cpp --name gui_shaders C:/Temp/qt_build/qtbase/src/gui/.rcc/gui_shaders.qrc --no-zstd"
      [1196/2113] Running rcc for resource qpdf
      FAILED: qtbase/src/gui/.rcc/qrc_qpdf.cpp
      cmd.exe /C "cd /D C:\Temp\qt_build\qtbase\src\gui && C:\Temp\qt_build\qtbase\bin\Debug\rcc.exe --output C:/Temp/qt_build/qtbase/src/gui/.rcc/qrc_qpdf.cpp --name qpdf C:/Temp/qt_build/qtbase/src/gui/.rcc/qpdf.qrc --no-zstd"
      [1211/2113] Building CXX object qtbase\src\network\CMakeFiles\Network.dir\Debug\ssl\qsslsocket.cpp.obj
      ninja: build stopped: subcommand failed.

      Filesystem:

      PS C:\Temp\qt_build\qtbase\bin> ls -r

          Directory: C:\Temp\qt_build\qtbase\bin

      Mode                 LastWriteTime         Length Name
      ----                 -------------         ------ ----
      d-----        14.07.2023     10:41                Debug
      d-----        14.07.2023     10:35                Release
      d-----        14.07.2023     10:39                RelWithDebInfo
      a---        14.07.2023     10:39        1274368 moc.exe
      a---        14.07.2023     10:34           1066 qt-cmake-private-install.cmake
      a---        14.07.2023     10:34            588 qt-cmake-private.bat
      a---        14.07.2023     10:34            217 qt-cmake-standalone-test.bat
      a---        14.07.2023     10:34            566 qt-cmake.bat
      a---        14.07.2023     10:34           1106 qt-configure-module.bat
      a---        14.07.2023     10:34            960 qt-internal-configure-tests.bat
      a---        14.07.2023     10:41          86016 Qt6Concurrentd.dll
      a---        14.07.2023     10:41            381 Qt6Concurrentd.dll.manifest
      a---        14.07.2023     10:41         764336 Qt6Concurrentd.ilk
      a---        14.07.2023     10:41        1970176 Qt6Concurrentd.pdb
      a---        14.07.2023     10:40        5739520 Qt6Core.dll
      a---        14.07.2023     10:40            381 Qt6Core.dll.manifest
      a---        14.07.2023     10:41       16885248 Qt6Cored.dll
      a---        14.07.2023     10:41            381 Qt6Cored.dll.manifest
      a---        14.07.2023     10:41      193358536 Qt6Cored.ilk
      a---        14.07.2023     10:41       52064256 Qt6Cored.pdb
      a---        14.07.2023     10:41         798208 Qt6Sqld.dll
      a---        14.07.2023     10:41            381 Qt6Sqld.dll.manifest
      a---        14.07.2023     10:41        4673904 Qt6Sqld.ilk
      a---        14.07.2023     10:41        5115904 Qt6Sqld.pdb

          Directory: C:\Temp\qt_build\qtbase\bin\Debug

      Mode                 LastWriteTime         Length Name
      ----                 -------------         ------ ----
      a---        14.07.2023     10:39        4592128 cmake_automoc_parser.exe
      a---        14.07.2023     10:39       16530864 cmake_automoc_parser.ilk
      a---        14.07.2023     10:39       13389824 cmake_automoc_parser.pdb
      a---        14.07.2023     10:39        5418496 moc.exe
      a---        14.07.2023     10:39       20810560 moc.ilk
      a---        14.07.2023     10:39       16510976 moc.pdb
      a---        14.07.2023     10:41         356352 rcc.exe
      a---        14.07.2023     10:41        2233144 rcc.ilk
      a---        14.07.2023     10:41        2977792 rcc.pdb

          Directory: C:\Temp\qt_build\qtbase\bin\RelWithDebInfo

      Mode                 LastWriteTime         Length Name
      ----                 -------------         ------ ----
      a---        14.07.2023     10:39         574976 syncqt.exe
      a---        14.07.2023     10:39        3906328 syncqt.ilk
      a---        14.07.2023     10:39        7147520 syncqt.pdb


      The Release build works fine: cmake "-build" "." "-config" "Release"

      I need a Ninja Multi Config build because I want to install release and debug to the same directory structure. cmake "-build" "." "-config" "Debug"

      When I do two separate Ninja (non-multi-config) builds, then the second install removes the config files from the first one. (Debug removes Release or Release removes Debug CMake Config files.) ✗

      It also does work to install a Release to some other location and then make a Cross Build. ✓

      Attachments

        1. cmake_trace.zip
          2.44 MB
          Benjamin Buch

        Issue Links

          No reviews matched the request. Check your Options in the drop-down menu of this sections header.

          Activity

            People

              qtbuildsystem Qt Build System Team
              bebuch Benjamin Buch
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved:

                Gerrit Reviews

                  There are no open Gerrit changes