microsoft / vcpkg

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

Not able to download from mirror set #34762

Closed eghanvat closed 10 months ago

eghanvat commented 10 months ago

Describe the bug Running vcpkg install. It fails as the mirror link is not working.

Environment

To Reproduce Steps to reproduce the behavior:

  1. I am trying to build pico torrent. (https://github.com/picotorrent/picotorrent#building-picotorrent)
  2. I am running the terminal in VS community 2022, version 17.7.6
  3. I am trying to run the last step of build. dotnet cake --platform=x64 --configuration=Release
  4. The build is failing.

Expected behavior I am expecting vcpkg to install automatically.

Failure logs

PS C:\Users\Sujeet\Desktop\pico\picotorrent> dotnet cake --platform=x64 --configuration=Release The assembly 'Cake.CMake, Version=1.3.1.0, Culture=neutral, PublicKeyToken=null' is referencing an older version of Cake.Core (1.0.0). For best compatibility it should target Cake.Core version 3.0.0.

======================================== Clean

======================================== Generate-Project

CMake Deprecation Warning at CMakeLists.txt:3 (cmake_policy): The OLD behavior for policy CMP0115 will be removed from a future version of CMake.

The cmake-policies(7) manual explains that the OLD behaviors of all policies are deprecated and that a policy should be set to OLD only under specific short-term circumstances. Projects should be ported to the NEW behavior and not rely on setting a policy to OLD.

-- Running vcpkg install Detecting compiler hash for triplet x64-windows... Detecting compiler hash for triplet x64-windows-static-md... The following packages will be built and installed:

CMake Error at scripts/cmake/vcpkg_download_distfile.cmake:32 (message):

  Failed to download file with error: 1
  If you are using a proxy, please check your proxy setting. Possible causes are:

  1. You are actually using an HTTP proxy, but setting HTTPS_PROXY variable
     to `https://address:port`. This is not correct, because `https://` prefix
     claims the proxy is an HTTPS proxy, while your proxy (v2ray, shadowsocksr
     , etc..) is an HTTP proxy. Try setting `http://address:port` to both
     HTTP_PROXY and HTTPS_PROXY instead.

  6. If you are using Windows, vcpkg will automatically use your Windows IE Proxy Settings
     set by your proxy software. See https://github.com/microsoft/vcpkg-tool/pull/77
     The value set by your proxy might be wrong, or have same `https://` prefix issue.

  7. Your proxy's remote server is out of service.

  If you've tried directly download the link, and believe this is not a temporary
  download server failure, please submit an issue at https://github.com/Microsoft/vcpkg/issues
  to report this upstream download server failure.

Call Stack (most recent call first): scripts/cmake/vcpkg_download_distfile.cmake:270 (z_vcpkg_download_distfile_show_proxy_and_fail) scripts/cmake/vcpkg_acquire_msys.cmake:26 (vcpkg_download_distfile) scripts/cmake/vcpkg_acquire_msys.cmake:67 (z_vcpkg_acquire_msys_download_package) scripts/cmake/vcpkg_acquire_msys.cmake:216 (z_vcpkg_acquire_msys_declare_package) scripts/cmake/vcpkg_configure_make.cmake:228 (vcpkg_acquire_msys) ports/libiconv/portfile.cmake:29 (vcpkg_configure_make) scripts/ports.cmake:147 (include)

error: building libiconv:x64-windows-static-md failed with: BUILD_FAILED Please ensure you're using the latest port files with git pull and vcpkg update. Then check for known issues at: https://github.com/microsoft/vcpkg/issues?q=is%3Aissue+is%3Aopen+in%3Atitle+libiconv You can submit a new issue at: https://github.com/microsoft/vcpkg/issues/new?title=[libiconv]+Build+error&body=Copy+issue+body+from+C%3A%2FUsers%2FSujeet%2FDesktop%2Fpico%2Fpicotorrent%2Fbuild-x64%2Fvcpkg_installed%2Fvcpkg%2Fissue_body.md

-- Running vcpkg install - failed CMake Error at vendor/vcpkg/scripts/buildsystems/vcpkg.cmake:892 (message): vcpkg install failed. See logs for more information: C:\Users\Sujeet\Desktop\pico\picotorrent\build-x64\vcpkg-manifest-install.log Call Stack (most recent call first): C:/Program Files/CMake/share/cmake-3.28/Modules/CMakeDetermineSystem.cmake:170 (include) CMakeLists.txt:9 (project)

CMake Error at CMakeLists.txt:9 (project): Generator

Visual Studio 17 2022

could not find any instance of Visual Studio.

-- Configuring incomplete, errors occurred! An error occurred when executing task 'Generate-Project'. Error: CMake: Process returned an error (exit code 1).

Additional context Add any other context about the problem here.

github-actions[bot] commented 10 months ago

Try updating your vcpkg version via git pull to resolve this issue. MSYS2 downloads are removed from the upstream servers from time to time, so using an up-to-date vcpkg version is necessary.

eghanvat commented 10 months ago

Thanks.

ChrisKolan commented 10 months ago

I have the same error and git pull does not solve the issue,

dg0yt commented 10 months ago

I have the same error and git pull does not solve the issue,

Make sure you are not using an old fork or tag.