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 #39944

Closed jtt8 closed 1 week ago

jtt8 commented 1 month ago
C:\Users\jklui\vcpkg>vcpkg install protobuf:x86-windows-static
Computing installation plan...
The following packages will be built and installed:
  * protobuf:x64-windows@4.25.1
    protobuf:x86-windows-static@4.25.1
  * utf8-range:x86-windows-static@4.25.1
Additional packages (*) will be modified to complete this operation.
Detecting compiler hash for triplet x64-windows...
Compiler found: C:/Program Files/Microsoft Visual Studio/2022/Enterprise/VC/Tools/MSVC/14.34.31933/bin/Hostx64/x64/cl.exe
Detecting compiler hash for triplet x86-windows-static...
Compiler found: C:/Program Files/Microsoft Visual Studio/2022/Enterprise/VC/Tools/MSVC/14.34.31933/bin/Hostx64/x86/cl.exe
Restored 0 package(s) from C:\Users\jklui\AppData\Local\vcpkg\archives in 83.1 us. Use --debug to see more details.
Installing 1/3 protobuf:x64-windows@4.25.1...
Building protobuf:x64-windows@4.25.1...
-- Using cached protocolbuffers-protobuf-v4.25.1.tar.gz.
-- Cleaning sources at C:/Users/jklui/vcpkg/buildtrees/protobuf/src/v4.25.1-a5e9c0ed50.clean. Use --editable to skip cleaning for the packages you specify.
-- Extracting source C:/Users/jklui/vcpkg/downloads/protocolbuffers-protobuf-v4.25.1.tar.gz
-- Applying patch fix-static-build.patch
-- Applying patch fix-default-proto-file-path.patch
-- Applying patch fix-utf8-range.patch
-- Using source at C:/Users/jklui/vcpkg/buildtrees/protobuf/src/v4.25.1-a5e9c0ed50.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_build_process.cmake:134 (message):
    Command failed: C:/Users/jklui/vcpkg/downloads/tools/cmake-3.29.2-windows/cmake-3.29.2-windows-i386/bin/cmake.exe --build . --config Release --target install -- -v -j33
    Working Directory: C:/Users/jklui/vcpkg/buildtrees/protobuf/x64-windows-rel
    See logs for more information:
      C:\Users\jklui\vcpkg\buildtrees\protobuf\install-x64-windows-rel-out.log

Call Stack (most recent call first):
  installed/x64-windows/share/vcpkg-cmake/vcpkg_cmake_build.cmake:74 (vcpkg_execute_build_process)
  installed/x64-windows/share/vcpkg-cmake/vcpkg_cmake_install.cmake:16 (vcpkg_cmake_build)
  ports/protobuf/portfile.cmake:60 (vcpkg_cmake_install)
  scripts/ports.cmake:192 (include)

The error log says its internal compiler error... I have downgraded my vs to 17.4.2 and still nothing. What should I try?

jtt8 commented 1 month ago

install-x64-windows-rel-out.log

Cheney-W commented 1 month ago

I can't reproduce this issue in my side with the latest vcpkg and VS2022 17.10.4.

jtt8 commented 1 month ago

I can't reproduce this issue in my side with the latest vcpkg and VS2022 17.10.4.

Any general suggestions you can make? I will completely reinstall vcpkg and vs and let you know how it goes.

Cheney-W commented 1 month ago
C:\Users\jklui\vcpkg\installed\x64-windows\include\absl\container\internal\compressed_tuple.h(90) : fatal error C1001: Internal compiler error.
(compiler file 'D:\a\_work\1\s\src\vctools\Compiler\Utc\src\p2\main.c', line 224)

In most cases, such errors are bugs within Visual Studio itself, and their fixes are usually in newer versions. Therefore, upgrading your Visual Studio should be the first priority.

github-actions[bot] commented 3 weeks 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.