microsoft / vcpkg

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

[crashpad] Build error on x64-windows #41645

Open wuxianggujun opened 1 month ago

wuxianggujun commented 1 month ago

Package: crashpad:x64-windows@2024-04-11#4

Host Environment

To Reproduce

vcpkg install crashpad

Failure logs

-- Note: crashpad only supports static library linkage. Building static library.
-- Fetching https://chromium.googlesource.com/crashpad/crashpad 7e0af1d4d45b526f01677e74a56f4a951b70517d...
-- Extracting source D:/Programs/vcpkg/downloads/crashpad-7e0af1d4d45b526f01677e74a56f4a951b70517d.tar.gz
-- Applying patch fix-linux.patch
-- Applying patch fix-lib-name-conflict.patch
-- Using source at D:/Programs/vcpkg/buildtrees/crashpad/src/951b70517d-61636f7b86.clean
-- Fetching https://chromium.googlesource.com/chromium/mini_chromium dce72d97d1c2e9beb5e206c6a05a702269794ca3...
-- Extracting source D:/Programs/vcpkg/downloads/crashpad-dce72d97d1c2e9beb5e206c6a05a702269794ca3.tar.gz
-- Applying patch fix-std-20.patch
-- Applying patch ndk-toolchain.diff
-- Applying patch fix-lib-name-conflict-1.patch
-- Using source at D:/Programs/vcpkg/buildtrees/crashpad/src/2269794ca3-31403e06d2.clean
-- Found external ninja('1.12.1').
-- Getting CMake variables for x64-windows
-- Generating build (x64-windows-dbg)...
CMake Error at scripts/cmake/vcpkg_execute_required_process.cmake:127 (message):
    Command failed: D:/Programs/vcpkg/installed/x64-windows/tools/gn/gn.exe gen D:/Programs/vcpkg/buildtrees/crashpad/x64-windows-dbg "--args=target_cpu=\"x64\" target_os=\"win\" is_debug=true         extra_cflags_c=\"  -nologo -DWIN32 -D_WINDOWS -utf-8 -MP  -D_DEBUG -MDd -Z7 -Ob0 -Od -RTC1   \"         extra_cflags_cc=\"  -nologo -DWIN32 -D_WINDOWS -utf-8 -GR -EHsc -MP  -D_DEBUG -MDd -Z7 -Ob0 -Od -RTC1   \"         extra_ldflags=\" -machine:x64 -nologo    -debug -INCREMENTAL  \"         extra_arflags=\"-machine:x64 -nologo\"         extra_cflags=\"/GL-\"         extra_ldflags=\"/LTCG:OFF\"         extra_arflags=\"/LTCG:OFF\""
    Working Directory: D:/Programs/vcpkg/buildtrees/crashpad/src/951b70517d-61636f7b86.clean
    Error code: 1
    See logs for more information:
      D:\Programs\vcpkg\buildtrees\crashpad\generate-x64-windows-dbg-out.log
      D:\Programs\vcpkg\buildtrees\crashpad\generate-x64-windows-dbg-err.log

Call Stack (most recent call first):
  installed/x64-windows/share/vcpkg-gn/vcpkg_gn_configure.cmake:10 (vcpkg_execute_required_process)
  installed/x64-windows/share/vcpkg-gn/vcpkg_gn_configure.cmake:34 (z_vcpkg_gn_configure_generate)
  ports/crashpad/portfile.cmake:112 (vcpkg_gn_configure)
  scripts/ports.cmake:192 (include)
