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

Pugixml workaround for QTBUG-11923 causes C1001 in MSVC2019 with PCH

    XMLWordPrintable

Details

    • Bug
    • Resolution: Done
    • P2: Important
    • 6.2.3, 6.3.0 Alpha
    • 6.2.0
    • None
    • Windows 10 21H1
      Visual Studio v16.11.4
      MSVC v142/1929
      Windows SDK 10.0.19041
      CMake 3.21.3
      Ninja 1.10.2
    • Windows
    • 89f3dcb444 (qt/qt3d/dev) be97330ebc (qt/qt3d/6.2) c02ca71c36 (qt/qtquick3d/dev) a3658c0e8f (qt/qtquick3d/6.2) be97330ebc (qt/tqtc-qt3d/6.2) 89f3dcb444 (qt/tqtc-qt3d/dev) a3658c0e8f (qt/tqtc-qtquick3d/6.2) 89f3dcb444 (qt/qt3d/6.3) be97330ebc (qt/qt3d/6.2)

    Description

      When compiling Qt 6.2.0 with MSVC2019, Qt3D (and I'm guessing QtQuick3D) fail to compile due to an internal compiler error occurring at:

      \qt3d\src\3rdparty\assimp\src\contrib\pugixml\src\pugixml.hpp(1442)
      

       

      Code in question:

      // Make sure implementation is included in header-only mode
      // Use macro expansion in #include to work around QMake (QTBUG-11923)
      #if defined(PUGIXML_HEADER_ONLY) && !defined(PUGIXML_SOURCE)
      # define PUGIXML_SOURCE "pugixml.cpp"
      # include PUGIXML_SOURCE
      #endif

       

      Configure command:

      // configure.bat -top-level -prefix C:\Engineering\Development\Qt\6.2.0\static\msvc2019_64 -platform win32-msvc -static -debug-and-release -opensource -confirm-license -skip qtwebengine -nomake tools -nomake tests -nomake examples -schannel
      

      While this is ultimately an MSVC issue, there's no telling how long it will take for this bug to be fixed and reporting it is problematic due to the crash possibly relying on the contents of many related files, some of which are clearly customized for the Qt distribution, and not truly being isolated to this section.

      I filed this here in the hopes that someone familiar with this modification might have a better idea if this compiler trick modification for QTBUG-11923 is likely to be the culprit, and if so, since that the bug is quite old and centered around qmake, perhaps an alternate solution could now be employed that works around this problem given the change to CMake in Qt6?

       

      Full Error:

      [10331/14862] Building CXX object qt3d\src\plugins\scenepa...__\3rdparty\assimp\src\contrib\pugixml\src\pugixml.cpp.obj
      FAILED: qt3d/src/plugins/sceneparsers/assimp/CMakeFiles/AssimpSceneImportPlugin.dir/Release/__/__/__/3rdparty/assimp/src/contrib/pugixml/src/pugixml.cpp.obj
      C:\ENGINE~1\DEVELO~1\MICROS~1\2019\COMMUN~1\VC\Tools\MSVC\1429~1.301\bin\Hostx64\x64\cl.exe  /nologo /TP -DASSIMP_BUILD_BOOST_WORKAROUND -DASSIMP_BUILD_NO_3DS_IMPORTER -DASSIMP_BUILD_NO_3D_IMPORTER -DASSIMP_BUILD_NO_3MF_IMPORTER -DASSIMP_BUILD_NO_AC_IMPORTER -DASSIMP_BUILD_NO_AMF_IMPORTER -DASSIMP_BUILD_NO_ASE_IMPORTER -DASSIMP_BUILD_NO_ASSBIN_IMPORTER -DASSIMP_BUILD_NO_B3D_IMPORTER -DASSIMP_BUILD_NO_BLEND_IMPORTER -DASSIMP_BUILD_NO_BVH_IMPORTER -DASSIMP_BUILD_NO_C4D_IMPORTER -DASSIMP_BUILD_NO_COB_IMPORTER -DASSIMP_BUILD_NO_COMPRESSED_IFC -DASSIMP_BUILD_NO_CSM_IMPORTER -DASSIMP_BUILD_NO_DXF_IMPORTER -DASSIMP_BUILD_NO_EXPORT -DASSIMP_BUILD_NO_HMP_IMPORTER -DASSIMP_BUILD_NO_IFC_IMPORTER -DASSIMP_BUILD_NO_IRRMESH_IMPORTER -DASSIMP_BUILD_NO_IRR_IMPORTER -DASSIMP_BUILD_NO_LIMITBONEWEIGHTS_PROCESS -DASSIMP_BUILD_NO_LWO_IMPORTER -DASSIMP_BUILD_NO_LWS_IMPORTER -DASSIMP_BUILD_NO_M3D_IMPORTER -DASSIMP_BUILD_NO_MD2_IMPORTER -DASSIMP_BUILD_NO_MD3_IMPORTER -DASSIMP_BUILD_NO_MD5_IMPORTER -DASSIMP_BUILD_NO_MDC_IMPORTER -DASSIMP_BUILD_NO_MDL_IMPORTER -DASSIMP_BUILD_NO_MMD_IMPORTER -DASSIMP_BUILD_NO_MS3D_IMPORTER -DASSIMP_BUILD_NO_NDO_IMPORTER -DASSIMP_BUILD_NO_NFF_IMPORTER -DASSIMP_BUILD_NO_OFF_IMPORTER -DASSIMP_BUILD_NO_OGRE_IMPORTER -DASSIMP_BUILD_NO_OPENGEX_IMPORTER -DASSIMP_BUILD_NO_OWN_ZLIB -DASSIMP_BUILD_NO_PLY_IMPORTER -DASSIMP_BUILD_NO_Q3BSP_IMPORTER -DASSIMP_BUILD_NO_Q3D_IMPORTER -DASSIMP_BUILD_NO_RAW_IMPORTER -DASSIMP_BUILD_NO_SIB_IMPORTER -DASSIMP_BUILD_NO_SMD_IMPORTER -DASSIMP_BUILD_NO_STEP_IMPORTER -DASSIMP_BUILD_NO_TERRAGEN_IMPORTER -DASSIMP_BUILD_NO_X3D_IMPORTER -DASSIMP_BUILD_NO_XGL_IMPORTER -DASSIMP_BUILD_NO_X_IMPORTER -DNOUNCRYPT -DQT_3DANIMATION_LIB -DQT_3DCORE_LIB -DQT_3DEXTRAS_LIB -DQT_3DINPUT_LIB -DQT_3DLOGIC_LIB -DQT_3DRENDER_LIB -DQT_CFLAGS_SSE2 -DQT_CONCURRENT_LIB -DQT_CORE_LIB -DQT_DEPRECATED_WARNINGS -DQT_DEPRECATED_WARNINGS_SINCE=0x060000 -DQT_DISABLE_DEPRECATED_BEFORE=0x040800 -DQT_GUI_LIB -DQT_NETWORK_LIB -DQT_NO_DEBUG -DQT_OPENGL_LIB -DQT_PLUGIN -DQT_STATICPLUGIN -DQT_ZLIB_LIB -DRAPIDJSON_HAS_STDSTRING=1 -DRAPIDJSON_NOMEMBERITERATORCLASS -DUNICODE -DWIN32 -DWIN64 -D_CRT_SECURE_NO_WARNINGS -D_ENABLE_EXTENDED_ALIGNED_STORAGE -D_SCL_SECURE_NO_WARNINGS -D_UNICODE -D_WIN64 -DCMAKE_INTDIR=\"Release\" -IS:\dev\build-Qt6\qt3d\src\plugins\sceneparsers\assimp\AssimpSceneImportPlugin_autogen\include_Release -IS:\dev\src-Qt6-2\qt3d\src\plugins\sceneparsers\assimp -IS:\dev\build-Qt6\qt3d\src\plugins\sceneparsers\assimp -IS:\dev\build-Qt6\qtbase\include -IS:\dev\src-Qt6-2\qt3d\src\3rdparty\assimp -IS:\dev\src-Qt6-2\qt3d\src\3rdparty\assimp\.. -IS:\dev\src-Qt6-2\qt3d\src\3rdparty\assimp\contrib\unzip -IS:\dev\src-Qt6-2\qt3d\src\3rdparty\assimp\src -IS:\dev\src-Qt6-2\qt3d\src\3rdparty\assimp\src\code -IS:\dev\src-Qt6-2\qt3d\src\3rdparty\assimp\src\code\Blender -IS:\dev\src-Qt6-2\qt3d\src\3rdparty\assimp\src\code\CApi -IS:\dev\src-Qt6-2\qt3d\src\3rdparty\assimp\src\code\Collada -IS:\dev\src-Qt6-2\qt3d\src\3rdparty\assimp\src\code\Common -IS:\dev\src-Qt6-2\qt3d\src\3rdparty\assimp\src\code\FBX -IS:\dev\src-Qt6-2\qt3d\src\3rdparty\assimp\src\code\Material -IS:\dev\src-Qt6-2\qt3d\src\3rdparty\assimp\src\code\Obj -IS:\dev\src-Qt6-2\qt3d\src\3rdparty\assimp\src\code\PostProcessing -IS:\dev\src-Qt6-2\qt3d\src\3rdparty\assimp\src\code\glTF -IS:\dev\src-Qt6-2\qt3d\src\3rdparty\assimp\src\code\glTF2 -IS:\dev\src-Qt6-2\qt3d\src\3rdparty\assimp\src\contrib\irrXML -IS:\dev\src-Qt6-2\qt3d\src\3rdparty\assimp\src\contrib\openddlparser\include -IS:\dev\src-Qt6-2\qt3d\src\3rdparty\assimp\src\contrib\poly2tri -IS:\dev\src-Qt6-2\qt3d\src\3rdparty\assimp\src\contrib\pugixml\src -IS:\dev\src-Qt6-2\qt3d\src\3rdparty\assimp\src\contrib\pugixml\contrib -IS:\dev\src-Qt6-2\qt3d\src\3rdparty\assimp\src\contrib\rapidjson\include -IS:\dev\src-Qt6-2\qt3d\src\3rdparty\assimp\src\contrib\utf8cpp\source -IS:\dev\src-Qt6-2\qt3d\src\3rdparty\assimp\src\include -IS:\dev\src-Qt6-2\qt3d\src\3rdparty\assimp\src\include\assimp\Compiler -IS:\dev\src-Qt6-2\qt3d\src\3rdparty\assimp\unzip -IS:\dev\build-Qt6\qtbase\include\Qt3DAnimation -IS:\dev\build-Qt6\qtbase\include\Qt3DCore -IS:\dev\build-Qt6\qtbase\include\QtCore -IS:\dev\src-Qt6-2\qtbase\mkspecs\win32-msvc -IS:\dev\build-Qt6\qtbase\include\QtGui -IS:\dev\build-Qt6\qtbase\include\QtNetwork -IS:\dev\build-Qt6\qtbase\include\Qt3DRender -IS:\dev\build-Qt6\qtbase\include\QtOpenGL -IS:\dev\build-Qt6\qt3d\src\core -IS:\dev\build-Qt6\qtbase\include\Qt3DCore\6.2.0 -IS:\dev\build-Qt6\qtbase\include\Qt3DCore\6.2.0\Qt3DCore -IS:\dev\build-Qt6\qtbase\include\QtConcurrent -IS:\dev\build-Qt6\qtbase\src\corelib -IS:\dev\build-Qt6\qtbase\include\QtCore\6.2.0 -IS:\dev\build-Qt6\qtbase\include\QtCore\6.2.0\QtCore -IS:\dev\build-Qt6\qtbase\src\gui -IS:\dev\build-Qt6\qtbase\include\QtGui\6.2.0 -IS:\dev\build-Qt6\qtbase\include\QtGui\6.2.0\QtGui -IS:\dev\build-Qt6\qtbase\include\Qt3DExtras -IS:\dev\build-Qt6\qtbase\include\Qt3DInput -IS:\dev\build-Qt6\qtbase\include\Qt3DLogic -IS:\dev\build-Qt6\qt3d\src\render -IS:\dev\build-Qt6\qtbase\include\Qt3DRender\6.2.0 -IS:\dev\build-Qt6\qtbase\include\Qt3DRender\6.2.0\Qt3DRender -IS:\dev\build-Qt6\qtbase\include\QtZlib -IS:\dev\src-Qt6-2\qtbase\src\corelib /DWIN32 /D_WINDOWS /DNDEBUG -O2 -MD /W3 /EHsc -wd4100 -wd4189 -wd4267 -wd4996 -wd4828 /bigobj -Zc:__cplusplus -permissive- -utf-8 -FS -Zc:rvalueCast -Zc:inline -Zc:strictStrings -Zc:throwingNew -Zc:referenceBinding -Zc:externConstexpr -Zc:wchar_t -guard:cf -std:c++17 /YuS:/dev/build-Qt6/qt3d/src/plugins/sceneparsers/assimp/CMakeFiles/AssimpSceneImportPlugin.dir/Release/cmake_pch.hxx /FpS:/dev/build-Qt6/qt3d/src/plugins/sceneparsers/assimp/CMakeFiles/AssimpSceneImportPlugin.dir/Release/cmake_pch.cxx.pch /FIS:/dev/build-Qt6/qt3d/src/plugins/sceneparsers/assimp/CMakeFiles/AssimpSceneImportPlugin.dir/Release/cmake_pch.hxx /showIncludes /Foqt3d\src\plugins\sceneparsers\assimp\CMakeFiles\AssimpSceneImportPlugin.dir\Release\__\__\__\3rdparty\assimp\src\contrib\pugixml\src\pugixml.cpp.obj /Fdqtbase\plugins\sceneparsers\Qt6AssimpSceneImportPlugin.pdb /FS -c S:\dev\src-Qt6-2\qt3d\src\3rdparty\assimp\src\contrib\pugixml\src\pugixml.cpp
      S:\dev\src-Qt6-2\qt3d\src\3rdparty\assimp\src\contrib\pugixml\src\pugixml.hpp(1442): fatal error C1001: Internal compiler error.
      (compiler file 'msc1.cpp', line 1603)
      

       

      Disabling PCH appropriately allows this to be bypassed at the very least.

      Attachments

        Issue Links

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

          Activity

            People

              jbornema Joerg Bornemann
              oblivioncth Chris Heimlich
              Votes:
              1 Vote for this issue
              Watchers:
              4 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved:

                Gerrit Reviews

                  There are no open Gerrit changes