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

OPENSSL build failure #28249

Closed
planktonwhc opened this issue Dec 9, 2022 · 8 comments
Closed

OPENSSL build failure #28249

planktonwhc opened this issue Dec 9, 2022 · 8 comments
Assignees
Labels
category:question This issue is a question

Comments

@planktonwhc
Copy link

C:\Users\PLANKTON>vcpkg\vcpkg install libiconv:x64-windows zlib:x64-windows openssl:x64-windows dirent:x64-windows getopt:x64-windows curl:x64-windows libzip:x64-windows libxml2:x64-windows libusb:x64-windows libusb-win32:x64-windows pthreads:x64-windows readline:x64-windows pcre:x64-windows dirent
Computing installation plan...
The following packages are already installed:
curl[core,non-http,schannel,ssl,sspi]:x64-windows -> 7.86.0#1
dirent[core]:x64-windows -> 1.23.2#1
dirent[core]:x86-windows -> 1.23.2#1
getopt[core]:x64-windows -> 0#2
libiconv[core]:x64-windows -> 1.17
libusb[core]:x64-windows -> 1.0.26#2
libusb-win32[core]:x64-windows -> 1.2.6.0#8
libxml2[core]:x64-windows -> 2.9.14#1
libzip[bzip2,core,default-aes,wincrypto]:x64-windows -> 1.9.2
zlib[core]:x64-windows -> 1.2.13
The following packages will be built and installed:
openssl[core]:x64-windows -> 3.0.7#1
pcre[core]:x64-windows -> 8.45#5
pthreads[core]:x64-windows -> 3.0.0#12
readline[core]:x64-windows -> 0#3

  • readline-win32[core]:x64-windows -> 5.0#5
    Additional packages (*) will be modified to complete this operation.
    curl:x64-windows is already installed
    dirent:x64-windows is already installed
    dirent:x86-windows is already installed
    getopt:x64-windows is already installed
    libiconv:x64-windows is already installed
    libusb:x64-windows is already installed
    libusb-win32:x64-windows is already installed
    libxml2:x64-windows is already installed
    libzip:x64-windows is already installed
    zlib:x64-windows is already installed
    Detecting compiler hash for triplet x64-windows...
    Restored 0 package(s) from C:\Users\PLANKTON\AppData\Local\vcpkg\archives in 265.1 us. Use --debug to see more details.
    Installing 1/5 openssl:x64-windows...
    Building openssl[core]:x64-windows...
    -- Using cached openssl-openssl-openssl-3.0.7.tar.gz.
    -- Cleaning sources at C:/Users/PLANKTON/vcpkg/buildtrees/openssl/src/nssl-3.0.7-96d825e305.clean. Use --editable to skip cleaning for the packages you specify.
    -- Extracting source C:/Users/PLANKTON/vcpkg/downloads/openssl-openssl-openssl-3.0.7.tar.gz
    -- Applying patch windows/install-layout.patch
    -- Applying patch windows/install-pdbs.patch
    -- Using source at C:/Users/PLANKTON/vcpkg/buildtrees/openssl/src/nssl-3.0.7-96d825e305.clean
    -- Downloading https://strawberryperl.com/download/5.32.1.1/strawberry-perl-5.32.1.1-32bit.zip -> strawberry-perl-5.32.1.1-32bit.zip...
    [DEBUG] To include the environment variables in debug output, pass --debug-env
    [DEBUG] Feature flag 'binarycaching' unset
    [DEBUG] Feature flag 'compilertracking' unset
    [DEBUG] Feature flag 'registries' unset
    [DEBUG] Feature flag 'versions' unset
    Downloading https://strawberryperl.com/download/5.32.1.1/strawberry-perl-5.32.1.1-32bit.zip
    Download failed -- retrying after 1000ms.Download failed -- retrying after 2000ms.Download failed -- retrying after 4000ms.error: Failed to download from mirror set
    error: https://strawberryperl.com/download/5.32.1.1/strawberry-perl-5.32.1.1-32bit.zip: WinHttpSendRequest() failed: 12007
    https://strawberryperl.com/download/5.32.1.1/strawberry-perl-5.32.1.1-32bit.zip: WinHttpSendRequest() failed: 12007
    https://strawberryperl.com/download/5.32.1.1/strawberry-perl-5.32.1.1-32bit.zip: WinHttpSendRequest() failed: 12007
    File does not have the expected hash:
    url : [ https://strawberryperl.com/download/5.32.1.1/strawberry-perl-5.32.1.1-32bit.zip ]
    File path : [ C:\Users\PLANKTON\vcpkg\downloads\strawberry-perl-5.32.1.1-32bit.zip.17900.part ]
    Expected hash : [ 936381254fea2e596db6a16c23b08ced25c4081fda484e1b8c4356755016e4b956bd00f3d2ee651d5f41a7695e9998f6c1ac3f4a237212b9c55aca8c5fea14e9 ]
    Actual hash : [ 0cde74707304c5bf150dd9a501c71e1c035f56d29e90bc42aefa7f0f8302483a739e512ec2123b89e86052fa0c0f64cbc755af9ebe4e768ab1b3c49143a602df ]

[DEBUG] D:\a_work\1\s\src\vcpkg\base\downloads.cpp(774):
[DEBUG] Time in subprocesses: 0 us
[DEBUG] Time in parsing JSON: 3 us
[DEBUG] Time in JSON reader: 0 us
[DEBUG] Time in filesystem: 1036 us
[DEBUG] Time in loading ports: 0 us
[DEBUG] Exiting after 14.62 min (877078294 us)

CMake Error at scripts/cmake/vcpkg_download_distfile.cmake:32 (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:273 (z_vcpkg_download_distfile_show_proxy_and_fail)
scripts/cmake/vcpkg_find_acquire_program.cmake:628 (vcpkg_download_distfile)
ports/openssl/portfile.cmake:25 (vcpkg_find_acquire_program)
scripts/ports.cmake:147 (include)

error: building openssl:x64-windows failed with: BUILD_FAILED
error: 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+openssl
You can submit a new issue at:
https://github.com/microsoft/vcpkg/issues/new?template=report-package-build-failure.md&title=[openssl]+Build+error
Include '[openssl] 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-11-10-5fdee72bc1fceca198fb1ab7589837206a8b81ba
vcpkg-scripts version: 5402d24 2022-12-08 (7 hours ago)

@planktonwhc planktonwhc added the category:port-bug The issue is with a library, which is something the port should already support label Dec 9, 2022
@Cheney-W Cheney-W added category:question This issue is a question and removed category:port-bug The issue is with a library, which is something the port should already support labels Dec 9, 2022
@Cheney-W
Copy link
Contributor

Cheney-W commented Dec 9, 2022

I can't reproduce this issue in my side, the hash of the strawberry-perl-5.32.1.1-32bit.zip file I downloaded is consistent with that set in the current vcpkg.
I suspect that your local software may have touched that file after it was downloaded, causing the file hash to change.
Please check your firewall and try to download strawberry-perl-5.32.1.1-32bit.zip when it is closed

@BurningEnlightenment
Copy link
Contributor

BurningEnlightenment commented Dec 9, 2022

I observed very similar perl download failures twice or thrice on our (dockerized) CI servers two days ago yesterday. Those corrupted downloads were also agonizingly slow (like 40min 20min for that ~100MiB file).

I think it is more of a server reliability issue than a firewall or local software issue.

I added the failure log from one of the CI runs:

Building boringssl[core]:x64-windows-ltcg-static...
-- [OVERLAY] Loading triplet configuration from: C:\builds\native\node-vefs\tools\triplets\x64-windows-ltcg-static.cmake
-- Installing port from location: C:\image\vcpkg\buildtrees\versioning_\versions\boringssl\8d28c72d322cf2245e69075deef73c5edefee0b5
-- Downloading https://strawberryperl.com/download/5.32.1.1/strawberry-perl-5.32.1.1-32bit.zip -> strawberry-perl-5.32.1.1-32bit.zip...
[DEBUG] To include the environment variables in debug output, pass --debug-env
[DEBUG] Feature flag 'binarycaching' unset
[DEBUG] Feature flag 'compilertracking' unset
[DEBUG] Feature flag 'registries' unset
[DEBUG] Feature flag 'versions' unset
[DEBUG] Detected Container Execution Service
Downloading https://strawberryperl.com/download/5.32.1.1/strawberry-perl-5.32.1.1-32bit.zip
error: Failed to download from mirror set
error: File does not have the expected hash:
             url : [ https://strawberryperl.com/download/5.32.1.1/strawberry-perl-5.32.1.1-32bit.zip ]
       File path : [ C:\cache\vcpkg\downloads\strawberry-perl-5.32.1.1-32bit.zip.5908.part ]
   Expected hash : [ 936381254fea2e596db6a16c23b08ced25c4081fda484e1b8c4356755016e4b956bd00f3d2ee651d5f41a7695e9998f6c1ac3f4a237212b9c55aca8c5fea14e9 ]
     Actual hash : [ 65e9e0b83ca8c7947766d956e259e6d80ca9817e9366fe0918165f8b02198dfb9c7419b9914107b1e3afcc9711652a800536a22d28adc9b8163de12b459a00c7 ]
[DEBUG] D:\a\_work\1\s\src\vcpkg\base\downloads.cpp(774): 
[DEBUG] Time in subprocesses: 0 us
[DEBUG] Time in parsing JSON: 18 us
[DEBUG] Time in JSON reader: 0 us
[DEBUG] Time in filesystem: 260 us
[DEBUG] Time in loading ports: 0 us
[DEBUG] Exiting after 21.33 min (1279751808 us)
CMake Error at scripts/cmake/vcpkg_download_distfile.cmake:32 (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:273 (z_vcpkg_download_distfile_show_proxy_and_fail)
  scripts/cmake/vcpkg_find_acquire_program.cmake:628 (vcpkg_download_distfile)
  buildtrees/versioning_/versions/boringssl/8d28c72d322cf2245e69075deef73c5edefee0b5/portfile.cmake:5 (vcpkg_find_acquire_program)
  scripts/ports.cmake:147 (include)
error: building boringssl:x64-windows-ltcg-static failed with: BUILD_FAILED
error: 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+boringssl
You can submit a new issue at:
    https://github.com/microsoft/vcpkg/issues/new?template=report-package-build-failure.md&title=[boringssl]+Build+error
Include '[boringssl] 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-11-10-5fdee72bc1fceca198fb1ab7589837206a8b81ba
    vcpkg-scripts version: d7c68eea3 2022-12-05 (2 days ago)

@Cheney-W
Copy link
Contributor

Cheney-W commented Dec 9, 2022

Could you please download the https://strawberryperl.com/download/5.32.1.1/strawberry-perl-5.32.1.1-32bit.zip manually and run below command in CMD to see the hash of that file?
certutil -hashfile strawberry-perl-5.32.1.1-32bit.zip SHA512

Below is my result:

C:\xxxx\xxxx\Downloads>certutil -hashfile strawberry-perl-5.32.1.1-32bit.zip SHA512
SHA512 hash of strawberry-perl-5.32.1.1-32bit.zip:
936381254fea2e596db6a16c23b08ced25c4081fda484e1b8c4356755016e4b956bd00f3d2ee651d5f41a7695e9998f6c1ac3f4a237212b9c55aca8c5fea14e9
CertUtil: -hashfile command completed successfully.

At least the server is good now.

@BurningEnlightenment
Copy link
Contributor

Yes, the issue only manifested temporarily. So in combination with the slow download speed, it seems that the hoster isn't capable of handling download peaks. I'm concerned that this might get worse in the future, have other distributions/download sources been evaluated?

@BurningEnlightenment
Copy link
Contributor

BurningEnlightenment commented Dec 9, 2022

I took a look at their website issue tracker and it seems that similar issues have been reported there a few times within the last months:

further digging revealed that this isn't the first time it came up here:

@BillyONeal given you investigated this last time, would it be possible to reconsider the mirror decision or switch to a different perl distribution?

@BillyONeal
Copy link
Member

@BillyONeal given you investigated this last time, would it be possible to reconsider the mirror decision or switch to a different perl distribution?

Strawberry comes with a bunch of cocktail of licenses and stuff that make rehosting by us difficult. It would be neat if someone can get openssl to build with the perl that comes with git?

@dg0yt
Copy link
Contributor

dg0yt commented Dec 10, 2022

It would be neat if someone can get openssl to build with the perl which comes with git?

For a general replacement, the one which comes with msys2 would be nice, to avoid mixing msys2 runtimes in other ports. But IIRC openssl didn't behave well with msys2 perl when I tried to use it for mingw.
From other issues we also know that openssl needs one particular Perl module, IPC/Cmd.pm.

@planktonwhc
Copy link
Author

FIXED !
i try today, strawberry pearl server up

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

5 participants