microsoft / vcpkg

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

[openssl] Build error (1.1.1n) #35264

Closed GooDeeJAY closed 9 months ago

GooDeeJAY commented 9 months ago

I'm trying to install OpneSSL version 1.1.1n. I'm doing a git checkout to specific commit according to this github discussion

Seems to be working ok, until it tries to download something like mingw-w64-i686-libwinpthread from bunch of links, where all of them response with 404

Please help!


Package: openssl:x64-windows -> 1.1.1n

Host Environment

To Reproduce

vcpkg install openssl Failure logs

-- Downloading https://www.openssl.org/source/openssl-1.1.1n.tar.gz;https://www.openssl.org/source/old/1.1.1/openssl-1.1.1n.tar.gz -> openssl-1.1.1n.tar.gz...
-- Extracting source C:/dev/vcpkg/downloads/openssl-1.1.1n.tar.gz
-- Using source at C:/dev/vcpkg/buildtrees/openssl/src/openssl-1-8a70f997ec.clean
-- Copying openssl release source files...
-- Copying openssl release source files... done
-- Configure x64-windows-rel
-- Configure x64-windows-rel done
-- Build x64-windows-rel
-- Build x64-windows-rel done
-- Copying openssl debug source files...
-- Copying openssl debug source files... done
-- Configure x64-windows-dbg
-- Configure x64-windows-dbg done
-- Build x64-windows-dbg
-- Build x64-windows-dbg done
-- Installing: C:/dev/vcpkg/packages/openssl_x64-windows/share/openssl/copyright
-- Fixing pkgconfig file: C:/dev/vcpkg/packages/openssl_x64-windows/lib/pkgconfig/libcrypto.pc
-- Fixing pkgconfig file: C:/dev/vcpkg/packages/openssl_x64-windows/lib/pkgconfig/libssl.pc
-- Fixing pkgconfig file: C:/dev/vcpkg/packages/openssl_x64-windows/lib/pkgconfig/openssl.pc
-- Using cached msys-mingw-w64-i686-pkg-config-0.29.2-3-any.pkg.tar.zst.
-- Downloading https://repo.msys2.org/mingw/i686/mingw-w64-i686-libwinpthread-git-9.0.0.6373.5be8fcd83-1-any.pkg.tar.zst;https://www2.futureware.at/~nickoe/msys2-mirror/mingw/i686/mingw-w64-i686-libwinpthread-git-9.0.0.6373.5be8fcd83-1-any.pkg.tar.zst;https://mirror.yandex.ru/mirrors/msys2/mingw/i686/mingw-w64-i686-libwinpthread-git-9.0.0.6373.5be8fcd83-1-any.pkg.tar.zst;https://mirrors.tuna.tsinghua.edu.cn/msys2/mingw/i686/mingw-w64-i686-libwinpthread-git-9.0.0.6373.5be8fcd83-1-any.pkg.tar.zst;https://mirrors.ustc.edu.cn/msys2/mingw/i686/mingw-w64-i686-libwinpthread-git-9.0.0.6373.5be8fcd83-1-any.pkg.tar.zst;https://mirror.bit.edu.cn/msys2/mingw/i686/mingw-w64-i686-libwinpthread-git-9.0.0.6373.5be8fcd83-1-any.pkg.tar.zst;https://mirror.selfnet.de/msys2/mingw/i686/mingw-w64-i686-libwinpthread-git-9.0.0.6373.5be8fcd83-1-any.pkg.tar.zst;https://mirrors.sjtug.sjtu.edu.cn/msys2/mingw/i686/mingw-w64-i686-libwinpthread-git-9.0.0.6373.5be8fcd83-1-any.pkg.tar.zst -> msys-mingw-w64-i686-libwinpthread-git-9.0.0.6373.5be8fcd83-1-any.pkg.tar.zst...
[DEBUG] To include the environment variables in debug output, pass --debug-env
[DEBUG] Trying to load bundleconfig from C:\dev\vcpkg\vcpkg-bundle.json
[DEBUG] Failed to open: C:\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://repo.msys2.org/mingw/i686/mingw-w64-i686-libwinpthread-git-9.0.0.6373.5be8fcd83-1-any.pkg.tar.zst
Downloading https://www2.futureware.at/~nickoe/msys2-mirror/mingw/i686/mingw-w64-i686-libwinpthread-git-9.0.0.6373.5be8fcd83-1-any.pkg.tar.zst
Downloading https://mirror.yandex.ru/mirrors/msys2/mingw/i686/mingw-w64-i686-libwinpthread-git-9.0.0.6373.5be8fcd83-1-any.pkg.tar.zst
Downloading https://mirrors.tuna.tsinghua.edu.cn/msys2/mingw/i686/mingw-w64-i686-libwinpthread-git-9.0.0.6373.5be8fcd83-1-any.pkg.tar.zst
Downloading https://mirrors.ustc.edu.cn/msys2/mingw/i686/mingw-w64-i686-libwinpthread-git-9.0.0.6373.5be8fcd83-1-any.pkg.tar.zst
Downloading https://mirror.bit.edu.cn/msys2/mingw/i686/mingw-w64-i686-libwinpthread-git-9.0.0.6373.5be8fcd83-1-any.pkg.tar.zst
warning: Download failed -- retrying after 1000ms
warning: Download failed -- retrying after 2000ms
warning: Download failed -- retrying after 4000ms
Downloading https://mirror.selfnet.de/msys2/mingw/i686/mingw-w64-i686-libwinpthread-git-9.0.0.6373.5be8fcd83-1-any.pkg.tar.zst
Downloading https://mirrors.sjtug.sjtu.edu.cn/msys2/mingw/i686/mingw-w64-i686-libwinpthread-git-9.0.0.6373.5be8fcd83-1-any.pkg.tar.zst
error: Failed to download from mirror set
error: https://repo.msys2.org/mingw/i686/mingw-w64-i686-libwinpthread-git-9.0.0.6373.5be8fcd83-1-any.pkg.tar.zst: failed: status code 404
error: https://www2.futureware.at/~nickoe/msys2-mirror/mingw/i686/mingw-w64-i686-libwinpthread-git-9.0.0.6373.5be8fcd83-1-any.pkg.tar.zst: failed: status code 404
error: https://mirror.yandex.ru/mirrors/msys2/mingw/i686/mingw-w64-i686-libwinpthread-git-9.0.0.6373.5be8fcd83-1-any.pkg.tar.zst: failed: status code 404
error: https://mirrors.tuna.tsinghua.edu.cn/msys2/mingw/i686/mingw-w64-i686-libwinpthread-git-9.0.0.6373.5be8fcd83-1-any.pkg.tar.zst: failed: status code 404
error: https://mirrors.ustc.edu.cn/msys2/mingw/i686/mingw-w64-i686-libwinpthread-git-9.0.0.6373.5be8fcd83-1-any.pkg.tar.zst: failed: status code 404
error: https://mirror.bit.edu.cn/msys2/mingw/i686/mingw-w64-i686-libwinpthread-git-9.0.0.6373.5be8fcd83-1-any.pkg.tar.zst: WinHttpSendRequest failed with exit code 12007
error: https://mirror.bit.edu.cn/msys2/mingw/i686/mingw-w64-i686-libwinpthread-git-9.0.0.6373.5be8fcd83-1-any.pkg.tar.zst: WinHttpSendRequest failed with exit code 12007
error: https://mirror.bit.edu.cn/msys2/mingw/i686/mingw-w64-i686-libwinpthread-git-9.0.0.6373.5be8fcd83-1-any.pkg.tar.zst: WinHttpSendRequest failed with exit code 12007
error: https://mirror.bit.edu.cn/msys2/mingw/i686/mingw-w64-i686-libwinpthread-git-9.0.0.6373.5be8fcd83-1-any.pkg.tar.zst: WinHttpSendRequest failed with exit code 12007
error: https://mirror.selfnet.de/msys2/mingw/i686/mingw-w64-i686-libwinpthread-git-9.0.0.6373.5be8fcd83-1-any.pkg.tar.zst: failed: status code 404
error: https://mirrors.sjtug.sjtu.edu.cn/msys2/mingw/i686/mingw-w64-i686-libwinpthread-git-9.0.0.6373.5be8fcd83-1-any.pkg.tar.zst: failed: status code 404
[DEBUG] D:\a\_work\1\s\src\vcpkg\base\downloads.cpp(1051): 
[DEBUG] Time in subprocesses: 0us
[DEBUG] Time in parsing JSON: 4us
[DEBUG] Time in JSON reader: 0us
[DEBUG] Time in filesystem: 4300us
[DEBUG] Time in loading ports: 0us
[DEBUG] Exiting after 14 s (13981202us)

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:84 (vcpkg_download_distfile)
  scripts/cmake/vcpkg_acquire_msys.cmake:174 (z_vcpkg_acquire_msys_download_package)
  scripts/cmake/vcpkg_find_acquire_program.cmake:553 (vcpkg_acquire_msys)
  scripts/cmake/vcpkg_fixup_pkgconfig.cmake:198 (vcpkg_find_acquire_program)
  ports/openssl/install-pc-files.cmake:32 (vcpkg_fixup_pkgconfig)
  ports/openssl/portfile.cmake:22 (include)
  scripts/ports.cmake:145 (include)
