Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[gmp] Build error: Failed to download from mirror set #30530

Closed
silentstranger5 opened this issue Mar 29, 2023 · 14 comments
Closed

[gmp] Build error: Failed to download from mirror set #30530

silentstranger5 opened this issue Mar 29, 2023 · 14 comments
Assignees
Labels
category:question This issue is a question

Comments

@silentstranger5
Copy link

silentstranger5 commented Mar 29, 2023

Host Environment

OS: Windows

Steps to reproduce the behavior:

./vcpkg install gmp

Failure logs:

error: Failed to download from mirror set
error: https://repo.msys2.org/msys/x86_64/msys2-runtime-3.2.0-8-x86_64.pkg.tar.zst: failed: status code 404
error: https://www2.futureware.at/~nickoe/msys2-mirror/msys/x86_64/msys2-runtime-3.2.0-8-x86_64.pkg.tar.zst: failed: status code 404
error: https://mirror.yandex.ru/mirrors/msys2/msys/x86_64/msys2-runtime-3.2.0-8-x86_64.pkg.tar.zst: failed: status code 404
error: https://mirrors.tuna.tsinghua.edu.cn/msys2/msys/x86_64/msys2-runtime-3.2.0-8-x86_64.pkg.tar.zst: failed: status code 404
error: https://mirrors.ustc.edu.cn/msys2/msys/x86_64/msys2-runtime-3.2.0-8-x86_64.pkg.tar.zst: failed: status code 404
error: https://mirror.bit.edu.cn/msys2/msys/x86_64/msys2-runtime-3.2.0-8-x86_64.pkg.tar.zst: WinHttpSendRequest failed with exit code 12007
error: https://mirror.bit.edu.cn/msys2/msys/x86_64/msys2-runtime-3.2.0-8-x86_64.pkg.tar.zst: WinHttpSendRequest failed with exit code 12007
error: https://mirror.bit.edu.cn/msys2/msys/x86_64/msys2-runtime-3.2.0-8-x86_64.pkg.tar.zst: WinHttpSendRequest failed with exit code 12007
error: https://mirror.bit.edu.cn/msys2/msys/x86_64/msys2-runtime-3.2.0-8-x86_64.pkg.tar.zst: WinHttpSendRequest failed with exit code 12007
error: https://mirror.selfnet.de/msys2/msys/x86_64/msys2-runtime-3.2.0-8-x86_64.pkg.tar.zst: failed: status code 404
error: https://mirrors.sjtug.sjtu.edu.cn/msys2/msys/x86_64/msys2-runtime-3.2.0-8-x86_64.pkg.tar.zst: failed: status code 404
[DEBUG] D:\a\_work\1\s\src\vcpkg\base\downloads.cpp(960):
[DEBUG] Time in subprocesses: 0us
[DEBUG] Time in parsing JSON: 5us
[DEBUG] Time in JSON reader: 0us
[DEBUG] Time in filesystem: 13983us
[DEBUG] Time in loading ports: 0us
[DEBUG] Exiting after 13.7187489 s (13680878us)

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.

2. 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.

3. 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:345 (z_vcpkg_acquire_msys_declare_package)
scripts/cmake/vcpkg_configure_make.cmake:224 (vcpkg_acquire_msys)
ports/gmp/portfile.cmake:85 (vcpkg_configure_make)
scripts/ports.cmake:147 (include)

error: building gmp:x64-windows failed with: BUILD_FAILED
error: 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+gmp
You can submit a new issue at:
https://github.com/microsoft/vcpkg/issues/new?template=report-package-build-failure.md&title=[gmp]+Build+error
Include '[gmp] Build error' in your bug report title, the following version information in your bug description, and attach any relevant failure logs from above.
vcpkg-tool version: 2023-03-14-105f7f7e8a5ea10dfac9874ff9d1a6bacba5f454
vcpkg-scripts version: 23f0707b1 2023-03-29 (2 hours ago)

Additional context:

It seems like gmp is using msys2-runtime-3.2.0-8-x86_64, which is no longer available.

