microsoft / vcpkg

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

[Boost, opencv] build failure #23583

Closed laper32 closed 2 years ago

laper32 commented 2 years ago

Host Environment

To Reproduce vcpkg install boost:x64-windows

Failure logs

PS D:\toolkit\vcpkg> vcpkg install boost:x64-windows
Computing installation plan...
The following packages will be built and installed:
    boost[core]:x64-windows -> 1.78.0
  * boost-accumulators[core]:x64-windows -> 1.78.0
  * boost-algorithm[core]:x64-windows -> 1.78.0
  * boost-align[core]:x64-windows -> 1.78.0
  * boost-any[core]:x64-windows -> 1.78.0
  * boost-array[core]:x64-windows -> 1.78.0
  * boost-asio[core]:x64-windows -> 1.78.0
  * boost-assert[core]:x64-windows -> 1.78.0
  * boost-assign[core]:x64-windows -> 1.78.0
  * boost-atomic[core]:x64-windows -> 1.78.0
  * boost-beast[core]:x64-windows -> 1.78.0
  * boost-bimap[core]:x64-windows -> 1.78.0
  * boost-bind[core]:x64-windows -> 1.78.0
  * boost-build[core]:x64-windows -> 1.78.0#1
  * boost-callable-traits[core]:x64-windows -> 1.78.0
  * boost-chrono[core]:x64-windows -> 1.78.0
  * boost-circular-buffer[core]:x64-windows -> 1.78.0
  * boost-compatibility[core]:x64-windows -> 1.78.0
  * boost-compute[core]:x64-windows -> 1.78.0
  * boost-concept-check[core]:x64-windows -> 1.78.0
  * boost-config[core]:x64-windows -> 1.78.0
  * boost-container[core]:x64-windows -> 1.78.0
  * boost-container-hash[core]:x64-windows -> 1.78.0
  * boost-context[core]:x64-windows -> 1.78.0
  * boost-contract[core]:x64-windows -> 1.78.0
  * boost-conversion[core]:x64-windows -> 1.78.0
  * boost-convert[core]:x64-windows -> 1.78.0
  * boost-core[core]:x64-windows -> 1.78.0
  * boost-coroutine[core]:x64-windows -> 1.78.0
  * boost-coroutine2[core]:x64-windows -> 1.78.0
  * boost-crc[core]:x64-windows -> 1.78.0
  * boost-date-time[core]:x64-windows -> 1.78.0
  * boost-describe[core]:x64-windows -> 1.78.0
  * boost-detail[core]:x64-windows -> 1.78.0
  * boost-dll[core]:x64-windows -> 1.78.0
  * boost-dynamic-bitset[core]:x64-windows -> 1.78.0
  * boost-endian[core]:x64-windows -> 1.78.0
  * boost-exception[core]:x64-windows -> 1.78.0
  * boost-fiber[core]:x64-windows -> 1.78.0
  * boost-filesystem[core]:x64-windows -> 1.78.0
  * boost-flyweight[core]:x64-windows -> 1.78.0
  * boost-foreach[core]:x64-windows -> 1.78.0
  * boost-format[core]:x64-windows -> 1.78.0
  * boost-function[core]:x64-windows -> 1.78.0
  * boost-function-types[core]:x64-windows -> 1.78.0
  * boost-functional[core]:x64-windows -> 1.78.0
  * boost-fusion[core]:x64-windows -> 1.78.0
  * boost-geometry[core]:x64-windows -> 1.78.0
  * boost-gil[core]:x64-windows -> 1.78.0
  * boost-graph[core]:x64-windows -> 1.78.0
  * boost-hana[core]:x64-windows -> 1.78.0
  * boost-heap[core]:x64-windows -> 1.78.0
  * boost-histogram[core]:x64-windows -> 1.78.0
  * boost-hof[core]:x64-windows -> 1.78.0
  * boost-icl[core]:x64-windows -> 1.78.0
  * boost-integer[core]:x64-windows -> 1.78.0
  * boost-interprocess[core]:x64-windows -> 1.78.0
  * boost-interval[core]:x64-windows -> 1.78.0
  * boost-intrusive[core]:x64-windows -> 1.78.0
  * boost-io[core]:x64-windows -> 1.78.0
  * boost-iostreams[bzip2,core,lzma,zlib,zstd]:x64-windows -> 1.78.0#2
  * boost-iterator[core]:x64-windows -> 1.78.0
  * boost-json[core]:x64-windows -> 1.78.0
  * boost-lambda[core]:x64-windows -> 1.78.0
  * boost-lambda2[core]:x64-windows -> 1.78.0
  * boost-leaf[core]:x64-windows -> 1.78.0
  * boost-lexical-cast[core]:x64-windows -> 1.78.0
  * boost-local-function[core]:x64-windows -> 1.78.0
  * boost-locale[core]:x64-windows -> 1.78.0
  * boost-lockfree[core]:x64-windows -> 1.78.0
  * boost-log[core]:x64-windows -> 1.78.0
  * boost-logic[core]:x64-windows -> 1.78.0
  * boost-math[core]:x64-windows -> 1.78.0
  * boost-metaparse[core]:x64-windows -> 1.78.0
  * boost-move[core]:x64-windows -> 1.78.0
  * boost-mp11[core]:x64-windows -> 1.78.0
  * boost-mpl[core]:x64-windows -> 1.78.0
  * boost-msm[core]:x64-windows -> 1.78.0
  * boost-multi-array[core]:x64-windows -> 1.78.0
  * boost-multi-index[core]:x64-windows -> 1.78.0
  * boost-multiprecision[core]:x64-windows -> 1.78.0
  * boost-nowide[core]:x64-windows -> 1.78.0
  * boost-numeric-conversion[core]:x64-windows -> 1.78.0
  * boost-odeint[core]:x64-windows -> 1.78.0
  * boost-optional[core]:x64-windows -> 1.78.0
  * boost-outcome[core]:x64-windows -> 1.78.0
  * boost-parameter[core]:x64-windows -> 1.78.0
  * boost-parameter-python[core]:x64-windows -> 1.78.0
  * boost-pfr[core]:x64-windows -> 1.78.0
  * boost-phoenix[core]:x64-windows -> 1.78.0
  * boost-poly-collection[core]:x64-windows -> 1.78.0
  * boost-polygon[core]:x64-windows -> 1.78.0
  * boost-pool[core]:x64-windows -> 1.78.0
  * boost-predef[core]:x64-windows -> 1.78.0
  * boost-preprocessor[core]:x64-windows -> 1.78.0
  * boost-process[core]:x64-windows -> 1.78.0
  * boost-program-options[core]:x64-windows -> 1.78.0
  * boost-property-map[core]:x64-windows -> 1.78.0
  * boost-property-tree[core]:x64-windows -> 1.78.0
  * boost-proto[core]:x64-windows -> 1.78.0
  * boost-ptr-container[core]:x64-windows -> 1.78.0
  * boost-python[core,python3]:x64-windows -> 1.78.0
  * boost-qvm[core]:x64-windows -> 1.78.0
  * boost-random[core]:x64-windows -> 1.78.0
  * boost-range[core]:x64-windows -> 1.78.0
  * boost-ratio[core]:x64-windows -> 1.78.0
  * boost-rational[core]:x64-windows -> 1.78.0
  * boost-regex[core]:x64-windows -> 1.78.0
  * boost-safe-numerics[core]:x64-windows -> 1.78.0
  * boost-scope-exit[core]:x64-windows -> 1.78.0
  * boost-serialization[core]:x64-windows -> 1.78.0
  * boost-signals2[core]:x64-windows -> 1.78.0
  * boost-smart-ptr[core]:x64-windows -> 1.78.0
  * boost-sort[core]:x64-windows -> 1.78.0
  * boost-spirit[core]:x64-windows -> 1.78.0
  * boost-stacktrace[core]:x64-windows -> 1.78.0
  * boost-statechart[core]:x64-windows -> 1.78.0
  * boost-static-assert[core]:x64-windows -> 1.78.0
  * boost-static-string[core]:x64-windows -> 1.78.0
  * boost-stl-interfaces[core]:x64-windows -> 1.78.0
  * boost-system[core]:x64-windows -> 1.78.0
  * boost-test[core]:x64-windows -> 1.78.0
  * boost-thread[core]:x64-windows -> 1.78.0
  * boost-throw-exception[core]:x64-windows -> 1.78.0
  * boost-timer[core]:x64-windows -> 1.78.0
  * boost-tokenizer[core]:x64-windows -> 1.78.0
  * boost-tti[core]:x64-windows -> 1.78.0
  * boost-tuple[core]:x64-windows -> 1.78.0
  * boost-type-erasure[core]:x64-windows -> 1.78.0
  * boost-type-index[core]:x64-windows -> 1.78.0
  * boost-type-traits[core]:x64-windows -> 1.78.0
  * boost-typeof[core]:x64-windows -> 1.78.0
  * boost-ublas[core]:x64-windows -> 1.78.0
  * boost-units[core]:x64-windows -> 1.78.0
  * boost-unordered[core]:x64-windows -> 1.78.0
  * boost-utility[core]:x64-windows -> 1.78.0
  * boost-uuid[core]:x64-windows -> 1.78.0
  * boost-variant[core]:x64-windows -> 1.78.0
  * boost-variant2[core]:x64-windows -> 1.78.0
  * boost-vmd[core]:x64-windows -> 1.78.0
  * boost-wave[core]:x64-windows -> 1.78.0
  * boost-winapi[core]:x64-windows -> 1.78.0
  * boost-xpressive[core]:x64-windows -> 1.78.0
  * boost-yap[core]:x64-windows -> 1.78.0
  * python3[core]:x64-windows -> 3.10.2#1
  * zstd[core]:x64-windows -> 1.5.2#1