D:\Programs\vcpkg\buildtrees\crashpad\generate-x64-windows-dbg-out.log ``` ERROR at //third_party/mini_chromium/mini_chromium/build/config/BUILD.gn:622:20: Script returned non-zero exit code. toolchain_data = exec_script(helper_path, ^---------- Current dir: D:/Programs/vcpkg/buildtrees/crashpad/x64-windows-dbg/ Command: D:/Programs/vcpkg/downloads/tools/python/python-3.12.7-x64/python.exe D:/Programs/vcpkg/buildtrees/crashpad/src/951b70517d-61636f7b86.clean/third_party/mini_chromium/mini_chromium/build/win_helper.py get-visual-studio-data D:/Programs/vcpkg/buildtrees/crashpad/x64-windows-dbg D:/Programs/vcpkg/buildtrees/crashpad/src/951b70517d-61636f7b86.clean/third_party/mini_chromium/mini_chromium/build/config/ Returned 1. See //build/BUILDCONFIG.gn:74:33: which caused the file to be included. "$_mini_chromium_dir/build/config:win_console", ^--------------------------------------------- ```
D:\Programs\vcpkg\buildtrees\crashpad\generate-x64-windows-dbg-err.log ``` Traceback (most recent call last): File "D:\Programs\vcpkg\buildtrees\crashpad\src\951b70517d-61636f7b86.clean\third_party\mini_chromium\mini_chromium\build\win_helper.py", line 230, in sys.exit(WinTool().Dispatch(sys.argv[1:])) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "D:\Programs\vcpkg\buildtrees\crashpad\src\951b70517d-61636f7b86.clean\third_party\mini_chromium\mini_chromium\build\win_helper.py", line 124, in Dispatch return getattr(self, method)(*args[1:]) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "D:\Programs\vcpkg\buildtrees\crashpad\src\951b70517d-61636f7b86.clean\third_party\mini_chromium\mini_chromium\build\win_helper.py", line 210, in ExecGetVisualStudioData install_dir, script_path = (explicit() or env() or autodetect() or fail()) ^^^^^^ File "D:\Programs\vcpkg\buildtrees\crashpad\src\951b70517d-61636f7b86.clean\third_party\mini_chromium\mini_chromium\build\win_helper.py", line 205, in fail def fail(): raise Exception('Visual Studio installation dir not found') ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ Exception: Visual Studio installation dir not found ```
JonLiu1993 commented 1 month ago

@wuxianggujun, Thanks for posting this issue, I can't reproduce your error locally:

-- Installing: F:/test/vcpkg/packages/crashpad_x64-windows/debug/lib/vcpkg_crashpad_client.lib
-- Installing: F:/test/vcpkg/packages/crashpad_x64-windows/debug/lib/vcpkg_crashpad_client_common.lib
-- Installing: F:/test/vcpkg/packages/crashpad_x64-windows/debug/lib/vcpkg_crashpad_util.lib
-- Installing: F:/test/vcpkg/packages/crashpad_x64-windows/debug/lib/vcpkg_crashpad_base.lib
-- Installing: F:/test/vcpkg/packages/crashpad_x64-windows/debug/tools/crashpad_handler.exe
-- Installing: F:/test/vcpkg/packages/crashpad_x64-windows/lib/vcpkg_crashpad_client.lib
-- Installing: F:/test/vcpkg/packages/crashpad_x64-windows/lib/vcpkg_crashpad_client_common.lib
-- Installing: F:/test/vcpkg/packages/crashpad_x64-windows/lib/vcpkg_crashpad_util.lib
-- Installing: F:/test/vcpkg/packages/crashpad_x64-windows/lib/vcpkg_crashpad_base.lib
-- Installing: F:/test/vcpkg/packages/crashpad_x64-windows/tools/crashpad_handler.exe
-- Installing headers...
-- Installing: F:/test/vcpkg/packages/crashpad_x64-windows/share/crashpad/copyright
-- Performing post-build validation
Elapsed time to handle crashpad:x64-windows: 3.9 min
Total install time: 3.9 min
crashpad provides CMake targets:

  # this is heuristically generated, and may not be correct
  find_package(crashpad CONFIG REQUIRED)
  target_link_libraries(main PRIVATE crashpad::crashpad)
wuxianggujun commented 1 month ago

I tried to install it again, but it still failed. I'll try to see if installing other libraries will result in an error.

github-actions[bot] commented 4 days 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.

JonLiu1993 commented 4 days ago

@wuxianggujun, does this error still exist?