windows: depends config fails #32578

issue John-zhan openend this issue on May 21, 2025
  1. John-zhan commented at 1:04 pm on May 21, 2025: none

    Is there an existing issue for this?

    • I have searched the existing issues

    Current behaviour

    “cmake -B build –preset vs2022-static” execute this config, and bitcoin–9.0\build\vcpkg_installed\vcpkg\blds\libevent\config-x64-windows-static-out.log display such info:

    [1/2] “D:/Program Files/CMake/bin/cmake.exe” -E chdir “..” “D:/Program Files/CMake/bin/cmake.exe” “F:/workspace/code/github/bitcoin-29.0/build/vcpkg_installed/vcpkg/blds/libevent/src/.12-stable-1d4b950f74.clean” “-G” “Ninja” “-DCMAKE_BUILD_TYPE=Release” “-DCMAKE_INSTALL_PREFIX=F:/workspace/code/github/bitcoin-29.0/build/vcpkg_installed/vcpkg/pkgs/libevent_x64-windows-static” “-DFETCHCONTENT_FULLY_DISCONNECTED=ON” “-DEVENT__DISABLE_OPENSSL=ON” “-DEVENT__DISABLE_THREAD_SUPPORT=OFF” “-DEVENT__LIBRARY_TYPE=STATIC” “-DEVENT__MSVC_STATIC_RUNTIME=ON” “-DEVENT__DISABLE_BENCHMARK=ON” “-DEVENT__DISABLE_TESTS=ON” “-DEVENT__DISABLE_REGRESS=ON” “-DEVENT__DISABLE_SAMPLES=ON” “-DCMAKE_MAKE_PROGRAM=D:/Program Files/Microsoft Visual Studio/2022/Community/Common7/IDE/CommonExtensions/Microsoft/CMake/Ninja/ninja.exe” “-DBUILD_SHARED_LIBS=OFF” “-DVCPKG_CHAINLOAD_TOOLCHAIN_FILE=D:/Program Files/Microsoft Visual Studio/2022/Community/VC/vcpkg/scripts/toolchains/windows.cmake” “-DVCPKG_TARGET_TRIPLET=x64-windows-static” “-DVCPKG_SET_CHARSET_FLAG=ON” “-DVCPKG_PLATFORM_TOOLSET=v143” “-DCMAKE_EXPORT_NO_PACKAGE_REGISTRY=ON” “-DCMAKE_FIND_PACKAGE_NO_PACKAGE_REGISTRY=ON” “-DCMAKE_FIND_PACKAGE_NO_SYSTEM_PACKAGE_REGISTRY=ON” “-DCMAKE_INSTALL_SYSTEM_RUNTIME_LIBS_SKIP=TRUE” “-DCMAKE_VERBOSE_MAKEFILE=ON” “-DVCPKG_APPLOCAL_DEPS=OFF” “-DCMAKE_TOOLCHAIN_FILE=D:/Program Files/Microsoft Visual Studio/2022/Community/VC/vcpkg/scripts/buildsystems/vcpkg.cmake” “-DCMAKE_ERROR_ON_ABSOLUTE_INSTALL_DESTINATION=ON” “-DVCPKG_CXX_FLAGS=” “-DVCPKG_CXX_FLAGS_RELEASE=” “-DVCPKG_CXX_FLAGS_DEBUG=” “-DVCPKG_C_FLAGS=” “-DVCPKG_C_FLAGS_RELEASE=” “-DVCPKG_C_FLAGS_DEBUG=” “-DVCPKG_CRT_LINKAGE=static” “-DVCPKG_LINKER_FLAGS=” “-DVCPKG_LINKER_FLAGS_RELEASE=” “-DVCPKG_LINKER_FLAGS_DEBUG=” “-DVCPKG_TARGET_ARCHITECTURE=x64” “-DCMAKE_INSTALL_LIBDIR:STRING=lib” “-DCMAKE_INSTALL_BINDIR:STRING=bin” “-D_VCPKG_ROOT_DIR=D:/Program Files/Microsoft Visual Studio/2022/Community/VC/vcpkg” “-D_VCPKG_INSTALLED_DIR=F:/workspace/code/github/bitcoin-29.0/build/vcpkg_installed” “-DVCPKG_MANIFEST_INSTALL=OFF” FAILED: ../CMakeCache.txt “D:/Program Files/CMake/bin/cmake.exe” -E chdir “..” “D:/Program Files/CMake/bin/cmake.exe” “F:/workspace/code/github/bitcoin-29.0/build/vcpkg_installed/vcpkg/blds/libevent/src/.12-stable-1d4b950f74.clean” “-G” “Ninja” “-DCMAKE_BUILD_TYPE=Release” “-DCMAKE_INSTALL_PREFIX=F:/workspace/code/github/bitcoin-29.0/build/vcpkg_installed/vcpkg/pkgs/libevent_x64-windows-static” “-DFETCHCONTENT_FULLY_DISCONNECTED=ON” “-DEVENT__DISABLE_OPENSSL=ON” “-DEVENT__DISABLE_THREAD_SUPPORT=OFF” “-DEVENT__LIBRARY_TYPE=STATIC” “-DEVENT__MSVC_STATIC_RUNTIME=ON” “-DEVENT__DISABLE_BENCHMARK=ON” “-DEVENT__DISABLE_TESTS=ON” “-DEVENT__DISABLE_REGRESS=ON” “-DEVENT__DISABLE_SAMPLES=ON” “-DCMAKE_MAKE_PROGRAM=D:/Program Files/Microsoft Visual Studio/2022/Community/Common7/IDE/CommonExtensions/Microsoft/CMake/Ninja/ninja.exe” “-DBUILD_SHARED_LIBS=OFF” “-DVCPKG_CHAINLOAD_TOOLCHAIN_FILE=D:/Program Files/Microsoft Visual Studio/2022/Community/VC/vcpkg/scripts/toolchains/windows.cmake” “-DVCPKG_TARGET_TRIPLET=x64-windows-static” “-DVCPKG_SET_CHARSET_FLAG=ON” “-DVCPKG_PLATFORM_TOOLSET=v143” “-DCMAKE_EXPORT_NO_PACKAGE_REGISTRY=ON” “-DCMAKE_FIND_PACKAGE_NO_PACKAGE_REGISTRY=ON” “-DCMAKE_FIND_PACKAGE_NO_SYSTEM_PACKAGE_REGISTRY=ON” “-DCMAKE_INSTALL_SYSTEM_RUNTIME_LIBS_SKIP=TRUE” “-DCMAKE_VERBOSE_MAKEFILE=ON” “-DVCPKG_APPLOCAL_DEPS=OFF” “-DCMAKE_TOOLCHAIN_FILE=D:/Program Files/Microsoft Visual Studio/2022/Community/VC/vcpkg/scripts/buildsystems/vcpkg.cmake” “-DCMAKE_ERROR_ON_ABSOLUTE_INSTALL_DESTINATION=ON” “-DVCPKG_CXX_FLAGS=” “-DVCPKG_CXX_FLAGS_RELEASE=” “-DVCPKG_CXX_FLAGS_DEBUG=” “-DVCPKG_C_FLAGS=” “-DVCPKG_C_FLAGS_RELEASE=” “-DVCPKG_C_FLAGS_DEBUG=” “-DVCPKG_CRT_LINKAGE=static” “-DVCPKG_LINKER_FLAGS=” “-DVCPKG_LINKER_FLAGS_RELEASE=” “-DVCPKG_LINKER_FLAGS_DEBUG=” “-DVCPKG_TARGET_ARCHITECTURE=x64” “-DCMAKE_INSTALL_LIBDIR:STRING=lib” “-DCMAKE_INSTALL_BINDIR:STRING=bin” “-D_VCPKG_ROOT_DIR=D:/Program Files/Microsoft Visual Studio/2022/Community/VC/vcpkg” “-D_VCPKG_INSTALLED_DIR=F:/workspace/code/github/bitcoin-29.0/build/vcpkg_installed” “-DVCPKG_MANIFEST_INSTALL=OFF” CMake Error at CMakeLists.txt:22 (cmake_minimum_required): Compatibility with CMake < 3.5 has been removed from CMake.

    Update the VERSION argument value. Or, use the syntax to tell CMake that the project requires at least but has been updated to work with policies introduced by or earlier.

    Or, add -DCMAKE_POLICY_VERSION_MINIMUM=3.5 to try configuring anyway.

    – Configuring incomplete, errors occurred! [2/2] “D:/Program Files/CMake/bin/cmake.exe” -E chdir “../../x64-windows-static-dbg” “D:/Program Files/CMake/bin/cmake.exe” “F:/workspace/code/github/bitcoin-29.0/build/vcpkg_installed/vcpkg/blds/libevent/src/.12-stable-1d4b950f74.clean” “-G” “Ninja” “-DCMAKE_BUILD_TYPE=Debug” “-DCMAKE_INSTALL_PREFIX=F:/workspace/code/github/bitcoin-29.0/build/vcpkg_installed/vcpkg/pkgs/libevent_x64-windows-static/debug” “-DFETCHCONTENT_FULLY_DISCONNECTED=ON” “-DEVENT__DISABLE_OPENSSL=ON” “-DEVENT__DISABLE_THREAD_SUPPORT=OFF” “-DEVENT__LIBRARY_TYPE=STATIC” “-DEVENT__MSVC_STATIC_RUNTIME=ON” “-DEVENT__DISABLE_BENCHMARK=ON” “-DEVENT__DISABLE_TESTS=ON” “-DEVENT__DISABLE_REGRESS=ON” “-DEVENT__DISABLE_SAMPLES=ON” “-DCMAKE_MAKE_PROGRAM=D:/Program Files/Microsoft Visual Studio/2022/Community/Common7/IDE/CommonExtensions/Microsoft/CMake/Ninja/ninja.exe” “-DBUILD_SHARED_LIBS=OFF” “-DVCPKG_CHAINLOAD_TOOLCHAIN_FILE=D:/Program Files/Microsoft Visual Studio/2022/Community/VC/vcpkg/scripts/toolchains/windows.cmake” “-DVCPKG_TARGET_TRIPLET=x64-windows-static” “-DVCPKG_SET_CHARSET_FLAG=ON” “-DVCPKG_PLATFORM_TOOLSET=v143” “-DCMAKE_EXPORT_NO_PACKAGE_REGISTRY=ON” “-DCMAKE_FIND_PACKAGE_NO_PACKAGE_REGISTRY=ON” “-DCMAKE_FIND_PACKAGE_NO_SYSTEM_PACKAGE_REGISTRY=ON” “-DCMAKE_INSTALL_SYSTEM_RUNTIME_LIBS_SKIP=TRUE” “-DCMAKE_VERBOSE_MAKEFILE=ON” “-DVCPKG_APPLOCAL_DEPS=OFF” “-DCMAKE_TOOLCHAIN_FILE=D:/Program Files/Microsoft Visual Studio/2022/Community/VC/vcpkg/scripts/buildsystems/vcpkg.cmake” “-DCMAKE_ERROR_ON_ABSOLUTE_INSTALL_DESTINATION=ON” “-DVCPKG_CXX_FLAGS=” “-DVCPKG_CXX_FLAGS_RELEASE=” “-DVCPKG_CXX_FLAGS_DEBUG=” “-DVCPKG_C_FLAGS=” “-DVCPKG_C_FLAGS_RELEASE=” “-DVCPKG_C_FLAGS_DEBUG=” “-DVCPKG_CRT_LINKAGE=static” “-DVCPKG_LINKER_FLAGS=” “-DVCPKG_LINKER_FLAGS_RELEASE=” “-DVCPKG_LINKER_FLAGS_DEBUG=” “-DVCPKG_TARGET_ARCHITECTURE=x64” “-DCMAKE_INSTALL_LIBDIR:STRING=lib” “-DCMAKE_INSTALL_BINDIR:STRING=bin” “-D_VCPKG_ROOT_DIR=D:/Program Files/Microsoft Visual Studio/2022/Community/VC/vcpkg” “-D_VCPKG_INSTALLED_DIR=F:/workspace/code/github/bitcoin-29.0/build/vcpkg_installed” “-DVCPKG_MANIFEST_INSTALL=OFF” FAILED: ../../x64-windows-static-dbg/CMakeCache.txt “D:/Program Files/CMake/bin/cmake.exe” -E chdir “../../x64-windows-static-dbg” “D:/Program Files/CMake/bin/cmake.exe” “F:/workspace/code/github/bitcoin-29.0/build/vcpkg_installed/vcpkg/blds/libevent/src/.12-stable-1d4b950f74.clean” “-G” “Ninja” “-DCMAKE_BUILD_TYPE=Debug” “-DCMAKE_INSTALL_PREFIX=F:/workspace/code/github/bitcoin-29.0/build/vcpkg_installed/vcpkg/pkgs/libevent_x64-windows-static/debug” “-DFETCHCONTENT_FULLY_DISCONNECTED=ON” “-DEVENT__DISABLE_OPENSSL=ON” “-DEVENT__DISABLE_THREAD_SUPPORT=OFF” “-DEVENT__LIBRARY_TYPE=STATIC” “-DEVENT__MSVC_STATIC_RUNTIME=ON” “-DEVENT__DISABLE_BENCHMARK=ON” “-DEVENT__DISABLE_TESTS=ON” “-DEVENT__DISABLE_REGRESS=ON” “-DEVENT__DISABLE_SAMPLES=ON” “-DCMAKE_MAKE_PROGRAM=D:/Program Files/Microsoft Visual Studio/2022/Community/Common7/IDE/CommonExtensions/Microsoft/CMake/Ninja/ninja.exe” “-DBUILD_SHARED_LIBS=OFF” “-DVCPKG_CHAINLOAD_TOOLCHAIN_FILE=D:/Program Files/Microsoft Visual Studio/2022/Community/VC/vcpkg/scripts/toolchains/windows.cmake” “-DVCPKG_TARGET_TRIPLET=x64-windows-static” “-DVCPKG_SET_CHARSET_FLAG=ON” “-DVCPKG_PLATFORM_TOOLSET=v143” “-DCMAKE_EXPORT_NO_PACKAGE_REGISTRY=ON” “-DCMAKE_FIND_PACKAGE_NO_PACKAGE_REGISTRY=ON” “-DCMAKE_FIND_PACKAGE_NO_SYSTEM_PACKAGE_REGISTRY=ON” “-DCMAKE_INSTALL_SYSTEM_RUNTIME_LIBS_SKIP=TRUE” “-DCMAKE_VERBOSE_MAKEFILE=ON” “-DVCPKG_APPLOCAL_DEPS=OFF” “-DCMAKE_TOOLCHAIN_FILE=D:/Program Files/Microsoft Visual Studio/2022/Community/VC/vcpkg/scripts/buildsystems/vcpkg.cmake” “-DCMAKE_ERROR_ON_ABSOLUTE_INSTALL_DESTINATION=ON” “-DVCPKG_CXX_FLAGS=” “-DVCPKG_CXX_FLAGS_RELEASE=” “-DVCPKG_CXX_FLAGS_DEBUG=” “-DVCPKG_C_FLAGS=” “-DVCPKG_C_FLAGS_RELEASE=” “-DVCPKG_C_FLAGS_DEBUG=” “-DVCPKG_CRT_LINKAGE=static” “-DVCPKG_LINKER_FLAGS=” “-DVCPKG_LINKER_FLAGS_RELEASE=” “-DVCPKG_LINKER_FLAGS_DEBUG=” “-DVCPKG_TARGET_ARCHITECTURE=x64” “-DCMAKE_INSTALL_LIBDIR:STRING=lib” “-DCMAKE_INSTALL_BINDIR:STRING=bin” “-D_VCPKG_ROOT_DIR=D:/Program Files/Microsoft Visual Studio/2022/Community/VC/vcpkg” “-D_VCPKG_INSTALLED_DIR=F:/workspace/code/github/bitcoin-29.0/build/vcpkg_installed” “-DVCPKG_MANIFEST_INSTALL=OFF” CMake Error at CMakeLists.txt:22 (cmake_minimum_required): Compatibility with CMake < 3.5 has been removed from CMake.

    Update the VERSION argument value. Or, use the syntax to tell CMake that the project requires at least but has been updated to work with policies introduced by or earlier.

    Or, add -DCMAKE_POLICY_VERSION_MINIMUM=3.5 to try configuring anyway.

    – Configuring incomplete, errors occurred! ninja: build stopped: subcommand failed.

    Expected behaviour

    successfuly execute: cmake -B build –preset vs2022-static

    Steps to reproduce

    execute cmake -B build –preset vs2022-static

    Relevant log output

    正在安装 40/93 个 libevent[core,thread]:x64-windows-static@2.1.12#7… 正在生成 libevent[core,thread]:x64-windows-static@2.1.12#7… C:\Users\win11\AppData\Local\vcpkg\registries\git-trees\49a66da074def8806e42235e6c64af567987498f: info: installing from git registry git+https://github.com/microsoft/vcpkg@49a66da074def8806e42235e6c64af567987498f – Using cached libevent-libevent-release-2.1.12-stable.tar.gz – Extracting source C:/Users/win11/AppData/Local/vcpkg/downloads/libevent-libevent-release-2.1.12-stable.tar.gz – Applying patch fix-file_path.patch – Applying patch fix-LibeventConfig_cmake_in_path.patch – Applying patch fix-usage.patch – Applying patch fix-android-threads.patch – Using source at F:/workspace/code/github/bitcoin-29.0/build/vcpkg_installed/vcpkg/blds/libevent/src/.12-stable-1d4b950f74.clean – Found external ninja(‘1.12.1’). – Configuring x64-windows-static CMake Error at scripts/cmake/vcpkg_execute_required_process.cmake:127 (message): Command failed: “D:/Program Files/Microsoft Visual Studio/2022/Community/Common7/IDE/CommonExtensions/Microsoft/CMake/Ninja/ninja.exe” -v Working Directory: F:/workspace/code/github/bitcoin-29.0/build/vcpkg_installed/vcpkg/blds/libevent/x64-windows-static-rel/vcpkg-parallel-configure Error code: 1

    How did you obtain Bitcoin Core

    Compiled from source

    What version of Bitcoin Core are you using?

    29.0

    Operating system and version

    microsoft visual studio 2022 17.14.0

    Machine specifications

    No response

  2. hebasto added the label Windows on May 21, 2025
  3. maflcko added the label Upstream on May 21, 2025
  4. maflcko removed the label Windows on May 21, 2025
  5. maflcko removed the label Upstream on May 21, 2025
  6. maflcko added the label Bug on May 21, 2025
  7. maflcko added the label Build system on May 21, 2025
  8. maflcko added the label Windows on May 21, 2025
  9. maflcko removed the label Bug on May 21, 2025
  10. maflcko added the label Upstream on May 21, 2025
  11. hebasto commented at 1:32 pm on May 21, 2025: member

    @John-zhan

    You could use the same workaround as we use in the CI. See #32184.

  12. hebasto renamed this:
    depends config fails
    windows: depends config fails
    on May 21, 2025
  13. bitcoin deleted a comment on May 25, 2025
  14. fanquake commented at 11:18 am on May 27, 2025: member
    @John-zhan does that work for you?
  15. maflcko commented at 11:49 am on May 27, 2025: member
    An alternative would be to just not use cmake 4.x and stick with cmake 3.x for now?
  16. John-zhan commented at 0:47 am on June 2, 2025: none

    @John-zhan

    You could use the same workaround as we use in the CI. See #32184.

    @John-zhan does that work for you?

    Oh, no. I’m so sorry. I modify my ci.yml as this:

    - name: Using vcpkg with MSBuild
    
        run: |
          Set-Location "$env:VCPKG_INSTALLATION_ROOT"
          Add-Content -Path "triplets\x64-windows.cmake" -Value "set(VCPKG_BUILD_TYPE release)"
          Add-Content -Path "triplets\x64-windows-static.cmake" -Value "set(VCPKG_BUILD_TYPE release)"
          # Workaround for libevent, which requires CMake 3.1 but is incompatible with CMake >= 4.0.
          sed -i '1s/^/set(ENV{CMAKE_POLICY_VERSION_MINIMUM} 3.5)\n/' "${V...ROOT}/.../ports.cmake"
    

    and then just execute rd /s /q build && del /f /q CMakeCache.txt && rd /s /q CMakeFiles。 Then cmake -B build --preset vs2022-static and now the same error log in the output.

    build\vcpkg_installed\vcpkg\blds\libevent\config-x64-windows-static-out.log file say:

    `[1/2] “D:/Program Files/CMake/bin/cmake.exe” -E chdir “..” “D:/Program Files/CMake/bin/cmake.exe” “F:/workspace/code/github/bitcoin-29.0/build/vcpkg_installed/vcpkg/blds/libevent/src/.12-stable-1d4b950f74.clean” “-G” “Ninja” “-DCMAKE_BUILD_TYPE=Release” “-DCMAKE_INSTALL_PREFIX=F:/workspace/code/github/bitcoin-29.0/build/vcpkg_installed/vcpkg/pkgs/libevent_x64-windows-static” “-DFETCHCONTENT_FULLY_DISCONNECTED=ON” “-DEVENT__DISABLE_OPENSSL=ON” “-DEVENT__DISABLE_THREAD_SUPPORT=OFF” “-DEVENT__LIBRARY_TYPE=STATIC” “-DEVENT__MSVC_STATIC_RUNTIME=ON” “-DEVENT__DISABLE_BENCHMARK=ON” “-DEVENT__DISABLE_TESTS=ON” “-DEVENT__DISABLE_REGRESS=ON” “-DEVENT__DISABLE_SAMPLES=ON” “-DCMAKE_MAKE_PROGRAM=D:/Program Files/Microsoft Visual Studio/2022/Community/Common7/IDE/CommonExtensions/Microsoft/CMake/Ninja/ninja.exe” “-DBUILD_SHARED_LIBS=OFF” “-DVCPKG_CHAINLOAD_TOOLCHAIN_FILE=D:/Program Files/Microsoft Visual Studio/2022/Community/VC/vcpkg/scripts/toolchains/windows.cmake” “-DVCPKG_TARGET_TRIPLET=x64-windows-static” “-DVCPKG_SET_CHARSET_FLAG=ON” “-DVCPKG_PLATFORM_TOOLSET=v143” “-DCMAKE_EXPORT_NO_PACKAGE_REGISTRY=ON” “-DCMAKE_FIND_PACKAGE_NO_PACKAGE_REGISTRY=ON” “-DCMAKE_FIND_PACKAGE_NO_SYSTEM_PACKAGE_REGISTRY=ON” “-DCMAKE_INSTALL_SYSTEM_RUNTIME_LIBS_SKIP=TRUE” “-DCMAKE_VERBOSE_MAKEFILE=ON” “-DVCPKG_APPLOCAL_DEPS=OFF” “-DCMAKE_TOOLCHAIN_FILE=D:/Program Files/Microsoft Visual Studio/2022/Community/VC/vcpkg/scripts/buildsystems/vcpkg.cmake” “-DCMAKE_ERROR_ON_ABSOLUTE_INSTALL_DESTINATION=ON” “-DVCPKG_CXX_FLAGS=” “-DVCPKG_CXX_FLAGS_RELEASE=” “-DVCPKG_CXX_FLAGS_DEBUG=” “-DVCPKG_C_FLAGS=” “-DVCPKG_C_FLAGS_RELEASE=” “-DVCPKG_C_FLAGS_DEBUG=” “-DVCPKG_CRT_LINKAGE=static” “-DVCPKG_LINKER_FLAGS=” “-DVCPKG_LINKER_FLAGS_RELEASE=” “-DVCPKG_LINKER_FLAGS_DEBUG=” “-DVCPKG_TARGET_ARCHITECTURE=x64” “-DCMAKE_INSTALL_LIBDIR:STRING=lib” “-DCMAKE_INSTALL_BINDIR:STRING=bin” “-D_VCPKG_ROOT_DIR=D:/Program Files/Microsoft Visual Studio/2022/Community/VC/vcpkg” “-D_VCPKG_INSTALLED_DIR=F:/workspace/code/github/bitcoin-29.0/build/vcpkg_installed” “-DVCPKG_MANIFEST_INSTALL=OFF” FAILED: ../CMakeCache.txt “D:/Program Files/CMake/bin/cmake.exe” -E chdir “..” “D:/Program Files/CMake/bin/cmake.exe” “F:/workspace/code/github/bitcoin-29.0/build/vcpkg_installed/vcpkg/blds/libevent/src/.12-stable-1d4b950f74.clean” “-G” “Ninja” “-DCMAKE_BUILD_TYPE=Release” “-DCMAKE_INSTALL_PREFIX=F:/workspace/code/github/bitcoin-29.0/build/vcpkg_installed/vcpkg/pkgs/libevent_x64-windows-static” “-DFETCHCONTENT_FULLY_DISCONNECTED=ON” “-DEVENT__DISABLE_OPENSSL=ON” “-DEVENT__DISABLE_THREAD_SUPPORT=OFF” “-DEVENT__LIBRARY_TYPE=STATIC” “-DEVENT__MSVC_STATIC_RUNTIME=ON” “-DEVENT__DISABLE_BENCHMARK=ON” “-DEVENT__DISABLE_TESTS=ON” “-DEVENT__DISABLE_REGRESS=ON” “-DEVENT__DISABLE_SAMPLES=ON” “-DCMAKE_MAKE_PROGRAM=D:/Program Files/Microsoft Visual Studio/2022/Community/Common7/IDE/CommonExtensions/Microsoft/CMake/Ninja/ninja.exe” “-DBUILD_SHARED_LIBS=OFF” “-DVCPKG_CHAINLOAD_TOOLCHAIN_FILE=D:/Program Files/Microsoft Visual Studio/2022/Community/VC/vcpkg/scripts/toolchains/windows.cmake” “-DVCPKG_TARGET_TRIPLET=x64-windows-static” “-DVCPKG_SET_CHARSET_FLAG=ON” “-DVCPKG_PLATFORM_TOOLSET=v143” “-DCMAKE_EXPORT_NO_PACKAGE_REGISTRY=ON” “-DCMAKE_FIND_PACKAGE_NO_PACKAGE_REGISTRY=ON” “-DCMAKE_FIND_PACKAGE_NO_SYSTEM_PACKAGE_REGISTRY=ON” “-DCMAKE_INSTALL_SYSTEM_RUNTIME_LIBS_SKIP=TRUE” “-DCMAKE_VERBOSE_MAKEFILE=ON” “-DVCPKG_APPLOCAL_DEPS=OFF” “-DCMAKE_TOOLCHAIN_FILE=D:/Program Files/Microsoft Visual Studio/2022/Community/VC/vcpkg/scripts/buildsystems/vcpkg.cmake” “-DCMAKE_ERROR_ON_ABSOLUTE_INSTALL_DESTINATION=ON” “-DVCPKG_CXX_FLAGS=” “-DVCPKG_CXX_FLAGS_RELEASE=” “-DVCPKG_CXX_FLAGS_DEBUG=” “-DVCPKG_C_FLAGS=” “-DVCPKG_C_FLAGS_RELEASE=” “-DVCPKG_C_FLAGS_DEBUG=” “-DVCPKG_CRT_LINKAGE=static” “-DVCPKG_LINKER_FLAGS=” “-DVCPKG_LINKER_FLAGS_RELEASE=” “-DVCPKG_LINKER_FLAGS_DEBUG=” “-DVCPKG_TARGET_ARCHITECTURE=x64” “-DCMAKE_INSTALL_LIBDIR:STRING=lib” “-DCMAKE_INSTALL_BINDIR:STRING=bin” “-D_VCPKG_ROOT_DIR=D:/Program Files/Microsoft Visual Studio/2022/Community/VC/vcpkg” “-D_VCPKG_INSTALLED_DIR=F:/workspace/code/github/bitcoin-29.0/build/vcpkg_installed” “-DVCPKG_MANIFEST_INSTALL=OFF” CMake Error at CMakeLists.txt:22 (cmake_minimum_required): Compatibility with CMake < 3.5 has been removed from CMake.

    Update the VERSION argument value. Or, use the syntax to tell CMake that the project requires at least but has been updated to work with policies introduced by or earlier.

    Or, add -DCMAKE_POLICY_VERSION_MINIMUM=3.5 to try configuring anyway.

    – Configuring incomplete, errors occurred! ninja: build stopped: subcommand failed.`

  17. hebasto commented at 10:44 am on June 2, 2025: member

    Oh, no. I’m so sorry. I modify my ci.yml as this:

    What CI are you using? Is the VCPKG_INSTALLATION_ROOT environment variable defined there?

  18. John-zhan commented at 1:05 pm on June 2, 2025: none

    Oh, no. I’m so sorry. I modify my ci.yml as this:

    What CI are you using? Is the VCPKG_INSTALLATION_ROOT environment variable defined there?

    Yes. It’s sed -i '1s/^/set(ENV{CMAKE_POLICY_VERSION_MINIMUM} 3.5)\n/' "${VCPKG_INSTALLATION_ROOT}/scripts/ports.cmake"

  19. maflcko commented at 1:08 pm on June 2, 2025: member
    Can you downgrade your cmake from 4.x to 3.x as a temporary workaround?
  20. John-zhan commented at 2:27 pm on June 2, 2025: none

    Ok, now downgrade my windows cmake version from 4 to 3.31.7。And now when execute ‘cmake -B build –preset vs2022-static’ it say this:

    正在安装 55/93 个 openssl:x64-windows@3.3.2#1… 正在生成 openssl:x64-windows@3.3.2#1… C:\Users\win11\AppData\Local\vcpkg\registries\git-trees\2c0920b57254210866a89aa705291b452a31df48: info: installing from git registry git+https://github.com/microsoft/vcpkg@2c0920b57254210866a89aa705291b452a31df48 – Using cached openssl-openssl-210dc9a50dfd99caa1cf7c3d2fa42850124b1bbc.patch – Using cached openssl-openssl-openssl-3.3.2.tar.gz – Extracting source C:/Users/win11/AppData/Local/vcpkg/downloads/openssl-openssl-openssl-3.3.2.tar.gz – Applying patch cmake-config.patch – Applying patch command-line-length.patch – Applying patch script-prefix.patch – Applying patch asm-armcap.patch – Applying patch windows/install-layout.patch – Applying patch windows/install-pdbs.patch – Applying patch unix/android-cc.patch – Applying patch unix/move-openssldir.patch – Applying patch unix/no-empty-dirs.patch – Applying patch unix/no-static-libs-for-shared.patch – Applying patch C:/Users/win11/AppData/Local/vcpkg/downloads/openssl-openssl-210dc9a50dfd99caa1cf7c3d2fa42850124b1bbc.patch – Using source at F:/workspace/code/github/bitcoin-29.0/build/vcpkg_installed/vcpkg/blds/openssl/src/nssl-3.3.2-515f0a0017.clean Downloading https://github.com/StrawberryPerl/Perl-Dist-Strawberry/releases/download/SP_54001_64bit_UCRT/strawberry-perl-5.40.0.1-64bit-portable.zip -> strawberry-perl-5.40.0.1-64bit-portable.zip strawberry-perl-5.40.0.1-64bit-portable.zip.2468.part: error: download from https://github.com/StrawberryPerl/Perl-Dist-Strawberry/releases/download/SP_54001_64bit_UCRT/strawberry-perl-5.40.0.1-64bit-portable.zip had an unexpected hash note: Expected: 374a675917a3d5c03d64633e9f80e333fd0043ec0481473027045b33dc74c43cc80836b5a369b063b8b1feee5228ffc46a6508594314d19f64b9e32e8311fbb5 note: Actual : 353fd49162bf803ce008d90f151c291ac21760857159388ecefcc7d6337e459ce6f6874d9e40dc699568be21d71c21d9efe572c359205633782211610bb3666b CMake Error at scripts/cmake/vcpkg_download_distfile.cmake:136 (message): Download failed, halting portfile. Call Stack (most recent call first): scripts/cmake/vcpkg_find_acquire_program.cmake:170 (vcpkg_download_distfile) C:/Users/win11/AppData/Local/vcpkg/registries/git-trees/2c0920b57254210866a89aa705291b452a31df48/windows/portfile.cmake:6 (vcpkg_find_acquire_program) C:/Users/win11/AppData/Local/vcpkg/registries/git-trees/2c0920b57254210866a89aa705291b452a31df48/portfile.cmake:76 (include) scripts/ports.cmake:203 (include)

    error: 生成 openssl:x64-windows 失败,结果为: BUILD_FAILED 有关详细信息,请参阅 https://learn.microsoft.com/vcpkg/troubleshoot/build-failures?WT.mc_id=vcpkg_inproduct_cli。 处理 openssl:x64-windows 所用时间: 7.5 s 请确保使用具有“git pull” 和 “vcpkg update”的最新端口文件。 然后,在以下位置查看已知问题: https://github.com/microsoft/vcpkg/issues?q=is%3Aissue+is%3Aopen+in%3Atitle+openssl 可在以下位置提交新问题: https://github.com/microsoft/vcpkg/issues/new?title=[openssl]+Build+error+on+x64-windows&body=Copy%20issue%20body%20from%20F%3A%2Fworkspace%2Fcode%2Fgithub%2Fbitcoin-29.0%2Fbuild%2Fvcpkg_installed%2Fvcpkg%2Fissue_body.md

    – Running vcpkg install - failed CMake Error at D:/Program Files/Microsoft Visual Studio/2022/Community/VC/vcpkg/scripts/buildsystems/vcpkg.cmake:938 (message): vcpkg install failed. See logs for more information: F:\workspace\code\github\bitcoin-29.0\build\vcpkg-manifest-install.log Call Stack (most recent call first): C:/Program Files/CMake/share/cmake-3.31/Modules/CMakeDetermineSystem.cmake:146 (include) CMakeLists.txt:49 (project)

    – Configuring incomplete, errors occurred!

  21. hebasto commented at 2:31 pm on June 2, 2025: member

    Download failed, halting portfile.

    could mean some network or upstream issues.

    If it is not intermittent, please report the issue upstream.

  22. John-zhan commented at 11:10 am on June 3, 2025: none

    Now the network problem over, and when continue execute cmake -B build --preset vs2022-static have this output:

    – Building x64-windows-dbg CMake Error at scripts/cmake/vcpkg_execute_build_process.cmake:134 (message): Command failed: C:/Users/win11/AppData/Local/vcpkg/downloads/tools/jom/jom-1_1_4/jom.exe /J 17 Working Directory: F:/workspace/code/github/bitcoin-29.0/build/vcpkg_installed/vcpkg/blds/qt5-base/x64-windows-dbg See logs for more information: F:\workspace\code\github\bitcoin-29.0\build\vcpkg_installed\vcpkg\blds\qt5-base\build-x64-windows-dbg-out.log F:\workspace\code\github\bitcoin-29.0\build\vcpkg_installed\vcpkg\blds\qt5-base\build-x64-windows-dbg-err.log

    Call Stack (most recent call first): C:/Users/win11/AppData/Local/vcpkg/registries/git-trees/99dfc2c88d6a863afc5eef00463166c50e5e12d2/cmake/install_qt.cmake:86 (vcpkg_execute_build_process) C:/Users/win11/AppData/Local/vcpkg/registries/git-trees/99dfc2c88d6a863afc5eef00463166c50e5e12d2/portfile.cmake:408 (install_qt) scripts/ports.cmake:203 (include)

    error: 生成 qt5-base:x64-windows 失败,结果为: BUILD_FAILED 有关详细信息,请参阅 https://learn.microsoft.com/vcpkg/troubleshoot/build-failures?WT.mc_id=vcpkg_inproduct_cli。 处理 qt5-base:x64-windows 所用时间: 5.7 min 请确保使用具有“git pull” 和 “vcpkg update”的最新端口文件。 然后,在以下位置查看已知问题: https://github.com/microsoft/vcpkg/issues?q=is%3Aissue+is%3Aopen+in%3Atitle+qt5-base 可在以下位置提交新问题: https://github.com/microsoft/vcpkg/issues/new?title=[qt5-base]+Build+error+on+x64-windows&body=Copy%20issue%20body%20from%20F%3A%2Fworkspace%2Fcode%2Fgithub%2Fbitcoin-29.0%2Fbuild%2Fvcpkg_installed%2Fvcpkg%2Fissue_body.md

    – Running vcpkg install - failed CMake Error at D:/Program Files/Microsoft Visual Studio/2022/Community/VC/vcpkg/scripts/buildsystems/vcpkg.cmake:938 (message): vcpkg install failed. See logs for more information: F:\workspace\code\github\bitcoin-29.0\build\vcpkg-manifest-install.log Call Stack (most recent call first): C:/Program Files/CMake/share/cmake-3.31/Modules/CMakeDetermineSystem.cmake:146 (include) CMakeLists.txt:49 (project)

    – Configuring incomplete, errors occurred!

    And F:\workspace\code\github\bitcoin-29.0\build\vcpkg_installed\vcpkg\blds\qt5-base\build-x64-windows-dbg-err.log file say errors:

    cl: 命令行 warning D9025 :正在重写“/Zi”(用“/Z7”) jom: F:\workspace\code\github\bitcoin-29.0\build\vcpkg_installed\vcpkg\blds\qt5-base\x64-windows-dbg\src\platformsupport\fontdatabases\Makefile.Debug [.obj\debug\qwindowsfontdatabase.obj] Error 2 jom: F:\workspace\code\github\bitcoin-29.0\build\vcpkg_installed\vcpkg\blds\qt5-base\x64-windows-dbg\src\platformsupport\fontdatabases\Makefile.Debug [.obj\debug\qwindowsfontdatabase_ft.obj] Error 2 jom: F:\workspace\code\github\bitcoin-29.0\build\vcpkg_installed\vcpkg\blds\qt5-base\x64-windows-dbg\src\platformsupport\fontdatabases\Makefile [debug] Error 2 jom: F:\workspace\code\github\bitcoin-29.0\build\vcpkg_installed\vcpkg\blds\qt5-base\x64-windows-dbg\src\platformsupport\Makefile [sub-fontdatabases-make_first] Error 2 jom: F:\workspace\code\github\bitcoin-29.0\build\vcpkg_installed\vcpkg\blds\qt5-base\x64-windows-dbg\src\Makefile [sub-platformsupport-make_first] Error 2 WARNING: Failure to find: F:/workspace/code/github/bitcoin-29.0/build/vcpkg_installed/vcpkg/blds/qt5-base/x64-windows-dbg/src/widgets/qt5widgets_metatypes.json cl: 命令行 warning D9025 :正在重写“/Zi”(用“/Z7”) . . . cl: 命令行 warning D9025 :正在重写“/Zi”(用“/Z7”) jom: F:\workspace\code\github\bitcoin-29.0\build\vcpkg_installed\vcpkg\blds\qt5-base\x64-windows-dbg\Makefile [sub-src-make_first] Error 2

  23. hebasto commented at 11:18 am on June 3, 2025: member

    You could:

    1. Check the free disk space on your machine.

    2. Check whether the issue is resolved as described in https://github.com/bitcoin/bitcoin/blob/master/doc/build-windows-msvc.md#4-building-with-static-linking-with-gui

    As a last resort, please report the issue upstream.

  24. John-zhan commented at 1:53 pm on June 5, 2025: none
    I have do as https://github.com/microsoft/vcpkg/issues/45814 and now cmake successfully config, and build bitcoin success.
  25. John-zhan closed this on Jun 5, 2025


github-metadata-mirror

This is a metadata mirror of the GitHub repository bitcoin/bitcoin. This site is not affiliated with GitHub. Content is generated from a GitHub metadata backup.
generated: 2025-06-17 12:13 UTC

This site is hosted by @0xB10C
More mirrored repositories can be found on mirror.b10c.me