URL for package download (https://mirror.bit.edu.cn/msys2/msys/x86_64/msys2-runtime-3.2.0-8-x86_64.pkg.tar.zst) is not available with WinHttpSendRequest exit code 12007

@silentstranger5 silentstranger5 added the category:port-bug The issue is with a library, which is something the port should already support label Mar 29, 2023
@jimwang118 jimwang118 added category:question This issue is a question and removed category:port-bug The issue is with a library, which is something the port should already support labels Mar 30, 2023
@jimwang118
Copy link
Contributor

Can your network access https://repo.msys2.org/msys/x86_64/? Please make sure the network is normal.

@silentstranger5
Copy link
Author

silentstranger5 commented Mar 30, 2023

I can access https://repo.msys2.org/msys/x86_64/ but cannot access https://repo.msys2.org/msys/x86_64/msys2-runtime-3.2.0-8-x86_64.pkg.tar.zst, this page returns a 404 error, which, as far as I know, means that such a page does not exist as such. This is too old version of the package, it needs to be replaced with a new one.

@jimwang118
Copy link
Contributor

jimwang118 commented Mar 30, 2023

This address can be accessed normally. (https://mirror.bit.edu.cn/msys2/msys/x86_64/msys2-runtime-3.2.0-8-x86_64.pkg.tar.zst) The download of msys2-runtime-3.2.0-8-x86_64.pkg.tar.zst is tried in multiple urls, as long as there is one that can be downloaded, there is no problem.
image

@silentstranger5
Copy link
Author

Okay, I got it, thanks. It looks like the only available url to download this package is not available with WinHttpSendRequest exit code 12007. This is indeed a network issue. Last question. Can I get a solution to this problem?

@jimwang118
Copy link
Contributor

You can set up a proxy or go through a VPN to access that url. This is not a vcpkg problem, I will close this issue. If you have other questions about vcpkg, you can resubmit an issue.

@silentstranger5
Copy link
Author

silentstranger5 commented Mar 30, 2023

Okay, thanks for the help.

@jasonbeverage
Copy link
Contributor

We are running into this issue as well, it looks like msys2-runtime-3.2.0-8-x86_64.pkg.tar.zst is also no longer available in any of the mirrors so it can't be downloaded.

@silentstranger5 silentstranger5 changed the title [gmp] Build error: Failed to download from mirror set [gmp] vcpkg hang s Mar 30, 2023
@silentstranger5 silentstranger5 changed the title [gmp] vcpkg hang s [gmp] vcpkg hangs on when building x64-windows-dbg Mar 30, 2023
@silentstranger5 silentstranger5 changed the title [gmp] vcpkg hangs on when building x64-windows-dbg [gmp] Build error: Failed to download from mirror set Mar 30, 2023
@dg0yt
Copy link
Contributor

dg0yt commented Mar 30, 2023

You can set up a proxy or go through a VPN to access that url. This is not a vcpkg problem, I will close this issue. If you have other questions about vcpkg, you can resubmit an issue.

This is a vcpkg problem. The file will quickly disappear from all mirrors. The immediate fix is coming in #30546.
In the long term, I would like to catch this with #29067.

@brandon-kohn
Copy link

This is still happening from a clean install of vcpkg.

@dg0yt
Copy link
Contributor

dg0yt commented Mar 30, 2023

No fix merged yet, but you know now which change to cherry-pick. vcpkg Ci must rebuild a lot of ports for msys2 changes.

@dg0yt
Copy link
Contributor

dg0yt commented Mar 30, 2023

Is it fine that the configure and build of the package takes a really, I mean really long time (it takes about an hour and continues)

It is not normal, but such cases exist. This issue has gmp in its subject. For this particular port, you should install clang-cl from Visual Studio. Otherwise it will download and extract the official clang. I assume that this takes very long: Some people reported vcpkg would "hang" on downloading 7Z but nobody actually verified that it was slow extracting of llvm using the quickly downloaded 7Z...

@jimwang118
Copy link
Contributor

@konglingxue123
Copy link

Thanks for your reply! I download the recent vcpkg-master and fixed it! THX

@silentstranger5 silentstranger5 closed this as not planned Won't fix, can't repro, duplicate, stale Apr 28, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
category:question This issue is a question
Projects
None yet
Development

No branches or pull requests

6 participants