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

Can't compile the crate without Perl (at least on Windows / my machine) since OpenSSL vendored requires it #405

Closed
babichjacob opened this issue Sep 3, 2024 · 3 comments

Comments

@babichjacob
Copy link

It was changed in #401 to add openssl with the vendored feature as a dependency, but now I can't compile the crate until installing Perl:

error: failed to run custom build command for `openssl-sys v0.9.103`

Caused by:
  process didn't exit successfully: `C:\Users\Jacob\AppData\Local\Temp\cargo-installODMHPn\release\build\openssl-sys-07cce6badf559e3f\build-script-main` (exit code: 101)
  --- stdout
  cargo:rustc-check-cfg=cfg(osslconf, values("OPENSSL_NO_OCB", "OPENSSL_NO_SM4", "OPENSSL_NO_SEED", "OPENSSL_NO_CHACHA", "OPENSSL_NO_CAST", "OPENSSL_NO_IDEA", "OPENSSL_NO_CAMELLIA", "OPENSSL_NO_RC4", "OPENSSL_NO_BF", "OPENSSL_NO_PSK", "OPENSSL_NO_DEPRECATED_3_0", "OPENSSL_NO_SCRYPT", "OPENSSL_NO_SM3", "OPENSSL_NO_RMD160", "OPENSSL_NO_EC2M", "OPENSSL_NO_OCSP", "OPENSSL_NO_CMS", "OPENSSL_NO_COMP", "OPENSSL_NO_SOCK", "OPENSSL_NO_STDIO"))
  cargo:rustc-check-cfg=cfg(openssl)
  cargo:rustc-check-cfg=cfg(libressl)
  cargo:rustc-check-cfg=cfg(boringssl)
  cargo:rustc-check-cfg=cfg(libressl250)
  cargo:rustc-check-cfg=cfg(libressl251)
  cargo:rustc-check-cfg=cfg(libressl252)
  cargo:rustc-check-cfg=cfg(libressl261)
  cargo:rustc-check-cfg=cfg(libressl270)
  cargo:rustc-check-cfg=cfg(libressl271)
  cargo:rustc-check-cfg=cfg(libressl273)
  cargo:rustc-check-cfg=cfg(libressl280)
  cargo:rustc-check-cfg=cfg(libressl281)
  cargo:rustc-check-cfg=cfg(libressl291)
  cargo:rustc-check-cfg=cfg(libressl310)
  cargo:rustc-check-cfg=cfg(libressl321)
  cargo:rustc-check-cfg=cfg(libressl332)
  cargo:rustc-check-cfg=cfg(libressl340)
  cargo:rustc-check-cfg=cfg(libressl350)
  cargo:rustc-check-cfg=cfg(libressl360)
  cargo:rustc-check-cfg=cfg(libressl361)
  cargo:rustc-check-cfg=cfg(libressl370)
  cargo:rustc-check-cfg=cfg(libressl380)
  cargo:rustc-check-cfg=cfg(libressl381)
  cargo:rustc-check-cfg=cfg(libressl382)
  cargo:rustc-check-cfg=cfg(libressl390)
  cargo:rustc-check-cfg=cfg(libressl400)
  cargo:rustc-check-cfg=cfg(ossl101)
  cargo:rustc-check-cfg=cfg(ossl102)
  cargo:rustc-check-cfg=cfg(ossl102f)
  cargo:rustc-check-cfg=cfg(ossl102h)
  cargo:rustc-check-cfg=cfg(ossl110)
  cargo:rustc-check-cfg=cfg(ossl110f)
  cargo:rustc-check-cfg=cfg(ossl110g)
  cargo:rustc-check-cfg=cfg(ossl110h)
  cargo:rustc-check-cfg=cfg(ossl111)
  cargo:rustc-check-cfg=cfg(ossl111b)
  cargo:rustc-check-cfg=cfg(ossl111c)
  cargo:rustc-check-cfg=cfg(ossl111d)
  cargo:rustc-check-cfg=cfg(ossl300)
  cargo:rustc-check-cfg=cfg(ossl310)
  cargo:rustc-check-cfg=cfg(ossl320)
  cargo:rustc-check-cfg=cfg(ossl330)
  cargo:rerun-if-env-changed=X86_64_PC_WINDOWS_MSVC_OPENSSL_NO_VENDOR
  X86_64_PC_WINDOWS_MSVC_OPENSSL_NO_VENDOR unset
  cargo:rerun-if-env-changed=OPENSSL_NO_VENDOR
  OPENSSL_NO_VENDOR unset
  cargo:rerun-if-env-changed=X86_64_PC_WINDOWS_MSVC_OPENSSL_CONFIG_DIR
  X86_64_PC_WINDOWS_MSVC_OPENSSL_CONFIG_DIR unset
  cargo:rerun-if-env-changed=OPENSSL_CONFIG_DIR
  OPENSSL_CONFIG_DIR unset
  running "perl" "./Configure" "--prefix=C:/Users/Jacob/AppData/Local/Temp/cargo-installODMHPn/release/build/openssl-sys-11758d6336c56dff/out/openssl-build/install" "--openssldir=SYS$MANAGER:[OPENSSL]" "no-dso" "no-shared" "no-ssl3" "no-tests" "no-comp" "no-zlib" "no-zlib-dynamic" "--libdir=lib" "no-md2" "no-rc5" "no-weak-ssl-ciphers" "no-camellia" "no-idea" "no-seed" "no-capieng" "no-asm" "VC-WIN64A"

  --- stderr
  thread 'main' panicked at C:\Users\Jacob\scoop\persist\rustup\.cargo\registry\src\index.crates.io-6f17d22bba15001f\openssl-src-300.3.2+3.3.2\src/lib.rs:633:9:



  Error configuring OpenSSL build:
      Command: "perl" "./Configure" "--prefix=C:/Users/Jacob/AppData/Local/Temp/cargo-installODMHPn/release/build/openssl-sys-11758d6336c56dff/out/openssl-build/install" "--openssldir=SYS$MANAGER:[OPENSSL]" "no-dso" "no-shared" "no-ssl3" "no-tests" "no-comp" "no-zlib" "no-zlib-dynamic" "--libdir=lib" "no-md2" "no-rc5" "no-weak-ssl-ciphers" "no-camellia" "no-idea" "no-seed" "no-capieng" "no-asm" "VC-WIN64A"
      Failed to execute: program not found

I then installed a Perl compiler and it builds successfully.

@babichjacob
Copy link
Author

babichjacob commented Sep 3, 2024

Do you have the option of removing the dependency on OpenSSL and updating reqwest's features to still be able to compile statically that way?

I now see #388 was a previous attempt to do this but you had to close it because of #340 (comment). Dang, sorry it didn't work out.

Although, I'm testing that change locally and the results seem to be the same...

@snshn
Copy link
Member

snshn commented Sep 5, 2024

Hi J,

sorry to see this issue happening with the Windows build. I just merged #406 and about to release 2.8.3 with that included, perhaps it'll build without Perl and only require it in case the linking to OpenSSL is chosen to be static? I'll see if I can get the maintainer of that crate make it work without Perl (I'm surprised that language is still used today in anything modern).

@snshn
Copy link
Member

snshn commented Sep 10, 2024

It should now possible build without requiring Perl if --no-default-features is passed. Please feel free to reopen this issue if the problem persists.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants