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

Debug won't compile with -MD

    XMLWordPrintable

Details

    • Bug
    • Resolution: Unresolved
    • P2: Important
    • None
    • 6.2.3
    • OpcUA
    • None
    • Windows

    Description

      On Windows QtWebengine fails to compile with -MD.

      (Done by adding the line below after cmake_minimum_required in CMakeLists.txt)

       set(CMAKE_MSVC_RUNTIME_LIBRARY "MultiThreadedDLL")
      

      I could not find any documentation on how to do it another way.

      To quote thiago

      On Windows, we should stop enforcing that unoptimised builds 
      be -MDd and make it easy for people to debug into -MD libraries. Hardly anyone 
      ever debugs into Microsoft's libraries...
      

      ( https://lists.qt-project.org/pipermail/development/2019-June/036501.html )

      I configured with:
      ..\configure --prefix=%CD%/qtbase -cmake-generator Ninja -debug-qt-sqlite -nomake examples -no-dbus -opengl desktop -openssl -I D:\openSSL\openssl-1.1.1m\include -skip qtconnectivity -skip qtwebview -skip qtdatavis3d -skip qtgamepad -skip qtscript -skip qt3d -skip qtdoc -skip qtactiveqt -skip qtwebglplugin -skip qtquick3d -skip qtspeech -skip qtdoc
      (replacing -debug with -release works fine)

      In debug I get the below errors:

      [1906/6553] cmd.exe /C "cd /D D:\3pp\Qt\Src\debug_web_engine_test\qttranslations\translations && "C:\Program Files\CMake\bin\cmake.exe" -E make_directory D:/3pp/Qt/Src/debug_web_engine_test/qtbase/translations && D:\3pp\Qt\Src\debug_web_engine_test\qtbase\bin\lrelease.exe D:/3pp/Qt/Src/qttranslations/translations/linguist_da.ts -qm D:/3pp/Qt/Src/debug_web_engine_test/qtbase/translations/linguist_da.qm"
      Updating 'D:/3pp/Qt/Src/debug_web_engine_test/qtbase/translations/linguist_da.qm'...
          Generated 396 translation(s) (396 finished and 0 unfinished)
      [3170/6553] Building CXX object qtopcua\src\opcua\CMakeFiles\OpcUa.dir\x509\qopcuakeypair_openssl.cpp.obj
      FAILED: qtopcua/src/opcua/CMakeFiles/OpcUa.dir/x509/qopcuakeypair_openssl.cpp.obj
      C:\PROGRA~2\MICROS~2\2019\BUILDT~1\VC\Tools\MSVC\1429~1.301\bin\Hostx64\x64\cl.exe  /nologo /TP -DOpcUa_EXPORTS -DQT_ASCII_CAST_WARNINGS -DQT_BUILDING_QT -DQT_BUILD_OPCUA_LIB -DQT_CORE_LIB -DQT_DEPRECATED_WARNINGS -DQT_DEPRECATED_WARNINGS_SINCE=0x060000 -DQT_DISABLE_DEPRECATED_BEFORE=0x040800 -DQT_MOC_COMPAT -DQT_NETWORK_LIB -DQT_NO_CAST_TO_ASCII -DQT_NO_EXCEPTIONS -DQT_NO_FOREACH -DQT_NO_NARROWING_CONVERSIONS_IN_CONNECT -DQT_USE_QSTRINGBUILDER -DUNICODE -DWIN32 -DWIN64 -D_CRT_SECURE_NO_WARNINGS -D_ENABLE_EXTENDED_ALIGNED_STORAGE -D_UNICODE -D_USE_MATH_DEFINES -D_WIN64 -D_WINDLL -ID:\3pp\Qt\Src\debug_web_engine_test\qtopcua\src\opcua\OpcUa_autogen\include -ID:\3pp\Qt\Src\debug_web_engine_test\qtbase\include -ID:\3pp\Qt\Src\debug_web_engine_test\qtbase\include\QtOpcUa -ID:\3pp\Qt\Src\qtopcua\src\opcua -ID:\3pp\Qt\Src\debug_web_engine_test\qtopcua\src\opcua -ID:\3pp\Qt\Src\debug_web_engine_test\qtbase\include\QtOpcUa\6.2.3 -ID:\3pp\Qt\Src\debug_web_engine_test\qtbase\include\QtOpcUa\6.2.3\QtOpcUa -ID:\3pp\Qt\Src\debug_web_engine_test\qtbase\include\QtCore -ID:\3pp\Qt\Src\debug_web_engine_test\qtbase\mkspecs\win32-msvc -ID:\3pp\Qt\Src\debug_web_engine_test\qtbase\include\QtNetwork -ID:\3pp\Qt\Src\debug_web_engine_test\qtbase\src\corelib -ID:\3pp\Qt\Src\debug_web_engine_test\qtbase\include\QtCore\6.2.3 -ID:\3pp\Qt\Src\debug_web_engine_test\qtbase\include\QtCore\6.2.3\QtCore -ID:\3pp\Qt\Src\debug_web_engine_test\qtbase\src\network -ID:\3pp\Qt\Src\debug_web_engine_test\qtbase\include\QtNetwork\6.2.3 -ID:\3pp\Qt\Src\debug_web_engine_test\qtbase\include\QtNetwork\6.2.3\QtNetwork -ID:\\openSSL\\openssl-1.1.1m\\include -I"C:\Program Files\OpenSSL\include" /DWIN32 /D_WINDOWS /Zi     /RTC1 -MD /W3 /wd4530 /wd4577 -Zc:__cplusplus -permissive- -utf-8 -FS -Zc:rvalueCast -Zc:inline -Zc:strictStrings -Zc:throwingNew -Zc:referenceBinding -Zc:externConstexpr -Zc:wchar_t -std:c++17 /YuD:/3pp/Qt/Src/debug_web_engine_test/qtopcua/src/opcua/CMakeFiles/OpcUa.dir/cmake_pch.hxx /FpD:/3pp/Qt/Src/debug_web_engine_test/qtopcua/src/opcua/CMakeFiles/OpcUa.dir/./cmake_pch.cxx.pch /FID:/3pp/Qt/Src/debug_web_engine_test/qtopcua/src/opcua/CMakeFiles/OpcUa.dir/cmake_pch.hxx /showIncludes /Foqtopcua\src\opcua\CMakeFiles\OpcUa.dir\x509\qopcuakeypair_openssl.cpp.obj /Fdqtopcua\src\opcua\CMakeFiles\OpcUa.dir\ /FS -c D:\3pp\Qt\Src\qtopcua\src\opcua\x509\qopcuakeypair_openssl.cpp
      D:\3pp\Qt\Src\qtopcua\src\opcua\x509\qopcuakeypair_openssl.cpp(140): error C3861: 'q_EVP_PKEY_CTX_new_id': identifier not found
      D:\3pp\Qt\Src\qtopcua\src\opcua\x509\qopcuakeypair_openssl.cpp(145): error C2065: 'q_EVP_PKEY_CTX_free': undeclared identifier
      D:\3pp\Qt\Src\qtopcua\src\opcua\x509\qopcuakeypair_openssl.cpp(147): error C3861: 'q_EVP_PKEY_keygen_init': identifier not found
      D:\3pp\Qt\Src\qtopcua\src\opcua\x509\qopcuakeypair_openssl.cpp(152): error C3861: 'q_EVP_PKEY_CTX_set_rsa_keygen_bits': identifier not found
      D:\3pp\Qt\Src\qtopcua\src\opcua\x509\qopcuakeypair_openssl.cpp(157): error C3861: 'q_EVP_PKEY_keygen': identifier not found
      D:\3pp\Qt\Src\qtopcua\src\opcua\x509\qopcuakeypair_openssl.cpp(210): error C2027: use of undefined type 'evp_pkey_st'
      D:\openSSL\openssl-1.1.1m\include\openssl/ossl_typ.h(93): note: see declaration of 'evp_pkey_st'
      [3178/6553] Building CXX object qtopcua\src\opcua\CMakeFiles\OpcUa.dir\x509\qopcuax509certificatesigningrequest_openssl.cpp.obj
      FAILED: qtopcua/src/opcua/CMakeFiles/OpcUa.dir/x509/qopcuax509certificatesigningrequest_openssl.cpp.obj
      C:\PROGRA~2\MICROS~2\2019\BUILDT~1\VC\Tools\MSVC\1429~1.301\bin\Hostx64\x64\cl.exe  /nologo /TP -DOpcUa_EXPORTS -DQT_ASCII_CAST_WARNINGS -DQT_BUILDING_QT -DQT_BUILD_OPCUA_LIB -DQT_CORE_LIB -DQT_DEPRECATED_WARNINGS -DQT_DEPRECATED_WARNINGS_SINCE=0x060000 -DQT_DISABLE_DEPRECATED_BEFORE=0x040800 -DQT_MOC_COMPAT -DQT_NETWORK_LIB -DQT_NO_CAST_TO_ASCII -DQT_NO_EXCEPTIONS -DQT_NO_FOREACH -DQT_NO_NARROWING_CONVERSIONS_IN_CONNECT -DQT_USE_QSTRINGBUILDER -DUNICODE -DWIN32 -DWIN64 -D_CRT_SECURE_NO_WARNINGS -D_ENABLE_EXTENDED_ALIGNED_STORAGE -D_UNICODE -D_USE_MATH_DEFINES -D_WIN64 -D_WINDLL -ID:\3pp\Qt\Src\debug_web_engine_test\qtopcua\src\opcua\OpcUa_autogen\include -ID:\3pp\Qt\Src\debug_web_engine_test\qtbase\include -ID:\3pp\Qt\Src\debug_web_engine_test\qtbase\include\QtOpcUa -ID:\3pp\Qt\Src\qtopcua\src\opcua -ID:\3pp\Qt\Src\debug_web_engine_test\qtopcua\src\opcua -ID:\3pp\Qt\Src\debug_web_engine_test\qtbase\include\QtOpcUa\6.2.3 -ID:\3pp\Qt\Src\debug_web_engine_test\qtbase\include\QtOpcUa\6.2.3\QtOpcUa -ID:\3pp\Qt\Src\debug_web_engine_test\qtbase\include\QtCore -ID:\3pp\Qt\Src\debug_web_engine_test\qtbase\mkspecs\win32-msvc -ID:\3pp\Qt\Src\debug_web_engine_test\qtbase\include\QtNetwork -ID:\3pp\Qt\Src\debug_web_engine_test\qtbase\src\corelib -ID:\3pp\Qt\Src\debug_web_engine_test\qtbase\include\QtCore\6.2.3 -ID:\3pp\Qt\Src\debug_web_engine_test\qtbase\include\QtCore\6.2.3\QtCore -ID:\3pp\Qt\Src\debug_web_engine_test\qtbase\src\network -ID:\3pp\Qt\Src\debug_web_engine_test\qtbase\include\QtNetwork\6.2.3 -ID:\3pp\Qt\Src\debug_web_engine_test\qtbase\include\QtNetwork\6.2.3\QtNetwork -ID:\\openSSL\\openssl-1.1.1m\\include -I"C:\Program Files\OpenSSL\include" /DWIN32 /D_WINDOWS /Zi     /RTC1 -MD /W3 /wd4530 /wd4577 -Zc:__cplusplus -permissive- -utf-8 -FS -Zc:rvalueCast -Zc:inline -Zc:strictStrings -Zc:throwingNew -Zc:referenceBinding -Zc:externConstexpr -Zc:wchar_t -std:c++17 /YuD:/3pp/Qt/Src/debug_web_engine_test/qtopcua/src/opcua/CMakeFiles/OpcUa.dir/cmake_pch.hxx /FpD:/3pp/Qt/Src/debug_web_engine_test/qtopcua/src/opcua/CMakeFiles/OpcUa.dir/./cmake_pch.cxx.pch /FID:/3pp/Qt/Src/debug_web_engine_test/qtopcua/src/opcua/CMakeFiles/OpcUa.dir/cmake_pch.hxx /showIncludes /Foqtopcua\src\opcua\CMakeFiles\OpcUa.dir\x509\qopcuax509certificatesigningrequest_openssl.cpp.obj /Fdqtopcua\src\opcua\CMakeFiles\OpcUa.dir\ /FS -c D:\3pp\Qt\Src\qtopcua\src\opcua\x509\qopcuax509certificatesigningrequest_openssl.cpp
      D:\3pp\Qt\Src\qtopcua\src\opcua\x509\qopcuax509certificatesigningrequest_openssl.cpp(264): error C2275: 'X509_EXTENSION': illegal use of this type as an expression
      D:\openSSL\openssl-1.1.1m\include\openssl/x509.h(81): note: see declaration of 'X509_EXTENSION'
      D:\3pp\Qt\Src\qtopcua\src\opcua\x509\qopcuax509certificatesigningrequest_openssl.cpp(264): error C3861: 'CHECKED_STACK_OF': identifier not found
      D:\3pp\Qt\Src\qtopcua\src\opcua\x509\qopcuax509certificatesigningrequest_openssl.cpp(270): error C2275: 'X509_EXTENSION': illegal use of this type as an expression
      D:\openSSL\openssl-1.1.1m\include\openssl/x509.h(81): note: see declaration of 'X509_EXTENSION'
      D:\3pp\Qt\Src\qtopcua\src\opcua\x509\qopcuax509certificatesigningrequest_openssl.cpp(270): error C3861: 'CHECKED_STACK_OF': identifier not found
      D:\3pp\Qt\Src\qtopcua\src\opcua\x509\qopcuax509certificatesigningrequest_openssl.cpp(459): error C2275: 'GENERAL_NAME': illegal use of this type as an expression
      D:\openSSL\openssl-1.1.1m\include\openssl/x509v3.h(153): note: see declaration of 'GENERAL_NAME'
      D:\3pp\Qt\Src\qtopcua\src\opcua\x509\qopcuax509certificatesigningrequest_openssl.cpp(459): error C3861: 'CHECKED_STACK_OF': identifier not found
      [3202/6553] Building CXX object qtdeclarative\src\qmldom\CMakeFiles\QmlDomPrivate.dir\qqmldomitem.cpp.obj
      FAILED: qtwebengine/src/core/Debug/AMD64/QtWebEngineCore.stamp qtwebengine/src/core/Debug/AMD64/QtWebEngineCore D:/3pp/Qt/Src/debug_web_engine_test/qtwebengine/src/core/Debug/AMD64/QtWebEngineCore.stamp D:/3pp/Qt/Src/debug_web_engine_test/qtwebengine/src/core/Debug/AMD64/QtWebEngineCore
      cmd.exe /C "cd /D D:\3pp\Qt\Src\debug_web_engine_test\qtwebengine\src\core && C:\bin\ninja.exe -C D:/3pp/Qt/Src/debug_web_engine_test/qtwebengine/src/core/Debug/AMD64 QtWebEngineCore"
      
      

      Attachments

        Activity

          People

            fmeerkoetter Frank Meerkötter
            tmartsum Thorbjørn Lund Martsum
            Votes:
            0 Vote for this issue
            Watchers:
            4 Start watching this issue

            Dates

              Created:
              Updated: