microsoft / vcpkg

C++ Library Manager for Windows, Linux, and MacOS
MIT License
22.75k stars 6.29k forks source link

[protobuf] Build error on x64-windows #39386

Open GabrielNedelcu77 opened 2 months ago

GabrielNedelcu77 commented 2 months ago

Tried to install protobuff using vcpkg/mingw64 , command: ./vcpkg.exe install protobuf:x64-windows

error: building protobuf:x64-windows failed with: BUILD_FAILED Elapsed time to handle protobuf:x64-windows: 3.9 min Please ensure you're using the latest port files with git pull and vcpkg update.

Package: protobuf:x64-windows@3.21.12#3

Host Environment

To Reproduce

vcpkg install protobuf --recurse

Failure logs

-- Using cached protocolbuffers-protobuf-v3.21.12.tar.gz.
-- Cleaning sources at C:/DATA/vcpkg/buildtrees/protobuf/src/v3.21.12-fdb7676342.clean. Use --editable to skip cleaning for the packages you specify.
-- Extracting source C:/DATA/vcpkg/downloads/protocolbuffers-protobuf-v3.21.12.tar.gz
-- Applying patch fix-static-build.patch
-- Applying patch fix-default-proto-file-path.patch
-- Applying patch compile_options.patch
-- Using source at C:/DATA/vcpkg/buildtrees/protobuf/src/v3.21.12-fdb7676342.clean
-- Found external ninja('1.11.0').
-- Configuring x64-windows
-- Building x64-windows-dbg
-- Building x64-windows-rel
CMake Error at scripts/cmake/vcpkg_execute_required_process.cmake:112 (message):
    Command failed: C:/DATA/vcpkg/downloads/tools/powershell-core-7.2.16-windows/pwsh.exe -noprofile -executionpolicy Bypass -nologo -file C:/DATA/vcpkg/scripts/buildsystems/msbuild/applocal.ps1 -targetBinary C:/DATA/vcpkg/packages/protobuf_x64-windows/tools/protobuf/protoc.exe -installedDir C:/DATA/vcpkg/packages/protobuf_x64-windows/bin -verbose
    Working Directory: C:/DATA/vcpkg
    Error code: 1
    See logs for more information:
      C:\DATA\vcpkg\buildtrees\protobuf\copy-tool-dependencies-0-out.log
      C:\DATA\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:92 (vcpkg_copy_tools)
  scripts/ports.cmake:191 (include)
C:\DATA\vcpkg\buildtrees\protobuf\copy-tool-dependencies-0-out.log ``` VERBOSE: Resolving base path C:/DATA/vcpkg/packages/protobuf_x64-windows/tools/protobuf/protoc.exe... VERBOSE: Resolving C:/DATA/vcpkg/packages/protobuf_x64-windows/tools/protobuf/protoc.exe... ```
C:\DATA\vcpkg\buildtrees\protobuf\copy-tool-dependencies-0-err.log ``` Write-Error: C:\DATA\vcpkg\scripts\buildsystems\msbuild\applocal.ps1:40 Line |  40 |  $mtx = getMutex($targetBinaryDir)  |  ~~~~~~~~~~~~~~~~~~~~~~~~~~  | Cannot invoke method. Method invocation is supported only on core types in this language mode.  ```

issue_body.md

dg0yt commented 2 months ago

Tried to install protobuff using vcpkg/mingw64 , command: ./vcpkg.exe install protobuf:x64-windows

x64-windows is not for mingw, x64-mingw-dynamic would be the corresponding mingw variant.

If you do not have MSVC, you probably want to set the host triplet to a mingw one.

JonLiu1993 commented 2 months ago

@GabrielNedelcu77, I want to confirm that you need the x64-windows triplet?

github-actions[bot] commented 1 month ago

This is an automated message. Per our repo policy, stale issues get closed if there has been no activity in the past 28 days. The issue will be automatically closed in 14 days. If you wish to keep this issue open, please add a new comment.