microsoft / vcpkg

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

[tiff] Build error on x64-windows #39549

Closed CreateDesktop closed 2 days ago

CreateDesktop commented 1 week ago

Copy issue body from D:/dev/vcpkg/installed/vcpkg/issue_body.md Package: tiff[core,jpeg,lzma,zip]:x64-windows@4.1.0#4

Host Environment

To Reproduce

vcpkg install tiff

Failure logs

-- Downloading https://gitlab.com/libtiff/libtiff/-/archive/v4.1.0/libtiff-v4.1.0.tar.gz -> libtiff-libtiff-v4.1.0.tar.gz...
[DEBUG] To include the environment variables in debug output, pass --debug-env
[DEBUG] Trying to load bundleconfig from D:\dev\vcpkg\vcpkg-bundle.json
[DEBUG] Failed to open: D:\dev\vcpkg\vcpkg-bundle.json
[DEBUG] Bundle config: readonly=false, usegitregistry=false, embeddedsha=nullopt, deployment=Git, vsversion=nullopt
[DEBUG] Metrics enabled.
[DEBUG] Feature flag 'binarycaching' unset
[DEBUG] Feature flag 'compilertracking' unset
[DEBUG] Feature flag 'registries' unset
[DEBUG] Feature flag 'versions' unset
[DEBUG] Feature flag 'dependencygraph' unset
Downloading https://gitlab.com/libtiff/libtiff/-/archive/v4.1.0/libtiff-v4.1.0.tar.gz
[DEBUG] Trying to hash D:\dev\vcpkg\downloads\libtiff-libtiff-v4.1.0.tar.gz.22036.part
[DEBUG] D:\dev\vcpkg\downloads\libtiff-libtiff-v4.1.0.tar.gz.22036.part has hash b8a278bc1b7c8ee73ceb2ac5c863c4beb52f765a99656e24aba093365ed3e6ac9c0fb4f635361690885d4372ec7978e2e410c05ec4ce29bbb83e0741aacbcad7
error: Failed to download from mirror set
error: File does not have the expected hash:
url: https://gitlab.com/libtiff/libtiff/-/archive/v4.1.0/libtiff-v4.1.0.tar.gz
File: D:\dev\vcpkg\downloads\libtiff-libtiff-v4.1.0.tar.gz.22036.part
Expected hash: ef2f1d424219d9e245069b7d23e78f5e817cf6ee516d46694915ab6c8909522166f84997513d20a702f4e52c3f18467813935b328fafa34bea5156dee00f66fa
Actual hash: b8a278bc1b7c8ee73ceb2ac5c863c4beb52f765a99656e24aba093365ed3e6ac9c0fb4f635361690885d4372ec7978e2e410c05ec4ce29bbb83e0741aacbcad7
[DEBUG] D:\a\_work\1\s\src\vcpkg\base\downloads.cpp(997): 
[DEBUG] Time in subprocesses: 0us
[DEBUG] Time in parsing JSON: 8us
[DEBUG] Time in JSON reader: 0us
[DEBUG] Time in filesystem: 2799us
[DEBUG] Time in loading ports: 0us
[DEBUG] Exiting after 3.4 s (3329599us)

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_from_gitlab.cmake:113 (vcpkg_download_distfile)
  ports/tiff/portfile.cmake:1 (vcpkg_from_gitlab)
  scripts/ports.cmake:191 (include)
### Tasks
CreateDesktop commented 1 week ago

image

jimwang118 commented 1 week ago

You can use the overlay port method to implement port coverage. The download failed because the upstream modified the hash value of the historical version. There is no problem if you compile directly with the latest version.

jimwang118 commented 2 days ago

Thanks for posting this issue. Please reopen this issue if this is still a problem for you.