PixarAnimationStudios / OpenUSD

Universal Scene Description
http://www.openusd.org
Other
6.17k stars 1.23k forks source link

Visual Studio 2022 build failure #3433

Open DDoS opened 3 days ago

DDoS commented 3 days ago

Description of Issue

FAILED: pxr/base/tf/CMakeFiles/tf.dir/pyErrorInternal.cpp.obj 
C:\PROGRA~1\MICROS~3\2022\PROFES~1\VC\Tools\MSVC\1442~1.344\bin\Hostx64\x64\cl.exe  /nologo /TP -DBOOST_ALL_DYN_LINK -DBOOST_ALL_NO_LIB -DGLX_GLXEXT_PROTOTYPES -DGL_GLEXT_PROTOTYPES -DMFB_ALT_PACKAGE_NAME=tf -DMFB_PACKAGE_MODULE=Tf -DMFB_PACKAGE_NAME=tf -DNOMINMAX -DOPENEXR_DLL -DPXR_BOOST_PYTHON_NO_PY_SIGNATURES -DPXR_BUILD_LOCATION=usd -DPXR_GL_SUPPORT_ENABLED -DPXR_MATERIALX_SUPPORT_ENABLED -DPXR_OIIO_PLUGIN_ENABLED -DPXR_PLUGIN_BUILD_LOCATION=../plugin/usd -DPXR_VULKAN_SUPPORT_ENABLED -DTF_EXPORTS=1 -DWIN32_LEAN_AND_MEAN -D_CRT_SECURE_NO_WARNINGS -D_SCL_SECURE_NO_WARNINGS -Dtf_EXPORTS -IC:\Users\sapona\Sources\USD\build\Release\USD\include -external:IC:\VulkanSDK\1.3.296.0\source -external:IC:\VulkanSDK\1.3.296.0\lib -external:IC:\VulkanSDK\1.3.296.0\include -external:IC:\VulkanSDK\1.3.296.0 -external:IC:\Users\sapona\Sources\USD\install\Release\include -external:I"C:\Program Files (x86)\Microsoft Visual Studio\Shared\Python39_64\Include" -external:W0 /EHsc /Zc:rvalueCast /Zc:strictStrings /Zc:__cplusplus /Zc:inline- /W3 /bigobj /Zi /MP /Gm- /wd4003 /wd4244 /wd4305 /wd4267 /wd4506 /wd4091 /wd4273 /wd4180 /wd4334 /Zm150 /MD /Zi /O2 /Ob1 /DNDEBUG -std:c++17 /showIncludes /Fopxr\base\tf\CMakeFiles\tf.dir\pyErrorInternal.cpp.obj /Fdpxr\base\tf\CMakeFiles\tf.dir\ /FS -c C:\Users\sapona\Sources\USD\pxr\base\tf\pyErrorInternal.cpp
C:/Users/sapona/Sources/USD/pxr/base/tf/pyExceptionState.h(47): error C2039: 'string': is not a member of 'std'
C:\Program Files\Microsoft Visual Studio\2022\Professional\VC\Tools\MSVC\14.42.34433\include\memory(31): note: see declaration of 'std'
C:/Users/sapona/Sources/USD/pxr/base/tf/pyExceptionState.h(47): error C3646: 'GetExceptionString': unknown override specifier
C:/Users/sapona/Sources/USD/pxr/base/tf/pyExceptionState.h(47): error C2059: syntax error: ')'
C:/Users/sapona/Sources/USD/pxr/base/tf/pyExceptionState.h(47): error C2238: unexpected token(s) preceding ';'

pyExceptionState.h is missing an #include <string>.

Steps to Reproduce

-u build_scripts/build_usd.py -vvv --generator Ninja --build-variant relwithdebuginfo --build build/Release install/Release --tests --cmake-build-args="-DPXR_ENABLE_VULKAN_SUPPORT=ON -DPXR_ENABLE_PRECOMPILED_HEADERS=OFF" Note that -DPXR_ENABLE_PRECOMPILED_HEADERS=OFF is to workaround another build issue that's fixed by #3120.

System Information (OS, Hardware)

Package Versions

Latest dev branch (d1ebe6f2b3d3f3b06e31209464e8a1c4586efc02).

jesschimein commented 22 hours ago

Filed as internal issue #USD-10457

sunyab commented 16 hours ago

I wasn't able to reproduce this on Visual Studio 2019 so something must've changed between versions. I've checked in the fix and it should go out with the next dev branch update. Thanks for the report!