Skip to content

Conversation

rzikm
Copy link
Member

@rzikm rzikm commented Apr 17, 2025

After upgrading to latest CMake, runtime fails to build:

"C:\source\dotnet\runtime\src\native\corehost\build.cmd" Debug x64 commit 6cb6016767d9e7370446994873caba76127083a4 outputrid win-x64 portable incremental-native-build rootdir C:\source\dotnet\runtime\ runtimeflavor CoreCLR runtimeconfiguration Release
  **********************************************************************
  ** Visual Studio 2022 Developer Command Prompt v17.13.4
  ** Copyright (c) 2022 Microsoft Corporation
  **********************************************************************
  [vcvarsall.bat] Environment initialized for: 'x64'
  Configuring corehost native components
  
  "Computed RID for native build is win-x64"
  Calling "C:\source\dotnet\runtime\eng\native\gen-buildsys.cmd "C:\source\dotnet\runtime\src\native\corehost\" "C:/source/dotnet/runtime//artifacts/obj/win-x64.Debug/corehost" vs2022 x64 windows  "-DCLI_CMAKE_PKG_RID=win-x64" "-DCLI_CMAKE_FALLBACK_OS=win10" "
  -DCLI_CMAKE_COMMIT_HASH=6cb6016767d9e7370446994873caba76127083a4" "-DCLI_CMAKE_RESOURCE_DIR=C:\source\dotnet\runtime\\artifacts\obj\win-x64.Debug\hostResourceFiles" "-DCMAKE_BUILD_TYPE=Debug""
  The CMake command line differs from the last run. Running CMake again.
  "C:\scoop\shims\cmake.exe "-DCMAKE_INSTALL_PREFIX=C:/source/dotnet/runtime//artifacts/bin/win-x64.Debug" "-DCLR_CMAKE_HOST_ARCH=x64"  "-DCLI_CMAKE_PKG_RID=win-x64" "-DCLI_CMAKE_FALLBACK_OS=win10" "-DCLI_CMAKE_COMMIT_HASH=6cb6016767d9e7370446994873caba7612708
  3a4" "-DCLI_CMAKE_RESOURCE_DIR=C:\source\dotnet\runtime\\artifacts\obj\win-x64.Debug\hostResourceFiles" "-DCMAKE_BUILD_TYPE=Debug"  "-DCMAKE_SYSTEM_VERSION=10.0" "-DCLI_CMAKE_PKG_RID=win-x64" "-DCLI_CMAKE_FALLBACK_OS=win10" "-DCLI_CMAKE_COMMIT_HASH=6cb601676 
  7d9e7370446994873caba76127083a4" "-DCLI_CMAKE_RESOURCE_DIR=C:\source\dotnet\runtime\\artifacts\obj\win-x64.Debug\hostResourceFiles" "-DCMAKE_BUILD_TYPE=Debug" --no-warn-unused-cli -G Ninja -B "C:/source/dotnet/runtime//artifacts/obj/win-x64.Debug/corehost" - 
  S "C:\source\dotnet\runtime\src\native\corehost\""
  Not searching for unused variables given on the command line.
  CMake Error: The source directory "C:/source/dotnet/runtime/src/native/corehost"" does not exist.
  Specify --help for usage, or press the help button on the CMake GUI.
  Failed to generate native component build project!
C:\source\dotnet\runtime\src\native\corehost\corehost.proj(167,5): error MSB3073: The command ""C:\source\dotnet\runtime\src\native\corehost\build.cmd" Debug x64 commit 6cb6016767d9e7370446994873caba76127083a4 outputrid win-x64 portable incremental-native-buil 
d rootdir C:\source\dotnet\runtime\ runtimeflavor CoreCLR runtimeconfiguration Release" exited with code 1.

Build FAILED.

Note the extra " in

CMake Error: The source directory "C:/source/dotnet/runtime/src/native/corehost"" does not exist.

Normalizing the source path seems to fix the problem for me

@Copilot Copilot AI review requested due to automatic review settings April 17, 2025 08:40
Copy link
Contributor

@Copilot Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copilot wasn't able to review any files in this pull request.

Files not reviewed (1)
  • src/native/corehost/build.cmd: Language not supported

@ghost ghost added the needs-area-label An area label is needed to ensure this gets routed to the appropriate area owners label Apr 17, 2025
@rzikm rzikm added os-windows and removed needs-area-label An area label is needed to ensure this gets routed to the appropriate area owners labels Apr 17, 2025
@am11
Copy link
Member

am11 commented Apr 17, 2025

Reported upstream https://gitlab.kitware.com/cmake/cmake/-/issues/26877. I think the proper fix for us is to just remove the trailing slash from source dir #114779.

Copy link
Contributor

Tagging subscribers to this area: @dotnet/runtime-infrastructure
See info in area-owners.md if you want to be subscribed.

@rzikm
Copy link
Member Author

rzikm commented Apr 17, 2025

closing in favor of #114779

@rzikm rzikm closed this Apr 17, 2025
@rzikm rzikm deleted the rzikm-patch-1 branch April 17, 2025 13:57
@github-actions github-actions bot locked and limited conversation to collaborators May 18, 2025
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Projects

Status: Done

Development

Successfully merging this pull request may close these issues.

2 participants