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

[Regr: 6.7.2 -> 6.8.0-beta2] Debug-Build fails linking with MSVC

    XMLWordPrintable

Details

    • Bug
    • Resolution: Fixed
    • P2: Important
    • None
    • 6.8.0 Beta2
    • Build System: CMake
    • None
    • Windows

    Description

      The RELEASE-Build compiles without any problems, but for the DEBUG-Build, we get the following error:

      [3352/5314] Linking CXX shared library qtbase\bin\Qt6Qmld.dll
      FAILED: qtbase/bin/Qt6Qmld.dll qtbase/lib/Qt6Qmld.lib 
      C:\Windows\system32\cmd.exe /C "cd . && "C:\Program Files\CMake\bin\cmake.exe" -E vs_link_dll --intdir=qtdeclarative\src\qml\CMakeFiles\Qml.dir --rc=C:\PROGRA~2\WI3CF2~1\10\bin\100226~1.0\x64\rc.exe --mt=C:\PROGRA~2\WI3CF2~1\10\bin\100226~1.0\x64\mt.exe --manifests  -- C:\PROGRA~1\MICROS~1\2022\COMMUN~1\VC\Tools\MSVC\1440~1.338\bin\Hostx64\x64\link.exe /nologo @CMakeFiles\Qml.rsp  /out:qtbase\bin\Qt6Qmld.dll /implib:qtbase\lib\Qt6Qmld.lib /pdb:qtbase\bin\Qt6Qmld.pdb /dll /version:6.8 /machine:x64 /debug  -DYNAMICBASE -NXCOMPAT -LARGEADDRESSAWARE -CETCOMPAT  && cd ."
      LINK: command "C:\PROGRA~1\MICROS~1\2022\COMMUN~1\VC\Tools\MSVC\1440~1.338\bin\Hostx64\x64\link.exe /nologo @CMakeFiles\Qml.rsp /out:qtbase\bin\Qt6Qmld.dll /implib:qtbase\lib\Qt6Qmld.lib /pdb:qtbase\bin\Qt6Qmld.pdb /dll /version:6.8 /machine:x64 /debug -DYNAMICBASE -NXCOMPAT -LARGEADDRESSAWARE -CETCOMPAT /MANIFEST:EMBED,ID=2" failed (exit code 1116) with the following output:
      LINK : fatal error LNK1116: cannot grow ilk file 'qtbase\bin\Qt6Qmld.ilk'; error code 487
      
      LINK : warning LNK4004: unable to shrink ilk file, 'qtbase\bin\Qt6Qmld.ilk', it may be larger than it needs to be, but is still valid; error code: 1224
      
      ninja: build stopped: subcommand failed.
      NMAKE : fatal error U1077: 'echo >nul && "C:\Program Files\CMake\bin\cmake.exe" --build . -j16' : return code '0x1'
      Stop.
      NMAKE : fatal error U1077: '"C:\Program Files\Microsoft Visual Studio\2022\Community\VC\Tools\MSVC\14.40.33807\bin\HostX64\x64\nmake.exe" -s -f CMakeFiles\qt.dir\build.make /nologo -SL                 CMakeFiles\qt.dir\build' : return code '0x2'
      Stop.
      NMAKE : fatal error U1077: '"C:\Program Files\Microsoft Visual Studio\2022\Community\VC\Tools\MSVC\14.40.33807\bin\HostX64\x64\nmake.exe" -s -f CMakeFiles\Makefile2 /nologo -SL                 CMakeFiles\compress.dir\all' : return code '0x2'
      Stop.
      NMAKE : fatal error U1077: '"C:\Program Files\Microsoft Visual Studio\2022\Community\VC\Tools\MSVC\14.40.33807\bin\HostX64\x64\nmake.exe" -s -f CMakeFiles\Makefile2 /nologo -LS                 compress' : return code '0x2'
      Stop.
      

      Configuration:

      + C:\J\workspace\default_RLW64MD\build\b\src\qt/qtbase/configure.bat -top-level -debug -prefix C:/J/workspace/default_RLW64MD/build/dist -system-proxies -openssl-linked -I C:/J/workspace/default_RLW64MD/build/dist/include -L C:/J/workspace/default_RLW64MD/build/dist/lib -no-feature-calendarwidget -no-feature-colordialog -no-feature-dial -no-feature-fontcombobox -no-feature-fontdialog -no-feature-lcdnumber -no-feature-splashscreen -no-feature-syntaxhighlighter -no-feature-undoview -no-feature-securetransport -no-feature-schannel -no-feature-mdiarea -no-icu -no-sql-odbc -opengl dynamic -platform win32-msvc -qml-debug -opensource -confirm-license -nomake examples -nomake tests -no-mtdev -no-dbus -no-sql-sqlite -qt-zlib -qt-pcre -qt-harfbuzz -qt-libpng -qt-libjpeg -ccache -no-feature-hijricalendar -no-feature-islamiccivilcalendar -no-feature-jalalicalendar -no-feature-designer -no-feature-testlib_selfcover -no-feature-imageformat_bmp -no-feature-imageformat_ppm -no-feature-imageformat_xbm -no-feature-sharedmemory -no-feature-textodfwriter -no-feature-undocommand -no-feature-undogroup -no-feature-undostack -no-feature-printsupport -no-feature-dtls -no-feature-dom -no-feature-sql -no-feature-xml -no-feature-pdf -no-feature-brotli -no-feature-topleveldomain -no-feature-private_tests -no-feature-dnslookup -no-feature-sctp -no-feature-filesystemwatcher -no-feature-libresolv -no-feature-quickcontrols2-imagine -no-feature-quickcontrols2-material -no-feature-quickcontrols2-universal -no-feature-quickcontrols2-fusion -skip qtactiveqt,qtlanguageserver -submodules qtbase,qtwebsockets,qtscxml,qttranslations,qtdeclarative,qtimageformats,qttools,qtsvg,qtconnectivity,qtshadertools -- -DBUILD_qtbase,qtwebsockets,qtscxml,qttranslations,qtdeclarative,qtimageformats,qttools,qtsvg,qtconnectivity,qtshadertools=ON -DOPENSSL_ROOT_DIR=C:/J/workspace/default_RLW64MD/build/dist -DCMAKE_PREFIX_PATH=C:/J/workspace/default_RLW64MD/build/dist
      -- Windows 10 SDK version: 10.0.22621.0
      Overriding option 'harfbuzz' with 'qt' (was: 'undefined')
      Overriding option 'libpng' with 'qt' (was: 'undefined')
      Overriding option 'libjpeg' with 'qt' (was: 'undefined')
      'C:/Program Files/CMake/bin/cmake.exe' '-DBUILD_qtactiveqt=OFF' '-DBUILD_qtlanguageserver=OFF' '-DQT_BUILD_SUBMODULES=qtbase;qtwebsockets;qtscxml;qttranslations;qtdeclarative;qtimageformats;qttools;qtsvg;qtconnectivity;qtshadertools' '-DBUILD_qtbase,qtwebsockets,qtscxml,qttranslations,qtdeclarative,qtimageformats,qttools,qtsvg,qtconnectivity,qtshadertools=ON' '-DOPENSSL_ROOT_DIR=C:/J/workspace/default_RLW64MD/build/dist' '-DCMAKE_PREFIX_PATH=C:/J/workspace/default_RLW64MD/build/dist' '-DQT_INTERNAL_CALLED_FROM_CONFIGURE:BOOL=TRUE' '-DFEATURE_calendarwidget=OFF' '-DFEATURE_colordialog=OFF' '-DFEATURE_dial=OFF' '-DFEATURE_fontcombobox=OFF' '-DFEATURE_fontdialog=OFF' '-DFEATURE_lcdnumber=OFF' '-DFEATURE_splashscreen=OFF' '-DFEATURE_syntaxhighlighter=OFF' '-DFEATURE_undoview=OFF' '-DFEATURE_securetransport=OFF' '-DFEATURE_schannel=OFF' '-DFEATURE_mdiarea=OFF' '-DFEATURE_hijricalendar=OFF' '-DFEATURE_islamiccivilcalendar=OFF' '-DFEATURE_jalalicalendar=OFF' '-DFEATURE_designer=OFF' '-DFEATURE_testlib_selfcover=OFF' '-DFEATURE_imageformat_bmp=OFF' '-DFEATURE_imageformat_ppm=OFF' '-DFEATURE_imageformat_xbm=OFF' '-DFEATURE_sharedmemory=OFF' '-DFEATURE_textodfwriter=OFF' '-DFEATURE_undocommand=OFF' '-DFEATURE_undogroup=OFF' '-DFEATURE_undostack=OFF' '-DFEATURE_printsupport=OFF' '-DFEATURE_dtls=OFF' '-DFEATURE_dom=OFF' '-DFEATURE_sql=OFF' '-DFEATURE_xml=OFF' '-DFEATURE_pdf=OFF' '-DFEATURE_brotli=OFF' '-DFEATURE_topleveldomain=OFF' '-DFEATURE_private_tests=OFF' '-DFEATURE_dnslookup=OFF' '-DFEATURE_sctp=OFF' '-DFEATURE_filesystemwatcher=OFF' '-DFEATURE_libresolv=OFF' '-DFEATURE_quickcontrols2_imagine=OFF' '-DFEATURE_quickcontrols2_material=OFF' '-DFEATURE_quickcontrols2_universal=OFF' '-DFEATURE_quickcontrols2_fusion=OFF' '-DQT_USE_CCACHE=ON' '-DCMAKE_INSTALL_PREFIX=C:/J/workspace/default_RLW64MD/build/dist' '-DQT_QMAKE_TARGET_MKSPEC=win32-msvc' '-DCMAKE_C_COMPILER=cl' '-DCMAKE_CXX_COMPILER=cl' '-DQT_BUILD_EXAMPLES=FALSE' '-DQT_BUILD_TESTS=FALSE' '-DCMAKE_BUILD_TYPE=Debug' '-DQT_EXTRA_INCLUDEPATHS=C:/J/workspace/default_RLW64MD/build/dist/include' '-DQT_EXTRA_LIBDIRS=C:/J/workspace/default_RLW64MD/build/dist/lib' '-DFEATURE_system_proxies=ON' '-DINPUT_openssl=linked' '-DFEATURE_icu=OFF' '-DINPUT_sql_odbc=no' '-DINPUT_opengl=dynamic' '-DFEATURE_qml_debug=ON' '-DFEATURE_mtdev=OFF' '-DFEATURE_dbus=OFF' '-DINPUT_sql_sqlite=no' '-DFEATURE_system_zlib=OFF' '-DINPUT_pcre=qt' '-DINPUT_harfbuzz=qt' '-DINPUT_libpng=qt' '-DINPUT_libjpeg=qt' '-G' 'Ninja' 'C:/J/workspace/default_RLW64MD/build/b/src/qt'
      -- The CXX compiler identification is MSVC 19.40.33811.0
      -- The C compiler identification is MSVC 19.40.33811.0
      -- The ASM compiler identification is MSVC
      -- Found assembler: C:/Program Files/Microsoft Visual Studio/2022/Community/VC/Tools/MSVC/14.40.33807/bin/Hostx64/x64/cl.exe
      -- Detecting CXX compiler ABI info
      -- Detecting CXX compiler ABI info - done
      -- Check for working CXX compiler: C:/Program Files/Microsoft Visual Studio/2022/Community/VC/Tools/MSVC/14.40.33807/bin/Hostx64/x64/cl.exe - skipped
      -- Detecting CXX compile features
      -- Detecting CXX compile features - done
      -- Detecting C compiler ABI info
      -- Detecting C compiler ABI info - done
      -- Check for working C compiler: C:/Program Files/Microsoft Visual Studio/2022/Community/VC/Tools/MSVC/14.40.33807/bin/Hostx64/x64/cl.exe - skipped
      -- Detecting C compile features
      -- Detecting C compile features - done
      -- Checking dependencies of submodule 'qtbase'
      -- Checking dependencies of submodule 'qtimageformats'
      -- Checking dependencies of submodule 'qtshadertools'
      -- Checking dependencies of submodule 'qtsvg'
      -- Checking dependencies of submodule 'qtdeclarative'
      -- Skipping optional dependency 'qtlanguageserver' of 'qtdeclarative', because building 'qtlanguageserver' was explicitly disabled.
      -- Checking dependencies of submodule 'qtwebsockets'
      -- Checking dependencies of submodule 'qtscxml'
      -- Checking dependencies of submodule 'qttools'
      -- Skipping optional dependency 'qtactiveqt' of 'qttools', because building 'qtactiveqt' was explicitly disabled.
      -- Checking dependencies of submodule 'qttranslations'
      -- Checking dependencies of submodule 'qtconnectivity'
      -- Configuring submodule 'qtbase'
      -- [QtBase] CMAKE_BUILD_TYPE was already explicitly set to: 'Debug'
                  -DCMAKE_C_FLAGS=/DWIN32 /D_WINDOWS
                  -DCMAKE_C_FLAGS_DEBUG=/Zi /Ob0 /Od /RTC1
                  -DCMAKE_C_FLAGS_RELEASE=/O2 /Ob2 /DNDEBUG
                  -DCMAKE_C_FLAGS_RELWITHDEBINFO=/Zi /O2 /Ob1 /DNDEBUG
                  -DCMAKE_CXX_FLAGS=/DWIN32 /D_WINDOWS /EHsc
                  -DCMAKE_CXX_FLAGS_DEBUG=/Zi /Ob0 /Od /RTC1
                  -DCMAKE_CXX_FLAGS_RELEASE=/O2 /Ob2 /DNDEBUG
                  -DCMAKE_CXX_FLAGS_RELWITHDEBINFO=/Zi /O2 /Ob1 /DNDEBUG
                  -DCMAKE_EXE_LINKER_FLAGS=/machine:x64
                  -DCMAKE_C_STANDARD=11
                  -DCMAKE_C_STANDARD_REQUIRED=ON
                  -DCMAKE_CXX_STANDARD=17
                  -DCMAKE_CXX_STANDARD_REQUIRED=ON
                  -DCMAKE_MODULE_PATH:STRING=C:/J/workspace/default_RLW64MD/build/b/src/qt/qtbase/cmake/platforms
      -- Configuring submodule 'qtimageformats'
      -- Configuring submodule 'qtshadertools'
      -- Configuring submodule 'qtsvg'
      -- Configuring submodule 'qtdeclarative'
      CMake Warning (dev) at C:/J/workspace/default_RLW64MD/build/b/src/qt-build/qtbase/lib/cmake/Qt6Core/Qt6CoreMacros.cmake:3347 (message):
        Qt policy QTP0004 is not set: You need qmldir files for each extra
        directory that contains .qml files for your module.  Check
        https://doc.qt.io/qt-6/qt-cmake-policy-qtp0004.html for policy details.
        Use the qt_policy command to set the policy and suppress this warning.
      
      Call Stack (most recent call first):
        qtdeclarative/src/qml/Qt6QmlMacros.cmake:3096 (__qt_internal_setup_policy)
        qtdeclarative/src/qml/Qt6QmlMacros.cmake:813 (qt6_target_qml_sources)
        qtdeclarative/src/qml/Qt6QmlBuildInternals.cmake:304 (qt6_add_qml_module)
        qtdeclarative/src/quickdialogs/quickdialogsquickimpl/CMakeLists.txt:58 (qt_internal_add_qml_module)
      This warning is for project developers.  Use -Wno-dev to suppress it.
      
      CMake Warning (dev) at C:/J/workspace/default_RLW64MD/build/b/src/qt-build/qtbase/lib/cmake/Qt6Core/Qt6CoreMacros.cmake:3347 (message):
        Qt policy QTP0004 is not set: You need qmldir files for each extra
        directory that contains .qml files for your module.  Check
        https://doc.qt.io/qt-6/qt-cmake-policy-qtp0004.html for policy details.
        Use the qt_policy command to set the policy and suppress this warning.
      
      Call Stack (most recent call first):
        qtdeclarative/src/qml/Qt6QmlMacros.cmake:3096 (__qt_internal_setup_policy)
        qtdeclarative/src/qml/Qt6QmlMacros.cmake:813 (qt6_target_qml_sources)
        qtdeclarative/src/qml/Qt6QmlBuildInternals.cmake:304 (qt6_add_qml_module)
        qtdeclarative/src/quicknativestyle/CMakeLists.txt:37 (qt_internal_add_qml_module)
      This warning is for project developers.  Use -Wno-dev to suppress it.
      
      -- Configuring submodule 'qtwebsockets'
      CMake Warning (dev) at C:/J/workspace/default_RLW64MD/build/b/src/qt-build/qtbase/lib/cmake/Qt6Qml/Qt6QmlBuildInternals.cmake:434 (message):
        INSTALL_SOURCE_QMLTYPES option is deprecated and should not be used.
        Please port your module to use declarative type registration.
      Call Stack (most recent call first):
        qtwebsockets/src/imports/qmlwebsockets/CMakeLists.txt:4 (qt_internal_add_qml_module)
      This warning is for project developers.  Use -Wno-dev to suppress it.
      
      -- Configuring submodule 'qtscxml'
      -- Configuring submodule 'qttools'
      -- Could NOT find Clang (missing: Clang_DIR)
      -- Could NOT find Clang (missing: Clang_DIR)
      -- Configuring submodule 'qttranslations'
      -- Configuring submodule 'qtconnectivity'
      -- Could NOT find Qt6DBus (missing: Qt6DBus_DIR)
      CMake Warning at C:/J/workspace/default_RLW64MD/build/b/src/qt-build/qtbase/lib/cmake/Qt6/Qt6Config.cmake:238 (message):
        Failed to find optional Qt component "DBus".
      
        Expected Config file at
        "C:/J/workspace/default_RLW64MD/build/b/src/qt-build/qtbase/lib/cmake/Qt6DBus/Qt6DBusConfig.cmake"
        does NOT exist
      
      Call Stack (most recent call first):
        qtconnectivity/CMakeLists.txt:15 (find_package)
      
      
      
      -- Configuration summary has been written to C:/J/workspace/default_RLW64MD/build/b/src/qt-build/config.summary
      
      WARNING: QDoc will not be compiled, probably because clang's C and C++ libraries could not be located. This means that you cannot build the Qt documentation.
      You may need to set CMAKE_PREFIX_PATH or LLVM_INSTALL_DIR to the location of your llvm installation.
      Other than clang's libraries, you may need to install another package, such as clang itself, to provide the ClangConfig.cmake file needed to detect your libraries. Once this
      file is in place, the configure script may be able to detect your system-installed libraries without further environment variables.
      On macOS, you can use Homebrew's llvm package.
      You will also need to set the FEATURE_clang CMake variable to ON to re-evaluate this check.
      WARNING: Clang-based lupdate parser will not be available. Suitable LLVM and Clang C++ libraries have not been found.
      You will need to set the FEATURE_clangcpp CMake variable to ON to re-evaluate this check.
      
      -- 
      
      Qt is now configured for building. Just run 'cmake --build . --parallel'
      
      Once everything is built, you must run 'cmake --install .'
      Qt will be installed into 'C:/J/workspace/default_RLW64MD/build/dist'
      
      To configure and build other Qt modules, you can use the following convenience script:
              C:/J/workspace/default_RLW64MD/build/dist/bin/qt-configure-module.bat
      
      If reconfiguration fails for some reason, try removing 'CMakeCache.txt' from the build directory
      Alternatively, you can add the --fresh flag to your CMake flags.
      
      -- Configuring done (111.4s)
      

      Attachments

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

        Activity

          People

            qtbuildsystem Qt Build System Team
            jgreilich Julian Greilich
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Gerrit Reviews

                There are no open Gerrit changes