vcpkg 无法编译 grpc 的指定版本



由于项目的需要,需要使用 vcpkg 来安装 1.18grpc 和 3.6.1.3protobuf,所以我修改了 vcpkg-master\ports\rpc\CONTROL 到指定的版本,当然我也修改了 protobuf 的 CONTROL。最后 vcpkg 报告错误: 错误: 构建软件包 grpc: x86-windows 失败,BUILD_FAILED

windows10 ,the latest version of vcpkg-master.zip
Building package grpc[core]:x86-windows...
-- Note: grpc only supports static library linkage. Building static library.
-- Using cached D:/Google/vcpkg-master/downloads/grpc-grpc-75475f090875e737ad6909a6057c59577f0c79b1.tar.gz
-- Extracting source D:/Google/vcpkg-master/downloads/grpc-grpc-75475f090875e737ad6909a6057c59577f0c79b1.tar.gz
-- Applying patch 00001-fix-uwp.patch
-- Applying patch 00002-static-linking-in-linux.patch
-- Applying patch 00003-undef-base64-macro.patch
-- Applying patch 00004-link-gdi32-on-windows.patch
-- Using source at D:/Google/vcpkg-master/buildtrees/grpc/src/577f0c79b1-086c8c6e6c
-- Configuring x86-windows
-- Building x86-windows-dbg
CMake Error at scripts/cmake/vcpkg_execute_build_process.cmake:136 (message):
    Command failed: D:/Google/vcpkg-master/downloads/tools/cmake-3.14.0-windows/cmake-3.14.0-win32-x86/bin/cmake.exe --build . --config Debug --target install -- -v
    Working Directory: D:/Google/vcpkg-master/buildtrees/grpc/x86-windows-dbg
    See logs for more information:
      D:Googlevcpkg-masterbuildtreesgrpcinstall-x86-windows-dbg-out.log
Call Stack (most recent call first):
  scripts/cmake/vcpkg_build_cmake.cmake:96 (vcpkg_execute_build_process)
  scripts/cmake/vcpkg_install_cmake.cmake:24 (vcpkg_build_cmake)
  ports/grpc/portfile.cmake:73 (vcpkg_install_cmake)
  scripts/ports.cmake:73 (include)

I hope that vcpkg can install the specified version of protobuf and grpc, but the actual vcpkg only installed protobuf, and grpc failed.

我在#8710中发现了关于您的问题的相同问题,我认为它可以为您工作:

该功能似乎与系统功能重复。你能解压缩这个补丁,把它移动到VCPKG_PATH/端口/grpc/并添加行:fix-duplicate-gettid.patchVCPKG_PATH/ports/grpc/portfile.cmake 第 27 行然后尝试重建 GRPC?

最新更新