Closed
Description
Description
As of today, current version of CMake is: Release Candidate (4.2.0-rc4) which causes build errors.
3.31.9 - works fine.
Reproduction Steps
- fresh VM
- install git, latest cmake, VS etc.
build -rc Release -s clr+libs
Expected behavior
builds fine
Actual behavior
Error
...
CMake Error at nativeaot/Bootstrap/base/cmake_install.cmake:45 (file):
file INSTALL cannot find
"C:/src/runtime/artifacts/obj/coreclr/windows.x64.Release/nativeaot/Bootstrap/base/bootstrapper.pdb":
File exists.
Call Stack (most recent call first):
nativeaot/Bootstrap/cmake_install.cmake:42 (include)
nativeaot/cmake_install.cmake:42 (include)
cmake_install.cmake:97 (include)
FAILED: CMakeFiles/install.util
C:\Windows\system32\cmd.exe /C "cd /D C:\src\runtime\artifacts\obj\coreclr\windows.x64.Release && "C:\Program Files\CMake\bin\cmake.exe" -P cmake_install.cmake"
ninja: build stopped: subcommand failed.
BUILD: Error: native component build failed. Refer to the build log files for details.
"C:\src\runtime\artifacts\log\Release\CoreCLR_windows__x64__Release__x64.log"
"C:\src\runtime\artifacts\log\Release\CoreCLR_windows__x64__Release__x64.wrn"
"C:\src\runtime\artifacts\log\Release\CoreCLR_windows__x64__Release__x64.err"
C:\src\runtime\src\coreclr\runtime.proj(115,5): error MSB3073: The command ""C:\src\runtime\src\coreclr\build-runtime.cmd" -x64 -release -os windows -pgodatapath "C:\Users\kwicher\.nuget\packages\optimization.windows_nt-x64.pgo.coreclr\1.0.0-prerelease.25502.1" -targetrid win-x64 -cmakeargs "-DCLR_DOTNET_RID=win-x64" -cmakeargs "-DCLR_DOTNET_HOST_PATH=C:\src\runtime\.dotnet\dotnet.exe" -cmakeargs "-DCDAC_BUILD_TOOL_BINARY_PATH=C:\src\runtime\artifacts\bin\coreclr\windows.x64.Release\cdac-build-tool\cdac-build-tool.dll" -cmakeargs "-DCLR_CMAKE_RUNTIME_CORECLR=1" -cmakeargs "-DCMAKE_PRODUCT_VERSION=10.0.0" -cmakeargs "-DCMAKE_CONTINUOUS_INTEGRATION_BUILD=False" -cmakeargs "-DCMAKE_NET_CORE_APP_CURRENT_VERSION=10.0" -cmakeargs "-DCMAKE_BUILD_LIBRARIES_CONFIGURATION=Debug" -cmakeargs "-DCMAKE_BUILD_RUNTIME_CONFIGURATION=Release"" exited with code 1.
Build FAILED.
C:\src\runtime\src\coreclr\runtime.proj(115,5): error MSB3073: The command ""C:\src\runtime\src\coreclr\build-runtime.cmd" -x64 -release -os windows -pgodatapath "C:\Users\kwicher\.nuget\packages\optimization.windows_nt-x64.pgo.coreclr\1.0.0-prerelease.25502.1" -targetrid win-x64 -cmakeargs "-DCLR_DOTNET_RID=win-x64" -cmakeargs "-DCLR_DOTNET_HOST_PATH=C:\src\runtime\.dotnet\dotnet.exe" -cmakeargs "-DCDAC_BUILD_TOOL_BINARY_PATH=C:\src\runtime\artifacts\bin\coreclr\windows.x64.Release\cdac-build-tool\cdac-build-tool.dll" -cmakeargs "-DCLR_CMAKE_RUNTIME_CORECLR=1" -cmakeargs "-DCMAKE_PRODUCT_VERSION=10.0.0" -cmakeargs "-DCMAKE_CONTINUOUS_INTEGRATION_BUILD=False" -cmakeargs "-DCMAKE_NET_CORE_APP_CURRENT_VERSION=10.0" -cmakeargs "-DCMAKE_BUILD_LIBRARIES_CONFIGURATION=Debug" -cmakeargs "-DCMAKE_BUILD_RUNTIME_CONFIGURATION=Release"" exited with code 1.
0 Warning(s)
1 Error(s)
Time Elapsed 00:07:08.28
Build failed with exit code 1. Check errors above.
Some builds failed:
Configuration: Debug, Architecture: x64(this is just end of the log)
Regression?
not on .NET side
Known Workarounds
install old cmake
Configuration
No response
Other information
No response
Reacted by Tom McDonald, Eric StJohn and ZingBallyhoo
Reacted by Copilot
Metadata
Metadata
Labels
area-Infrastructure-coreclrOnly use for closed issues
Type
Projects
- StatusShow more project fieldsDone
Activity
ericstj commentedon Dec 3, 2025
I'm hitting the same @agocke any idea how to fix this? I don't see any earlier failure, just that the build didn't produce a PDB in the location that it's trying to install.
I do see it in a sub-directory:
agocke commentedon Dec 3, 2025
I'm not a cmake expert, but we can try copilot.
ericstj commentedon Dec 3, 2025
I tagged you because I think you might own
runtime/src/coreclr/nativeaot/Bootstrap/CMakeLists.txt
Lines 8 to 13 in d3711c2
but I could be wrong.
am11 commentedon Dec 3, 2025
This is a regression in cmake 4.2 rc and being fixed upstream https://gitlab.kitware.com/cmake/cmake/-/issues/27401. I think we shouldn't workaround it here but instead wait for the fix and stable release.
cc @jkoritzinsky
jkoritzinsky commentedon Dec 3, 2025
If we have the ability to control where the compile PDB gets dropped, we should just use that. I think the fix in #122152 is worthwhile and is worth taking if it fixes the bug.
agocke commentedon Dec 3, 2025
@ericstj @krwq How did you all get a CMake RC? Were you deliberately trying to scout new versions?
ericstj commentedon Dec 3, 2025
Trying to make my devbox work that only had Dev18
ZingBallyhoo commentedon Dec 3, 2025
4.2 was fully released as of Nov 20th (1 day after this issue was opened with rc4). I installed via WinGet without caring what version so I ended up here too.