Additional packages (*) will be modified to complete this operation.
Detecting compiler hash for triplet x64-windows...
Restored 0 packages from C:\Users\user\AppData\Local\vcpkg\archives in 2.747 ms. Use --debug to see more details.
Starting package 1/146: boost-config:x64-windows
Building package boost-config[core]:x64-windows...
-- Downloading https://github.com/boostorg/config/archive/boost-1.78.0.tar.gz -> boostorg-config-boost-1.78.0.tar.gz...
[DEBUG] Feature flag 'binarycaching' unset
[DEBUG] Feature flag 'manifests' = off
[DEBUG] Feature flag 'compilertracking' unset
[DEBUG] Feature flag 'registries' unset
[DEBUG] Feature flag 'versions' unset
[DEBUG] Downloading https://github.com/boostorg/config/archive/boost-1.78.0.tar.gz
Error: Failed to download from mirror set:
https://github.com/boostorg/config/archive/boost-1.78.0.tar.gz: failed: status code 404

[DEBUG] D:\a\_work\1\s\src\vcpkg\base\downloads.cpp(709):
[DEBUG] Time in subprocesses: 0 us
[DEBUG] Time in parsing JSON: 2 us
[DEBUG] Time in JSON reader: 0 us
[DEBUG] Time in filesystem: 800 us
[DEBUG] Time in loading ports: 0 us
[DEBUG] Exiting after 848 ms (842126 us)

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

      Failed to download file with error: 1
      If you use 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. You are using Fiddler. Currently a bug (https://github.com/microsoft/vcpkg/issues/17752)
         will set HTTPS_PROXY to `https://fiddler_address:port` which lead to problem 1 above.
         Workaround is open Windows 10 Settings App, and search for Proxy Configuration page,
         Change `http=address:port;https=address:port` to `address`, and fill the port number.

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

      In future vcpkg releases, if you are using Windows, you no longer need to set
      HTTP(S)_PROXY environment variables. Vcpkg will simply apply Windows IE Proxy
      Settings set by your proxy software. See (https://github.com/microsoft/vcpkg-tool/pull/49)
      and (https://github.com/microsoft/vcpkg-tool/pull/77)

      Otherwise, please submit an issue at https://github.com/Microsoft/vcpkg/issues

Call Stack (most recent call first):
  scripts/cmake/vcpkg_download_distfile.cmake:309 (z_vcpkg_download_distfile_show_proxy_and_fail)
  scripts/cmake/vcpkg_from_github.cmake:175 (vcpkg_download_distfile)
  ports/boost-config/portfile.cmake:3 (vcpkg_from_github)
  scripts/ports.cmake:145 (include)

Error: Building package boost-config:x64-windows failed with: BUILD_FAILED
Please ensure you're using the latest portfiles 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+boost-config
You can submit a new issue at:
  https://github.com/microsoft/vcpkg/issues/new?template=report-package-build-failure.md&title=[boost-config]+Build+error
including:
  package: boost-config[core]:x64-windows -> 1.78.0
    vcpkg-tool version: 2022-03-09-1affd32f93b299d5a907816c328ca3ededb73a7e
    vcpkg-scripts version: 5220969a9 2022-03-15 (8 hours ago)

Additionally, attach any relevant sections from the log files above.
laper32 commented 2 years ago

Similarly, for opencv

PS D:\toolkit\vcpkg> vcpkg install opencv4:x64-windows
Computing installation plan...
The following packages will be built and installed:
  * libjpeg-turbo[core]:x64-windows -> 2.1.3#1
  * libpng[core]:x64-windows -> 1.6.37#16
  * libwebp[core,nearlossless,simd,unicode]:x64-windows -> 1.2.1
    opencv4[core,default-features,dnn,jpeg,png,quirc,tiff,webp]:x64-windows -> 4.5.5
  * protobuf[core]:x64-windows -> 3.19.4
  * quirc[core]:x64-windows -> 1.1#2
  * tiff[core,jpeg,lzma,zip]:x64-windows -> 4.3.0#6
Additional packages (*) will be modified to complete this operation.
Detecting compiler hash for triplet x64-windows...
Restored 0 packages from C:\Users\user\AppData\Local\vcpkg\archives in 296.7 us. Use --debug to see more details.
Starting package 1/7: libjpeg-turbo:x64-windows
Building package libjpeg-turbo[core]:x64-windows...
-- Downloading https://github.com/libjpeg-turbo/libjpeg-turbo/archive/c5f269eb9665435271c05fbcaf8721fa58e9eafa.tar.gz -> libjpeg-turbo-libjpeg-turbo-c5f269eb9665435271c05fbcaf8721fa58e9eafa.tar.gz...
[DEBUG] Feature flag 'binarycaching' unset
[DEBUG] Feature flag 'manifests' = off
[DEBUG] Feature flag 'compilertracking' unset
[DEBUG] Feature flag 'registries' unset
[DEBUG] Feature flag 'versions' unset
[DEBUG] Downloading https://github.com/libjpeg-turbo/libjpeg-turbo/archive/c5f269eb9665435271c05fbcaf8721fa58e9eafa.tar.gz
Error: Failed to download from mirror set:
https://github.com/libjpeg-turbo/libjpeg-turbo/archive/c5f269eb9665435271c05fbcaf8721fa58e9eafa.tar.gz: failed: status code 404

[DEBUG] D:\a\_work\1\s\src\vcpkg\base\downloads.cpp(709):
[DEBUG] Time in subprocesses: 0 us
[DEBUG] Time in parsing JSON: 3 us
[DEBUG] Time in JSON reader: 0 us
[DEBUG] Time in filesystem: 820 us
[DEBUG] Time in loading ports: 0 us
[DEBUG] Exiting after 564.4 ms (558202 us)

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

      Failed to download file with error: 1
      If you use 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. You are using Fiddler. Currently a bug (https://github.com/microsoft/vcpkg/issues/17752)
         will set HTTPS_PROXY to `https://fiddler_address:port` which lead to problem 1 above.
         Workaround is open Windows 10 Settings App, and search for Proxy Configuration page,
         Change `http=address:port;https=address:port` to `address`, and fill the port number.

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

      In future vcpkg releases, if you are using Windows, you no longer need to set
      HTTP(S)_PROXY environment variables. Vcpkg will simply apply Windows IE Proxy
      Settings set by your proxy software. See (https://github.com/microsoft/vcpkg-tool/pull/49)
      and (https://github.com/microsoft/vcpkg-tool/pull/77)

      Otherwise, please submit an issue at https://github.com/Microsoft/vcpkg/issues

Call Stack (most recent call first):
  scripts/cmake/vcpkg_download_distfile.cmake:309 (z_vcpkg_download_distfile_show_proxy_and_fail)
  scripts/cmake/vcpkg_from_github.cmake:175 (vcpkg_download_distfile)
  ports/libjpeg-turbo/portfile.cmake:5 (vcpkg_from_github)
  scripts/ports.cmake:145 (include)

Error: Building package libjpeg-turbo:x64-windows failed with: BUILD_FAILED
Please ensure you're using the latest portfiles 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+libjpeg-turbo
You can submit a new issue at:
  https://github.com/microsoft/vcpkg/issues/new?template=report-package-build-failure.md&title=[libjpeg-turbo]+Build+error
including:
  package: libjpeg-turbo[core]:x64-windows -> 2.1.3#1
    vcpkg-tool version: 2022-03-09-1affd32f93b299d5a907816c328ca3ededb73a7e
    vcpkg-scripts version: 5220969a9 2022-03-15 (8 hours ago)

Additionally, attach any relevant sections from the log files above.
Cheney-W commented 2 years ago

I can't reproduce this issue, could you successfully access the following two mirrors directly?

https://github.com/boostorg/config/archive/boost-1.78.0.tar.gz
https://github.com/libjpeg-turbo/libjpeg-turbo/archive/c5f269eb9665435271c05fbcaf8721fa58e9eafa.tar.gz
laper32 commented 2 years ago

image image

Cheney-W commented 2 years ago

That's weird, I can access both mirrors and download them. Do you have antivirus software turned on?

Cheney-W commented 2 years ago

libjpeg-turbo-c5f269eb9665435271c05fbcaf8721fa58e9eafa.tar.gz config-boost-1.78.0.tar.gz

laper32 commented 2 years ago

That's weird, I can access both mirrors and download them. Do you have antivirus software turned on?

No, default windows defender only, windows 11.

image

libjpeg-turbo-c5f269eb9665435271c05fbcaf8721fa58e9eafa.tar.gz config-boost-1.78.0.tar.gz

Now both of them are can be downloaded directly, works correctly.

Cheney-W commented 2 years ago

Does the vcpkg install command also work properly now?

laper32 commented 2 years ago

Does the vcpkg install command also work properly now?

Currently still not :( The download url is still status 404.

Cheney-W commented 2 years ago

This may be a local network issue that I don't know how to fix.

laper32 commented 2 years ago

By referencing this post then fixed. Teleporter

Looks like this is network issue indeed.

UPDATE: Despite using proxy could temporary fix this issue, but it's better to fix it without any proxy.

JackBoosY commented 2 years ago

Please report the Chinese mirror issue to gitee instead.

Thanks.