microsoft / vcpkg

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

[<boost-build:x64-windows>] build failure #26138

Closed whitechopchicken closed 2 years ago

whitechopchicken commented 2 years ago

Host Environment

C:\Users\YY>vcpkg install cgal

Failure logs Computing installation plan... The following packages will be built and installed:

[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: 1612 us [DEBUG] Time in loading ports: 0 us [DEBUG] Exiting after 7.038 s (7030367 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) ports/boost-build/portfile.cmake:26 (vcpkg_download_distfile) scripts/ports.cmake:145 (include)

Error: Building package boost-build: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-build You can submit a new issue at: https://github.com/microsoft/vcpkg/issues/new?template=report-package-build-failure.md&title=[boost-build]+Build+error including: package: boost-build[core]:x64-windows -> 1.78.0#1 vcpkg-tool version: 2022-03-09-1affd32f93b299d5a907816c328ca3ededb73a7e vcpkg-scripts version: 9ff4659a0 2022-03-25 (4 months ago)

Additionally, attach any relevant sections from the log files above.

Additional context Add any other context about the problem here, such as what you have already tried to resolve the issue.

I have checked my VS2017 and VS2022 to make sure I downloaded the correct Windows SDK I disabled the firewall. It still failed I had a similar problem before " boost-vcpkg-helpers:x64-windows failed with :BUILD_FAILED" I have been troubled by these problems for a long time. I hope you can help me. I will be very grateful
orz

whitechopchicken commented 2 years ago

I looked at the solution to problem #23685, which I think is very similar to mine, but I only found vcpkg \ports\boost-build\profile.cmake, not boost-build: x64-Windows\profile.cmake At the same time, I don't know how to replace the hash value

Adela0814 commented 2 years ago

I looked at the solution to problem #23685, which I think is very similar to mine, but I only found vcpkg \ports\boost-build\profile.cmake, not boost-build: x64-Windows\profile.cmake At the same time, I don't know how to replace the hash value

Your problem is not the wrong hash. Please move this file to VCPKG_ROOT/downloads then try again. The common workaround is you need to use proxy.

whitechopchicken commented 2 years ago
  • Failed to download from mirror set Your problem is not the wrong hash. Please move this file to VCPKG_ROOT/downloads then try again. The common workaround is you need to use proxy.

I tried downloading this file to VCPKG \ Downloads and then re-vcpkg install cgal But it's still the same mistake

JackBoosY commented 2 years ago

For Chinese user: my private (not official) mirror: https://gitee.com/jackboosy/vcpkg/issues/I44496

whitechopchicken commented 2 years ago

For Chinese user: my private (not official) mirror: https://gitee.com/jackboosy/vcpkg/issues/I44496

感谢您的回复,我按照您给的网站的提示,添加了系统环境变量和值并保存下来了,然后重新运行了 bootstrap-vcpkg.sh 和 bootstrap-vcpkg.bat 这两个脚本,然后重新执行 vcpkg install cgal 这个命令,但是任然显示同样的错误 。 您的意思是我 build error 的原因是无法下载到需要的文件吗,所以需要从镜像网站下载? 或者使用VPN代理下载? Thank you for your reply. I added system environment variables and values and saved them according to the instructions you gave to the website. Then I re-ran the two scripts bootstrap-vcpkg.sh and bootstrap-vcpkg.bat. The VCPKG install cgal command is then re-executed, but the same error is displayed.

Do you mean that the reason for my build error is that I cannot download the required file, so I need to download it from the mirror website? Or use a VPN proxy to download?

JackBoosY commented 2 years ago

@whitechopchicken Please provide the output with extra option --debug?

whitechopchicken commented 2 years ago

@whitechopchicken Please provide the output with extra option --debug?

非常感谢!我重启电脑后再 执行"vcpkg install cgal" 成功了!我想应该是网络问题导致没有下载下来相关文件。再次感谢您的帮助 Thank you very much! I restart the computer and then execute "VCPKG install cgal" successfully! I think it is the network problem that has not downloaded the relevant files. Thank you again for your help