github-actions[bot] commented 9 months ago

Try updating your vcpkg version via git pull to resolve this issue. MSYS2 downloads are removed from the upstream servers from time to time, so using an up-to-date vcpkg version is necessary.

GooDeeJAY commented 9 months ago

Try updating your vcpkg version via git pull to resolve this issue. MSYS2 downloads are removed from the upstream servers from time to time, so using an up-to-date vcpkg version is necessary.

I want to install openssl version 1.1.1n which latest vcpkg version doesn't support, how to achieve that then?

JonLiu1993 commented 9 months ago
  1. git blame -l versions/o-/openssl.json
    PS F:\test\vcpkg> git blame -l versions/o-/openssl.json
    2f6537fa2b8928d2329e827f862692112793435d port_versions/o-/openssl.json (Victor Romero              2021-01-14 16:08:36 -0800   1) {
    2f6537fa2b8928d2329e827f862692112793435d port_versions/o-/openssl.json (Victor Romero              2021-01-14 16:08:36 -0800   2)   "versions": [
    3b3bd424827a1f7f4813216f6b32b6c61e386b2e versions/o-/openssl.json      (Kai Pastor                 2022-03-28 20:45:40 +0200   3)     {
    3b3bd424827a1f7f4813216f6b32b6c61e386b2e versions/o-/openssl.json      (Kai Pastor                 2022-03-28 20:45:40 +0200   4)       "git-tree": "06b9e0464af9c7c73227ba9f0fa93c77ef62496e",
    3b3bd424827a1f7f4813216f6b32b6c61e386b2e versions/o-/openssl.json      (Kai Pastor                 2022-03-28 20:45:40 +0200   5)       "version-string": "1.1.1n",
    3b3bd424827a1f7f4813216f6b32b6c61e386b2e versions/o-/openssl.json      (Kai Pastor                 2022-03-28 20:45:40 +0200   6)       "port-version": 1
    3b3bd424827a1f7f4813216f6b32b6c61e386b2e versions/o-/openssl.json      (Kai Pastor                 2022-03-28 20:45:40 +0200   7)     },
    a69b65229b3956b7f45abd81671b7330114bcaad versions/o-/openssl.json      (Raul Metsma                2022-03-17 07:05:23 +0200   8)     {
    a69b65229b3956b7f45abd81671b7330114bcaad versions/o-/openssl.json      (Raul Metsma                2022-03-17 07:05:23 +0200   9)       "git-tree": "7e4d802e3bde4154c227c0dd1da75c719be9f07a",
    a69b65229b3956b7f45abd81671b7330114bcaad versions/o-/openssl.json      (Raul Metsma                2022-03-17 07:05:23 +0200  10)       "version-string": "1.1.1n",
    a69b65229b3956b7f45abd81671b7330114bcaad versions/o-/openssl.json      (Raul Metsma                2022-03-17 07:05:23 +0200  11)       "port-version": 0
    a69b65229b3956b7f45abd81671b7330114bcaad versions/o-/openssl.json      (Raul Metsma                2022-03-17 07:05:23 +0200  12)     },
    afb2279ad78a7c29b5293d989b9a1a2ca00000cf versions/o-/openssl.json      (Kai Pastor                 2022-02-08 07:12:29 +0100  13)     {
    afb2279ad78a7c29b5293d989b9a1a2ca00000cf versions/o-/openssl.json      (Kai Pastor                 2022-02-08 07:12:29 +0100  14)       "git-tree": "29c9d32a703896143a51c55f0b7ae4298684afd6",
    afb2279ad78a7c29b5293d989b9a1a2ca00000cf versions/o-/openssl.json      (Kai Pastor                 2022-02-08 07:12:29 +0100  15)       "version-string": "1.1.1m",
    afb2279ad78a7c29b5293d989b9a1a2ca00000cf versions/o-/openssl.json      (Kai Pastor                 2022-02-08 07:12:29 +0100  16)       "port-version": 2
    afb2279ad78a7c29b5293d989b9a1a2ca00000cf versions/o-/openssl.json      (Kai Pastor                 2022-02-08 07:12:29 +0100  17)     },
    fb1df5721e0c30843429e79e536600253979a514 versions/o-/openssl.json      (Billy O'Neal               2022-01-24 13:35:21 -0800  18)     {
    fb1df5721e0c30843429e79e536600253979a514 versions/o-/openssl.json      (Billy O'Neal               2022-01-24 13:35:21 -0800  19)       "git-tree": "9b8e2ac096b1cd8782137a853c5fc76e07c2af9a",
    fb1df5721e0c30843429e79e536600253979a514 versions/o-/openssl.json      (Billy O'Neal               2022-01-24 13:35:21 -0800  20)       "version-string": "1.1.1m",
    fb1df5721e0c30843429e79e536600253979a514 versions/o-/openssl.json      (Billy O'Neal               2022-01-24 13:35:21 -0800  21)       "port-version": 1
  2. git checkout 3b3bd42 -- ports/openssl
    
    PS F:\test\vcpkg> git checkout 3b3bd424827a1f7f4813216f6b32b6c61e386b2e
    Updating files: 100% (9717/9717), done.
    Note: switching to '3b3bd424827a1f7f4813216f6b32b6c61e386b2e'.

You are in 'detached HEAD' state. You can look around, make experimental changes and commit them, and you can discard any commits you make in this

If you want to create a new branch to retain commits you create, you may do so (now or later) by using -c with the switch command. Example:

git switch -c

Or undo this operation with:

git switch -

Turn off this advice by setting config variable advice.detachedHead to false

HEAD is now at 3b3bd4248 [openssl] Don't switch from jom to nmake, fix cflags (#23726)

3. ./vcpkg install openssl:x64-windows

PS F:\test\vcpkg> ./vcpkg install openssl:x64-windows --editable Computing installation plan... The following packages will be built and installed: openssl:x64-windows -> 1.1.1n#1 Installing 1/1 openssl:x64-windows... Building openssl:x64-windows... A suitable version of powershell-core was not found (required v7.2.1) Downloading portable powershell-core 7.2.1... Extracting powershell-core... PS F:\test\vcpkg>

GooDeeJAY commented 9 months ago

JonLiu1993 I tried your solution, still got an error:

Package: openssl:x64-windows -> 1.1.1n#1

Host Environment

To Reproduce

vcpkg install openssl:x64-windows --editable Failure logs

-- Using cached openssl-1.1.1n.tar.gz.
-- Extracting source C:/dev/vcpkg/downloads/openssl-1.1.1n.tar.gz
-- Using source at C:/dev/vcpkg/buildtrees/openssl/src/openssl-1-8a70f997ec
-- Copying openssl release source files...
-- Copying openssl release source files... done
-- Configure x64-windows-rel
-- Configure x64-windows-rel done
-- Build x64-windows-rel
-- Build x64-windows-rel done
-- Copying openssl debug source files...
-- Copying openssl debug source files... done
-- Configure x64-windows-dbg
-- Configure x64-windows-dbg done
-- Build x64-windows-dbg
-- Build x64-windows-dbg done
-- Installing: C:/dev/vcpkg/packages/openssl_x64-windows/share/openssl/copyright
-- Fixing pkgconfig file: C:/dev/vcpkg/packages/openssl_x64-windows/lib/pkgconfig/libcrypto.pc
-- Fixing pkgconfig file: C:/dev/vcpkg/packages/openssl_x64-windows/lib/pkgconfig/libssl.pc
-- Fixing pkgconfig file: C:/dev/vcpkg/packages/openssl_x64-windows/lib/pkgconfig/openssl.pc
-- Using cached msys-mingw-w64-i686-pkg-config-0.29.2-3-any.pkg.tar.zst.
-- Downloading https://repo.msys2.org/mingw/i686/mingw-w64-i686-libwinpthread-git-9.0.0.6373.5be8fcd83-1-any.pkg.tar.zst;https://www2.futureware.at/~nickoe/msys2-mirror/mingw/i686/mingw-w64-i686-libwinpthread-git-9.0.0.6373.5be8fcd83-1-any.pkg.tar.zst;https://mirror.yandex.ru/mirrors/msys2/mingw/i686/mingw-w64-i686-libwinpthread-git-9.0.0.6373.5be8fcd83-1-any.pkg.tar.zst;https://mirrors.tuna.tsinghua.edu.cn/msys2/mingw/i686/mingw-w64-i686-libwinpthread-git-9.0.0.6373.5be8fcd83-1-any.pkg.tar.zst;https://mirrors.ustc.edu.cn/msys2/mingw/i686/mingw-w64-i686-libwinpthread-git-9.0.0.6373.5be8fcd83-1-any.pkg.tar.zst;https://mirror.bit.edu.cn/msys2/mingw/i686/mingw-w64-i686-libwinpthread-git-9.0.0.6373.5be8fcd83-1-any.pkg.tar.zst;https://mirror.selfnet.de/msys2/mingw/i686/mingw-w64-i686-libwinpthread-git-9.0.0.6373.5be8fcd83-1-any.pkg.tar.zst;https://mirrors.sjtug.sjtu.edu.cn/msys2/mingw/i686/mingw-w64-i686-libwinpthread-git-9.0.0.6373.5be8fcd83-1-any.pkg.tar.zst -> msys-mingw-w64-i686-libwinpthread-git-9.0.0.6373.5be8fcd83-1-any.pkg.tar.zst...
[DEBUG] To include the environment variables in debug output, pass --debug-env
[DEBUG] Trying to load bundleconfig from C:\dev\vcpkg\vcpkg-bundle.json
[DEBUG] Failed to open: C:\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://repo.msys2.org/mingw/i686/mingw-w64-i686-libwinpthread-git-9.0.0.6373.5be8fcd83-1-any.pkg.tar.zst
Downloading https://www2.futureware.at/~nickoe/msys2-mirror/mingw/i686/mingw-w64-i686-libwinpthread-git-9.0.0.6373.5be8fcd83-1-any.pkg.tar.zst
Downloading https://mirror.yandex.ru/mirrors/msys2/mingw/i686/mingw-w64-i686-libwinpthread-git-9.0.0.6373.5be8fcd83-1-any.pkg.tar.zst
Downloading https://mirrors.tuna.tsinghua.edu.cn/msys2/mingw/i686/mingw-w64-i686-libwinpthread-git-9.0.0.6373.5be8fcd83-1-any.pkg.tar.zst
Downloading https://mirrors.ustc.edu.cn/msys2/mingw/i686/mingw-w64-i686-libwinpthread-git-9.0.0.6373.5be8fcd83-1-any.pkg.tar.zst
Downloading https://mirror.bit.edu.cn/msys2/mingw/i686/mingw-w64-i686-libwinpthread-git-9.0.0.6373.5be8fcd83-1-any.pkg.tar.zst
warning: Download failed -- retrying after 1000ms
warning: Download failed -- retrying after 2000ms
warning: Download failed -- retrying after 4000ms
Downloading https://mirror.selfnet.de/msys2/mingw/i686/mingw-w64-i686-libwinpthread-git-9.0.0.6373.5be8fcd83-1-any.pkg.tar.zst
Downloading https://mirrors.sjtug.sjtu.edu.cn/msys2/mingw/i686/mingw-w64-i686-libwinpthread-git-9.0.0.6373.5be8fcd83-1-any.pkg.tar.zst
error: Failed to download from mirror set
error: https://repo.msys2.org/mingw/i686/mingw-w64-i686-libwinpthread-git-9.0.0.6373.5be8fcd83-1-any.pkg.tar.zst: failed: status code 404
error: https://www2.futureware.at/~nickoe/msys2-mirror/mingw/i686/mingw-w64-i686-libwinpthread-git-9.0.0.6373.5be8fcd83-1-any.pkg.tar.zst: failed: status code 404
error: https://mirror.yandex.ru/mirrors/msys2/mingw/i686/mingw-w64-i686-libwinpthread-git-9.0.0.6373.5be8fcd83-1-any.pkg.tar.zst: failed: status code 404
error: https://mirrors.tuna.tsinghua.edu.cn/msys2/mingw/i686/mingw-w64-i686-libwinpthread-git-9.0.0.6373.5be8fcd83-1-any.pkg.tar.zst: failed: status code 404
error: https://mirrors.ustc.edu.cn/msys2/mingw/i686/mingw-w64-i686-libwinpthread-git-9.0.0.6373.5be8fcd83-1-any.pkg.tar.zst: failed: status code 404
error: https://mirror.bit.edu.cn/msys2/mingw/i686/mingw-w64-i686-libwinpthread-git-9.0.0.6373.5be8fcd83-1-any.pkg.tar.zst: WinHttpSendRequest failed with exit code 12007
error: https://mirror.bit.edu.cn/msys2/mingw/i686/mingw-w64-i686-libwinpthread-git-9.0.0.6373.5be8fcd83-1-any.pkg.tar.zst: WinHttpSendRequest failed with exit code 12007
error: https://mirror.bit.edu.cn/msys2/mingw/i686/mingw-w64-i686-libwinpthread-git-9.0.0.6373.5be8fcd83-1-any.pkg.tar.zst: WinHttpSendRequest failed with exit code 12007
error: https://mirror.bit.edu.cn/msys2/mingw/i686/mingw-w64-i686-libwinpthread-git-9.0.0.6373.5be8fcd83-1-any.pkg.tar.zst: WinHttpSendRequest failed with exit code 12007
error: https://mirror.selfnet.de/msys2/mingw/i686/mingw-w64-i686-libwinpthread-git-9.0.0.6373.5be8fcd83-1-any.pkg.tar.zst: failed: status code 404
error: https://mirrors.sjtug.sjtu.edu.cn/msys2/mingw/i686/mingw-w64-i686-libwinpthread-git-9.0.0.6373.5be8fcd83-1-any.pkg.tar.zst: failed: status code 404
[DEBUG] D:\a\_work\1\s\src\vcpkg\base\downloads.cpp(1051): 
[DEBUG] Time in subprocesses: 0us
[DEBUG] Time in parsing JSON: 5us
[DEBUG] Time in JSON reader: 0us
[DEBUG] Time in filesystem: 3896us
[DEBUG] Time in loading ports: 0us
[DEBUG] Exiting after 15 s (14767202us)

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:84 (vcpkg_download_distfile)
  scripts/cmake/vcpkg_acquire_msys.cmake:174 (z_vcpkg_acquire_msys_download_package)
  scripts/cmake/vcpkg_find_acquire_program.cmake:553 (vcpkg_acquire_msys)
  scripts/cmake/vcpkg_fixup_pkgconfig.cmake:198 (vcpkg_find_acquire_program)
  ports/openssl/install-pc-files.cmake:32 (vcpkg_fixup_pkgconfig)
  ports/openssl/portfile.cmake:22 (include)
  scripts/ports.cmake:145 (include)
JonLiu1993 commented 9 months ago

Find the two lines in the file below and change them to the ones I provided, and try again. vcpkg\scripts\cmake\vcpkg_find_fortran.cmake https://github.com/microsoft/vcpkg/blob/11cbb6b57b502d4864fa3c51b36b1ec88527a036/scripts/cmake/vcpkg_find_fortran.cmake#L46 https://github.com/microsoft/vcpkg/blob/11cbb6b57b502d4864fa3c51b36b1ec88527a036/scripts/cmake/vcpkg_find_fortran.cmake#L89

GooDeeJAY commented 9 months ago

@JonLiu1993 thanks for the patch solution, alongside with those you provided, I had to change other parts of few files in order to install the openssl version 1.1.1n

Here is the git diff, for anyone in future that faces this issue:

 ~  git diff
diff --git a/scripts/cmake/vcpkg_acquire_msys.cmake b/scripts/cmake/vcpkg_acquire_msys.cmake
index dcd93ed4f..e004a033e 100644
--- a/scripts/cmake/vcpkg_acquire_msys.cmake
+++ b/scripts/cmake/vcpkg_acquire_msys.cmake
@@ -106,7 +106,7 @@ function(z_vcpkg_acquire_msys_declare_package)
         endif()
     endforeach()

-    if(NOT arg_URL MATCHES [[^https://repo\.msys2\.org/.*/(([^-]+(-[^0-9][^-]*)*)-.+\.pkg\.tar\.(xz|zst))$]])
+    if(NOT arg_URL MATCHES [[^https://(repo|mirror)\.msys2\.org/.*/(([^-]+(-[^0-9][^-]*)*)-.+\.pkg\.tar\.(xz|zst))$]])
         message(FATAL_ERROR "internal error: regex does not match supplied URL to vcpkg_acquire_msys: ${arg_URL}")
     endif()

@@ -531,7 +531,7 @@ function(vcpkg_acquire_msys out_msys_root)
     )
     z_vcpkg_acquire_msys_declare_package(
         NAME "mingw-w64-x86_64-libwinpthread"
-        URL "https://repo.msys2.org/mingw/x86_64/mingw-w64-x86_64-libwinpthread-git-9.0.0.6373.5be8fcd83-1-any.pkg.tar.zst"
+        URL "https://mirror.msys2.org/mingw/mingw32/mingw-w64-i686-libwinpthread-git-11.0.0.r18.g9df2e604d-1-any.pkg.tar.zst"
         SHA512 a2c9e60d23b1310a6cec1fadd2b15a8c07223f3fe90d41b1579e9fc27ee2b0b408456291a55fad54a156e6a247efc20f6fcc247cc567e64fe190938aa3b672e9
     )

diff --git a/scripts/cmake/vcpkg_find_acquire_program.cmake b/scripts/cmake/vcpkg_find_acquire_program.cmake
index c85932dc7..d22d2ae69 100644
--- a/scripts/cmake/vcpkg_find_acquire_program.cmake
+++ b/scripts/cmake/vcpkg_find_acquire_program.cmake
@@ -549,7 +549,8 @@ function(vcpkg_find_acquire_program program)
         elseif(CMAKE_HOST_WIN32)
             if(NOT EXISTS "${PKGCONFIG}")
                 set(VERSION 0.29.2-3)
-                set(program_version git-9.0.0.6373.5be8fcd83-1)
+                #[[set(program_version git-9.0.0.6373.5be8fcd83-1)]]
+                set(program_version git-11.0.0.r18.g9df2e604d-1)
                 vcpkg_acquire_msys(
                     PKGCONFIG_ROOT
                     NO_DEFAULT_PACKAGES
@@ -557,7 +558,7 @@ function(vcpkg_find_acquire_program program)
                         "https://repo.msys2.org/mingw/i686/mingw-w64-i686-pkg-config-${VERSION}-any.pkg.tar.zst"
                         0c086bf306b6a18988cc982b3c3828c4d922a1b60fd24e17c3bead4e296ee6de48ce148bc6f9214af98be6a86cb39c37003d2dcb6561800fdf7d0d1028cf73a4
                         "https://repo.msys2.org/mingw/i686/mingw-w64-i686-libwinpthread-${program_version}-any.pkg.tar.zst"
-                        c89c27b5afe4cf5fdaaa354544f070c45ace5e9d2f2ebb4b956a148f61681f050e67976894e6f52e42e708dadbf730fee176ac9add3c9864c21249034c342810
+                        60eccb7030039f7a42a6c6377d2cad9957c2f4693ecfa7672417a145fae21a62129475279deece9eb3e892a69a6f3d6d7e10e3fb9deda47e123e3e3d4f610d9d
                 )
             endif()
             set("${program}" "${PKGCONFIG_ROOT}/mingw32/bin/pkg-config.exe" CACHE INTERNAL "")
diff --git a/scripts/cmake/vcpkg_find_fortran.cmake b/scripts/cmake/vcpkg_find_fortran.cmake
index 0e82c7d36..5efb27fe4 100644
--- a/scripts/cmake/vcpkg_find_fortran.cmake
+++ b/scripts/cmake/vcpkg_find_fortran.cmake
@@ -51,8 +51,8 @@ function(vcpkg_find_fortran out_var)
                         bdf253bb627cfc108407ea0d1f5fc643da0b229a8f7fcc346fcdf7709e0ffbf8d1f75bdea755116c6b30834d1c764496a23c0546ef1048075d312136c6ebe9d9
                         "https://repo.msys2.org/mingw/i686/mingw-w64-i686-gmp-6.2.1-3-any.pkg.tar.zst"
                         10787443380a89a3491596946354645899daad07bc159ffcee96243cb51637dfbc163d52751ffd14682b66be8fd65c0379c642df16132f16a80709c4af921bac
-                        "https://repo.msys2.org/mingw/i686/mingw-w64-i686-libwinpthread-git-9.0.0.6373.5be8fcd83-1-any.pkg.tar.zst"
-                        c89c27b5afe4cf5fdaaa354544f070c45ace5e9d2f2ebb4b956a148f61681f050e67976894e6f52e42e708dadbf730fee176ac9add3c9864c21249034c342810
+                        "https://mirror.msys2.org/mingw/mingw32/mingw-w64-i686-libwinpthread-git-11.0.0.r18.g9df2e604d-1-any.pkg.tar.zst"^M
+                        60eccb7030039f7a42a6c6377d2cad9957c2f4693ecfa7672417a145fae21a62129475279deece9eb3e892a69a6f3d6d7e10e3fb9deda47e123e3e3d4f610d9d^M
                         "https://repo.msys2.org/mingw/i686/mingw-w64-i686-winpthreads-git-9.0.0.6373.5be8fcd83-1-any.pkg.tar.zst"
                         85980183879da0d0ea74b9ad1fdfb09e5ed9d2e2212877d47d0f621ce721566e205be0b1913a643d0a95b256441e0bafd803fa9c848a8203dffd7d72109e32c2
                         "https://repo.msys2.org/mingw/i686/mingw-w64-i686-mpc-1.2.1-1-any.pkg.tar.zst"
@@ -89,7 +89,7 @@ function(vcpkg_find_fortran out_var)
                         2481f7c8db7cca549911bc71715af86ca287ffed6d673c9a6c3a4c792b68899a129dd959214af7067f434e74fc518c43749e7d928cbd2232ab4fbc65880dad98
                         "https://repo.msys2.org/mingw/x86_64/mingw-w64-x86_64-gmp-6.2.1-3-any.pkg.tar.zst"
                         d0d4ed1a046b64f437e72bbcf722b30311dde5f5e768a520141423fc0a3127b116bd62cfd4b5cf5c01a71ee0f9cf6479fcc31277904652d8f6ddbf16e33e0b72
-                        "https://repo.msys2.org/mingw/x86_64/mingw-w64-x86_64-libwinpthread-git-9.0.0.6373.5be8fcd83-1-any.pkg.tar.zst"
+                        "https://mirror.msys2.org/mingw/mingw64/mingw-w64-x86_64-libwinpthread-git-11.0.0.r18.g9df2e604d-1-any.pkg.tar.zst"^M
                         a2c9e60d23b1310a6cec1fadd2b15a8c07223f3fe90d41b1579e9fc27ee2b0b408456291a55fad54a156e6a247efc20f6fcc247cc567e64fe190938aa3b672e9
                         "https://repo.msys2.org/mingw/x86_64/mingw-w64-x86_64-winpthreads-git-9.0.0.6373.5be8fcd83-1-any.pkg.tar.zst"
                         be03433e6006166e5b4794f2a01730cdb6c9f19fa96bd10a8bc50cf06ad389cbc66d44ea3eda46f53c3b2c89e2fc86aec21a372828e9527b24480c87ed88348c
dg0yt commented 9 months ago

@JonLiu1993 Please improve the instructions you give. This step:

  1. git checkout https://github.com/microsoft/vcpkg/commit/3b3bd424827a1f7f4813216f6b32b6c61e386b2e

restores outdated build scripts! What you might have proposed here is:

git checkout 3b3bd42 -- ports/openssl

which only checks out the old state of the openssl port. This can be followed by vcpkg install openssl.

But maybe it makes more sense to copy the directory to another location and start using that directory via overlay ports: The user now has to take care of port maintenance incl. security updates.

dg0yt commented 9 months ago

But maybe it makes more sense to copy the directory to another location and start using that directory via overlay ports: The user now has to take care of port maintenance incl. security updates.

And this is https://github.com/microsoft/vcpkg/discussions/26723#discussioncomment-3896795.