Skip to content

[protobuf] build failure on x64 windows #49873

@goldenbull

Description

@goldenbull

Operating system

windows 11

Compiler

MSVC

Steps to reproduce the behavior

D:\src\vcpkg>vcpkg install grpc --vcpkg-root=d:\src\vcpkg --debug --x-cmake-args=-DPORT_DEBUG=ON

Failure logs

-- Configuring x64-windows
-- [DEBUG] Reading configure log D:/src/vcpkg/buildtrees/protobuf/config-x64-windows-out.log...
-- [DEBUG] unused variables: FETCHCONTENT_FULLY_DISCONNECTED;_VCPKG_ROOT_DIR
-- [DEBUG] unused variable (not manually specified): FETCHCONTENT_FULLY_DISCONNECTED
-- [DEBUG] unused variable (not manually specified): _VCPKG_ROOT_DIR
-- [DEBUG] Reading configure log D:/src/vcpkg/buildtrees/protobuf/config-x64-windows-err.log...
-- Building x64-windows-dbg
-- Building x64-windows-rel
CMake Error at scripts/cmake/vcpkg_execute_required_process.cmake:127 (message):
    Command failed: C:/Users/user/.dotnet/tools/pwsh.exe -noprofile -executionpolicy Bypass -nologo -file D:/src/vcpkg/scripts/buildsystems/msbuild/applocal.ps1 -targetBinary D:/src/vcpkg/packages/protobuf_x64-windows/tools/protobuf/protoc.exe -installedDir D:/src/vcpkg/packages/protobuf_x64-windows/bin -verbose
    Working Directory: D:/src/vcpkg
    Error code: -532462766
    See logs for more information:
      D:\src\vcpkg\buildtrees\protobuf\copy-tool-dependencies-0-err.log

Call Stack (most recent call first):
  scripts/cmake/vcpkg_copy_tool_dependencies.cmake:9 (vcpkg_execute_required_process)
  scripts/cmake/vcpkg_copy_tool_dependencies.cmake:41 (z_vcpkg_copy_tool_dependencies_search)
  scripts/cmake/vcpkg_copy_tools.cmake:48 (vcpkg_copy_tool_dependencies)
  ports/protobuf/portfile.cmake:70 (vcpkg_copy_tools)
  scripts/ports.cmake:206 (include)


[DEBUG] 1023: cmd_execute_and_stream_data() returned 1 after 134004526 us
error: building protobuf:x64-windows failed with: BUILD_FAILED
See https://learn.microsoft.com/vcpkg/troubleshoot/build-failures?WT.mc_id=vcpkg_inproduct_cli for more information.
Elapsed time to handle protobuf:x64-windows: 2.2 min
[DEBUG] Detecting host with IsWow64Process2
[DEBUG] 1024: CreateProcessW("C:\Program Files\Git\cmd\git.exe" "--git-dir=D:\src\vcpkg\.git" "--work-tree=D:\src\vcpkg\.git" -c core.autocrlf=false show "--pretty=format:%h %cd (%cr)" -s --date=short HEAD)
[DEBUG] 1024: cmd_execute_and_stream_data() returned 0 after    23789 us
Please ensure you're using the latest port files with `git pull` and `vcpkg update`.
Then check for known issues at:
  https://github.com/microsoft/vcpkg/issues?q=is%3Aissue+is%3Aopen+in%3Atitle+protobuf
You can submit a new issue at:
  https://github.com/microsoft/vcpkg/issues/new?title=%5Bprotobuf%5D%20build%20error%20on%20x64-windows&body=Copy%20issue%20body%20from%20D%3A%2Fsrc%2Fvcpkg%2Finstalled%2Fvcpkg%2Fissue_body.md

Completed submission of utf8-range:x64-windows@6.33.4 to 1 binary cache(s) in 24.2 ms
[DEBUG] D:\a\_work\1\s\src\vcpkg\commands.install.cpp(677):
[DEBUG] Time in subprocesses: 375745625us
[DEBUG] Time in parsing JSON: 343us
[DEBUG] Time in JSON reader: 225us
[DEBUG] Time in filesystem: 44588us
[DEBUG] Time in loading ports: 799us
[DEBUG] Exiting after 6.2 min (374072057us)

content of D:\src\vcpkg\buildtrees\protobuf\copy-tool-dependencies-0-err.log :

