-
Notifications
You must be signed in to change notification settings - Fork 2.9k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Mismatch of cl.exe and STL version used in latest runner images #8259
Comments
The latest GitHub runner image 20230903.2.0 shipped by GitHub for unknown reasons seemingly breaks MSVC debug builds. actions/runner-images#8259 and the fact that the previous image used a newer MSVC version than this one, suggest that the MSVC installation is currently broken. This sadly leads to the MultiThreadedDebug CI to be broken completely, making all builds fail. Try and workaround this issue by explicitly using the same toolset version from the previous runner-image in hope of it working.
Hello @zero9178, image has both msvc 14.35 and 14.37 components installed, so versions can be specified/chosen while building the project.
|
Hi! Thank you for your reply. The surprising behaviour in my case was that it was using I therefore also have no means really to test your workaround as my bug was unrelated. I suspect that your workaround may help @dylanclark though! The default version should probably be 14.37 given that it was 14.36 previously. |
@shamil-mubarakshin Thank you, that workaround works in our build pipelines. However, it takes 10 minutes to run in our pipelines so it's not ideal. Hoping the next image release has a fix where the newest MSVC version is picked so we can remove this? |
@dylanclark, in case of msvc tools we are providing several versions of VS workflows. This approach allows version to be specified in build settings. |
VS2022 is by default using v14.37 (v143) right now. The default props will be placed under However, if you install v14.35 at the same time, an extra props file will be placed under Per my experience, removing files |
Thank you for this. It worked for me also. |
Description
Our build pipelines in ADO are failing this week with the rollout of image 20230903.2.0 on windows-latest. The issue did not repro on 20230820.1.0.
We are seeing the failures while using VCPKG to build the cpprestsdk dependency. cpprestsdk is failing to build due to mismatched compiler and STL versions. It's possible it's the same root cause as #6091 where the MSVC install was broken. This does not repro on local dev machines.
Platforms affected
Runner images affected
Image version and build link
20230902.2.0. Build is on private ADO instance so can't link it.
Is it regression?
Regression. The issue did not repro on 20230820.1.0
Expected behavior
CMake picks the newest available versions of cl.exe and the STL headers.
Actual behavior
Cmake is picking an old version of the compiler and new version of STL headers.
cmake running under vcpkg is picking up an old compiler:
VERBOSE: Found C compiler at C:\Program Files\Microsoft Visual Studio\2022\Enterprise\VC\Tools\MSVC*14.35.32215*\bin\HostX64\x64\cl.exe
VERBOSE: Found C++ compiler at C:\Program Files\Microsoft Visual Studio\2022\Enterprise\VC\Tools\MSVC**\14.35.32215**bin\HostX64\x64\cl.exe
And cpprestsdk is referencing a different version of the STL headers:
C:\Program Files\Microsoft Visual Studio\2022\Enterprise\VC\Tools\MSVC*14.37.32822*\include\yvals_core.h(851): error STL1001: Unexpected compiler version, expected MSVC 19.36 or newer.
VCPKG Logs
VERBOSE: Enabling Msvc compiler
VERBOSE: Calling RunVsDevCmd for x64
C:\Program Files (x86)\Microsoft Visual Studio\Installer\vswhere.exe -latest -property installationPath
C:\Program Files (x86)\Microsoft Visual Studio\Installer\vswhere.exe -latest -property installationPath
cmd.exe /c "C:\Program Files\Microsoft Visual Studio\2022\Enterprise\Common7\Tools\VsDevCmd.bat" -host_arch=amd64 -arch=amd64 && set
VERBOSE: Caching devenv environment variables to D:\a\1\s\build\vsDevCmdCache.x64.json
VERBOSE: Found C compiler at C:\Program Files\Microsoft Visual Studio\2022\Enterprise\VC\Tools\MSVC\14.35.32215\bin\HostX64\x64\cl.exe
VERBOSE: Found C++ compiler at C:\Program Files\Microsoft Visual Studio\2022\Enterprise\VC\Tools\MSVC\14.35.32215\bin\HostX64\x64\cl.exe
C:\vcpkg\vcpkg.exe version
vcpkg package management program version 2023-08-09-9990a4c9026811a312cb2af78bf77f3d9d288416
cpprestsdk build logs that contain the failure to build under vcpkg
Change Dir: 'C:/vcpkg/buildtrees/cpprestsdk/x64-windows-dbg'
Run Build Command(s): "C:/Program Files/Microsoft Visual Studio/2022/Enterprise/Common7/IDE/CommonExtensions/Microsoft/CMake/Ninja/ninja.exe" -v -v -j3 install
[1/25] C:\PROGRA
1\MICROS2\2022\ENTERP1\VC\Tools\MSVC\14351.322\bin\HostX64\x64\cl.exe /TP -DBROTLI_SHARED_COMPILATION -DCPPREST_EXCLUDE_WEBSOCKETS=1 -DUNICODE -DWIN32 -D_ASYNCRT_EXPORT -D_PPLX_EXPORT -D_SCL_SECURE_NO_WARNINGS -D_UNICODE -D_USRDLL -D_WIN32_WINNT=0x0600 -D_WINSOCK_DEPRECATED_NO_WARNINGS -Dcpprest_EXPORTS -IC:\vcpkg\buildtrees\cpprestsdk\src\ecb9e168c5-ec5efbc4a8.clean\Release\include -IC:\vcpkg\buildtrees\cpprestsdk\src\ecb9e168c5-ec5efbc4a8.clean\Release\src\pch -external:IC:\vcpkg\installed-x64-windows\x64-windows\include -external:W0 /nologo /DWIN32 /D_WINDOWS /W3 /utf-8 /GR /EHsc /MP /D_DEBUG /MDd /Z7 /Ob0 /Od /RTC1 /MP /bigobj /permissive- /Yustdafx.h /FpC:/vcpkg/buildtrees/cpprestsdk/x64-windows-dbg/src/cpprest.pch /Zm120 /Ycstdafx.h /showIncludes /Fosrc\CMakeFiles\cpprest.dir\pch\stdafx.cpp.obj /Fdsrc\CMakeFiles\cpprest.dir\ /FS -c C:\vcpkg\buildtrees\cpprestsdk\src\ecb9e168c5-ec5efbc4a8.clean\Release\src\pch\stdafx.cppFAILED: src/CMakeFiles/cpprest.dir/pch/stdafx.cpp.obj
C:\PROGRA
1\MICROS2\2022\ENTERP1\VC\Tools\MSVC\14351.322\bin\HostX64\x64\cl.exe /TP -DBROTLI_SHARED_COMPILATION -DCPPREST_EXCLUDE_WEBSOCKETS=1 -DUNICODE -DWIN32 -D_ASYNCRT_EXPORT -D_PPLX_EXPORT -D_SCL_SECURE_NO_WARNINGS -D_UNICODE -D_USRDLL -D_WIN32_WINNT=0x0600 -D_WINSOCK_DEPRECATED_NO_WARNINGS -Dcpprest_EXPORTS -IC:\vcpkg\buildtrees\cpprestsdk\src\ecb9e168c5-ec5efbc4a8.clean\Release\include -IC:\vcpkg\buildtrees\cpprestsdk\src\ecb9e168c5-ec5efbc4a8.clean\Release\src\pch -external:IC:\vcpkg\installed-x64-windows\x64-windows\include -external:W0 /nologo /DWIN32 /D_WINDOWS /W3 /utf-8 /GR /EHsc /MP /D_DEBUG /MDd /Z7 /Ob0 /Od /RTC1 /MP /bigobj /permissive- /Yustdafx.h /FpC:/vcpkg/buildtrees/cpprestsdk/x64-windows-dbg/src/cpprest.pch /Zm120 /Ycstdafx.h /showIncludes /Fosrc\CMakeFiles\cpprest.dir\pch\stdafx.cpp.obj /Fdsrc\CMakeFiles\cpprest.dir\ /FS -c C:\vcpkg\buildtrees\cpprestsdk\src\ecb9e168c5-ec5efbc4a8.clean\Release\src\pch\stdafx.cppC:\Program Files\Microsoft Visual Studio\2022\Enterprise\VC\Tools\MSVC\14.37.32822\include\yvals_core.h(851): error STL1001: Unexpected compiler version, expected MSVC 19.36 or newer.
C:\Program Files\Microsoft Visual Studio\2022\Enterprise\VC\Tools\MSVC\14.37.32822\include\yvals_core.h(851): error C2338: static_assert failed: 'Error in C++ Standard Library usage.'
ninja: build stopped: subcommand failed.
Repro steps
The only repro we know of is to use VCPKG to build cpprestsdk on the latest image.
The text was updated successfully, but these errors were encountered: