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

[bzip2] Build error #35836

Closed
nmoyerAP opened this issue Dec 22, 2023 · 3 comments
Closed

[bzip2] Build error #35836

nmoyerAP opened this issue Dec 22, 2023 · 3 comments
Assignees
Labels
category:question This issue is a question

Comments

@nmoyerAP
Copy link

Issue:

I have a submodule from the commit mentioned below. I want to run pcl[libusb,opengl,pcap,qt,visualization,vtk]:x64-windows in that submodule because If I pull the latest vcpkg it downloads QT6 components instead of QT5 which doesn't seem compatible with my project. Most PCL dependencies install correctly, however it seems that bzip2 cant be installed because the link to the download has moved. I have turned off my Antivirus and checked the link, and it does return a 404. My understanding is that I need this submodule to work in order to build this environment on more computers, any help is greatly appreciated!

Machine Setup:

Windows 10 Pro - Installed a custom ISO that I've used before with no issues and then updated and installed the following
Git SCM
CMAKE: 3.27.1
Visual Studio: 2022 - with windows 10 SDK's installed and cpp packages [.NET desktop development, Universal Windows Platform development, Desktop development with c++]

Package I'm building

bzip2:x64-windows - I am building this from a submodule from the commit below
Commit 203f5f3

Error Logs

vcpkg install bzip2:x64-windows
Computing installation plan...
The following packages will be built and installed:
    bzip2[core]:x64-windows -> 1.0.8#2
Detecting compiler hash for triplet x64-windows...
Restored 0 packages from C:\Users\<redacted>\AppData\Local\vcpkg\archives in 283.5 us. Use --debug to see more details.
Installing 1/1 bzip2:x64-windows...
Building bzip2[core]:x64-windows...
-- Using cached bzip2-1.0.8.tar.gz.
-- Cleaning sources at C:/Git/<redacted>/vcpkg/buildtrees/bzip2/src/bzip2-1-336d4794a3.clean. Use --editable to skip cleaning for the packages you specify.
-- Extracting source C:/Git/<redacted>/vcpkg/downloads/bzip2-1.0.8.tar.gz
-- Applying patch fix-import-export-macros.patch
-- Using source at C:/Git/<redacted>/vcpkg/buildtrees/bzip2/src/bzip2-1-336d4794a3.clean
-- Found external ninja('1.11.0').
-- Configuring x64-windows
-- Building x64-windows-dbg
-- Building x64-windows-rel
-- Fixing pkgconfig
-- Acquiring MSYS2...
-- Downloading https://sourceforge.net/projects/msys2/files/Base/x86_64/msys2-base-x86_64-20190524.tar.xz/download;http://repo.msys2.org/distrib/x86_64/msys2-base-x86_64-20190524.tar.xz -> msys2-base-x86_64-20190524.tar.xz...
[DEBUG] To include the environment variables in debug output, pass --debug-env
[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://sourceforge.net/projects/msys2/files/Base/x86_64/msys2-base-x86_64-20190524.tar.xz/download
[DEBUG] Downloading http://repo.msys2.org/distrib/x86_64/msys2-base-x86_64-20190524.tar.xz
Error: Failed to download from mirror set:
https://sourceforge.net/projects/msys2/files/Base/x86_64/msys2-base-x86_64-20190524.tar.xz/download: failed: status code 404
http://repo.msys2.org/distrib/x86_64/msys2-base-x86_64-20190524.tar.xz: failed: status code 404

[DEBUG] D:\a\_work\1\s\src\vcpkg\base\downloads.cpp(751):
[DEBUG] Time in subprocesses: 0 us
[DEBUG] Time in parsing JSON: 2 us
[DEBUG] Time in JSON reader: 0 us
[DEBUG] Time in filesystem: 4122 us
[DEBUG] Time in loading ports: 0 us
[DEBUG] Exiting after 1.451 s (1417037 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_acquire_msys.cmake:78 (vcpkg_download_distfile)
  scripts/cmake/vcpkg_fixup_pkgconfig.cmake:280 (vcpkg_acquire_msys)
  ports/bzip2/portfile.cmake:47 (vcpkg_fixup_pkgconfig)
  scripts/ports.cmake:146 (include)


error: building bzip2:x64-windows 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+bzip2
You can submit a new issue at:
    https://github.com/microsoft/vcpkg/issues/new?template=report-package-build-failure.md&title=[bzip2]+Build+error
Include '[bzip2] 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: 2022-05-05-67e17c1782801cf481be9ac0b3765dff3e4bdeb8
    vcpkg-scripts version: 203f5f3be 2022-06-06 (1 year, 7 months ago)
@jimwang118 jimwang118 added the category:question This issue is a question label Dec 25, 2023
@jimwang118
Copy link
Contributor

The download failed because the old msys was deleted, and you need to replace the address of the new version of msys with it.
You can refer to this PR 30546.

@dg0yt
Copy link
Contributor

dg0yt commented Dec 25, 2023

The bug is fixes in vcpkg since a while, but you don't receive it if you don't update your submodule.

Consider using manifest mode. It lets you combine the latest scripts with port version control.

@nmoyerAP
Copy link
Author

nmoyerAP commented Jan 2, 2024

Thanks everyone for the information !

I will move towards using manifest mode as suggested. Thanks !

@nmoyerAP nmoyerAP closed this as completed Jan 2, 2024
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

3 participants