Unhandled exception. System.ComponentModel.Win32Exception (2): An error occurred trying to start process 'dotnet' with working directory 'D:\src\vcpkg'. 系统找不到指定的文件。
   at System.Diagnostics.Process.StartWithCreateProcess(ProcessStartInfo startInfo)
   at System.Diagnostics.Process.Start(ProcessStartInfo startInfo)
   at Microsoft.PowerShell.GlobalTool.Shim.EntryPoint.Main(String[] args)

Additional context

execute the failed command from command line:

D:\src\vcpkg>C:/Users/user/.dotnet/tools/pwsh.exe -noprofile -executionpolicy Bypass -nologo -file D:/src/vcpkg/scripts/buildsystems/msbuild/applocal.ps1 -targetBinary D:/src/vcpkg/packages/protobuf_x64-windows/tools/protobuf/protoc.exe -installedDir D:/src/vcpkg/packages/protobuf_x64-windows/bin -verbose
VERBOSE: Resolving base path D:/src/vcpkg/packages/protobuf_x64-windows/tools/protobuf/protoc.exe...
VERBOSE: Resolving D:/src/vcpkg/packages/protobuf_x64-windows/tools/protobuf/protoc.exe...
VERBOSE:   libprotoc.dll: Copying D:\src\vcpkg\packages\protobuf_x64-windows\bin\libprotoc.dll
VERBOSE: Resolving D:\src\vcpkg\packages\protobuf_x64-windows\tools\protobuf\libprotoc.dll...
VERBOSE:   libprotobuf.dll: Copying D:\src\vcpkg\packages\protobuf_x64-windows\bin\libprotobuf.dll
VERBOSE: Resolving D:\src\vcpkg\packages\protobuf_x64-windows\tools\protobuf\libprotobuf.dll...
VERBOSE:   abseil_dll.dll: D:\src\vcpkg\packages\protobuf_x64-windows\bin\abseil_dll.dll not found
VERBOSE:   KERNEL32.dll: D:\src\vcpkg\packages\protobuf_x64-windows\bin\KERNEL32.dll not found
VERBOSE:   MSVCP140.dll: D:\src\vcpkg\packages\protobuf_x64-windows\bin\MSVCP140.dll not found
VERBOSE:   VCRUNTIME140.dll: D:\src\vcpkg\packages\protobuf_x64-windows\bin\VCRUNTIME140.dll not found
VERBOSE:   VCRUNTIME140_1.dll: D:\src\vcpkg\packages\protobuf_x64-windows\bin\VCRUNTIME140_1.dll not found
VERBOSE:   api-ms-win-crt-heap-l1-1-0.dll: D:\src\vcpkg\packages\protobuf_x64-windows\bin\api-ms-win-crt-heap-l1-1-0.dll not found
VERBOSE:   api-ms-win-crt-string-l1-1-0.dll: D:\src\vcpkg\packages\protobuf_x64-windows\bin\api-ms-win-crt-string-l1-1-0.dll not found
VERBOSE:   api-ms-win-crt-runtime-l1-1-0.dll: D:\src\vcpkg\packages\protobuf_x64-windows\bin\api-ms-win-crt-runtime-l1-1-0.dll not found
VERBOSE:   api-ms-win-crt-filesystem-l1-1-0.dll: D:\src\vcpkg\packages\protobuf_x64-windows\bin\api-ms-win-crt-filesystem-l1-1-0.dll not found
VERBOSE:   api-ms-win-crt-convert-l1-1-0.dll: D:\src\vcpkg\packages\protobuf_x64-windows\bin\api-ms-win-crt-convert-l1-1-0.dll not found
VERBOSE:   api-ms-win-crt-stdio-l1-1-0.dll: D:\src\vcpkg\packages\protobuf_x64-windows\bin\api-ms-win-crt-stdio-l1-1-0.dll not found
VERBOSE:   api-ms-win-crt-environment-l1-1-0.dll: D:\src\vcpkg\packages\protobuf_x64-windows\bin\api-ms-win-crt-environment-l1-1-0.dll not found
VERBOSE:   api-ms-win-crt-math-l1-1-0.dll: D:\src\vcpkg\packages\protobuf_x64-windows\bin\api-ms-win-crt-math-l1-1-0.dll not found
VERBOSE: Done Resolving D:\src\vcpkg\packages\protobuf_x64-windows\tools\protobuf\libprotobuf.dll.
VERBOSE:   abseil_dll.dll: previously searched - Skip
VERBOSE:   KERNEL32.dll: previously searched - Skip
VERBOSE:   MSVCP140.dll: previously searched - Skip
VERBOSE:   VCRUNTIME140.dll: previously searched - Skip
VERBOSE:   VCRUNTIME140_1.dll: previously searched - Skip
VERBOSE:   api-ms-win-crt-heap-l1-1-0.dll: previously searched - Skip
VERBOSE:   api-ms-win-crt-string-l1-1-0.dll: previously searched - Skip
VERBOSE:   api-ms-win-crt-runtime-l1-1-0.dll: previously searched - Skip
VERBOSE:   api-ms-win-crt-environment-l1-1-0.dll: previously searched - Skip
VERBOSE:   api-ms-win-crt-stdio-l1-1-0.dll: previously searched - Skip
VERBOSE:   api-ms-win-crt-filesystem-l1-1-0.dll: previously searched - Skip
VERBOSE:   api-ms-win-crt-math-l1-1-0.dll: previously searched - Skip
VERBOSE:   api-ms-win-crt-convert-l1-1-0.dll: previously searched - Skip
VERBOSE:   api-ms-win-crt-utility-l1-1-0.dll: D:\src\vcpkg\packages\protobuf_x64-windows\bin\api-ms-win-crt-utility-l1-1-0.dll not found
VERBOSE: Done Resolving D:\src\vcpkg\packages\protobuf_x64-windows\tools\protobuf\libprotoc.dll.
VERBOSE:   abseil_dll.dll: previously searched - Skip
VERBOSE:   KERNEL32.dll: previously searched - Skip
VERBOSE:   SHELL32.dll: D:\src\vcpkg\packages\protobuf_x64-windows\bin\SHELL32.dll not found
VERBOSE:   MSVCP140.dll: previously searched - Skip
VERBOSE:   VCRUNTIME140.dll: previously searched - Skip
VERBOSE:   VCRUNTIME140_1.dll: previously searched - Skip
VERBOSE:   api-ms-win-crt-heap-l1-1-0.dll: previously searched - Skip
VERBOSE:   api-ms-win-crt-string-l1-1-0.dll: previously searched - Skip
VERBOSE:   api-ms-win-crt-runtime-l1-1-0.dll: previously searched - Skip
VERBOSE:   api-ms-win-crt-math-l1-1-0.dll: previously searched - Skip
VERBOSE:   api-ms-win-crt-stdio-l1-1-0.dll: previously searched - Skip
VERBOSE:   api-ms-win-crt-locale-l1-1-0.dll: D:\src\vcpkg\packages\protobuf_x64-windows\bin\api-ms-win-crt-locale-l1-1-0.dll not found
VERBOSE: Done Resolving D:/src/vcpkg/packages/protobuf_x64-windows/tools/protobuf/protoc.exe.
VERBOSE:
Name                           Value
----                           -----
VCRUNTIME140.dll               True
api-ms-win-crt-utility-l1-1-0… True
SHELL32.dll                    True
MSVCP140.dll                   True
api-ms-win-crt-environment-l1… True
api-ms-win-crt-string-l1-1-0.… True
api-ms-win-crt-math-l1-1-0.dll True
KERNEL32.dll                   True
VCRUNTIME140_1.dll             True
abseil_dll.dll                 True
libprotoc.dll                  True
api-ms-win-crt-locale-l1-1-0.… True
api-ms-win-crt-filesystem-l1-… True
libprotobuf.dll                True
api-ms-win-crt-stdio-l1-1-0.d… True
api-ms-win-crt-convert-l1-1-0… True
api-ms-win-crt-heap-l1-1-0.dll True
api-ms-win-crt-runtime-l1-1-0… True



D:\src\vcpkg>echo %ERRORLEVEL%
0

git commit:

D:\src\vcpkg>git log -1
commit aa2d37682e3318d93aef87efa7b0e88e81cd3d59 (HEAD -> master, origin/master, origin/HEAD)
Author: SunBlack <SunBlack@users.noreply.github.com>
Date:   Sat Feb 7 05:37:58 2026 +0100

    [workflow] Split Windows branch to separate port (#48855)

Metadata

Metadata

Assignees

No one assigned

    Labels

    category:port-bugThe issue is with a library, which is something the port should already support

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions