Skip to content

openssl-sys v0.9.70 fails to build OpenSSL with "Can't locate IPC/Cmd.pm in @INC" perl error #1550

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

Closed
matklad opened this issue Nov 2, 2021 · 6 comments

Comments

@matklad
Copy link

matklad commented Nov 2, 2021

Hit this error after upgrade:

process didn't exit successfully: `/var/lib/buildkite-agent/builds/buildkite-i-0f2570c8871f6e756-1/nearprotocol/nearcore/target/debug/build/openssl-sys-ac0265688c9e9667/build-script-main` (exit status: 101)
--
  | [2021-11-02T11:38:38Z]   --- stdout
  | [2021-11-02T11:38:38Z]   cargo:rustc-cfg=const_fn
  | [2021-11-02T11:38:38Z]   cargo:rerun-if-env-changed=X86_64_UNKNOWN_LINUX_GNU_OPENSSL_NO_VENDOR
  | [2021-11-02T11:38:38Z]   X86_64_UNKNOWN_LINUX_GNU_OPENSSL_NO_VENDOR unset
  | [2021-11-02T11:38:38Z]   cargo:rerun-if-env-changed=OPENSSL_NO_VENDOR
  | [2021-11-02T11:38:38Z]   OPENSSL_NO_VENDOR unset
  | [2021-11-02T11:38:38Z]   CC_x86_64-unknown-linux-gnu = None
  | [2021-11-02T11:38:38Z]   CC_x86_64_unknown_linux_gnu = None
  | [2021-11-02T11:38:38Z]   HOST_CC = None
  | [2021-11-02T11:38:38Z]   CC = None
  | [2021-11-02T11:38:38Z]   CFLAGS_x86_64-unknown-linux-gnu = None
  | [2021-11-02T11:38:38Z]   CFLAGS_x86_64_unknown_linux_gnu = None
  | [2021-11-02T11:38:38Z]   HOST_CFLAGS = None
  | [2021-11-02T11:38:38Z]   CFLAGS = None
  | [2021-11-02T11:38:38Z]   CRATE_CC_NO_DEFAULTS = None
  | [2021-11-02T11:38:38Z]   DEBUG = Some("true")
  | [2021-11-02T11:38:38Z]   CARGO_CFG_TARGET_FEATURE = Some("fxsr,sse,sse2")
  | [2021-11-02T11:38:38Z]   running "perl" "./Configure" "--prefix=/var/lib/buildkite-agent/builds/buildkite-i-0f2570c8871f6e756-1/nearprotocol/nearcore/target/debug/build/openssl-sys-bd8a83f56a7e2c51/out/openssl-build/install" "no-dso" "no-shared" "no-ssl3" "no-tests" "no-comp" "no-zlib" "no-zlib-dynamic" "--libdir=lib" "no-legacy" "no-md2" "no-rc5" "no-weak-ssl-ciphers" "no-camellia" "no-idea" "no-seed" "linux-x86_64" "-O2" "-ffunction-sections" "-fdata-sections" "-fPIC" "-g" "-fno-omit-frame-pointer" "-m64"
  | [2021-11-02T11:38:38Z]
  | [2021-11-02T11:38:38Z]   --- stderr
  | [2021-11-02T11:38:38Z]   Can't locate IPC/Cmd.pm in @INC (@INC contains: /var/lib/buildkite-agent/builds/buildkite-i-0f2570c8871f6e756-1/nearprotocol/nearcore/target/debug/build/openssl-sys-bd8a83f56a7e2c51/out/openssl-build/build/src/util/perl /usr/local/lib64/perl5 /usr/local/share/perl5 /usr/lib64/perl5/vendor_perl /usr/share/perl5/vendor_perl /usr/lib64/perl5 /usr/share/perl5 . /var/lib/buildkite-agent/builds/buildkite-i-0f2570c8871f6e756-1/nearprotocol/nearcore/target/debug/build/openssl-sys-bd8a83f56a7e2c51/out/openssl-build/build/src/external/perl/Text-Template-1.56/lib) at /var/lib/buildkite-agent/builds/buildkite-i-0f2570c8871f6e756-1/nearprotocol/nearcore/target/debug/build/openssl-sys-bd8a83f56a7e2c51/out/openssl-build/build/src/util/perl/OpenSSL/config.pm line 18.
  | [2021-11-02T11:38:38Z]   BEGIN failed--compilation aborted at /var/lib/buildkite-agent/builds/buildkite-i-0f2570c8871f6e756-1/nearprotocol/nearcore/target/debug/build/openssl-sys-bd8a83f56a7e2c51/out/openssl-build/build/src/util/perl/OpenSSL/config.pm line 18.
  | [2021-11-02T11:38:38Z]   Compilation failed in require at ./Configure line 23.
  | [2021-11-02T11:38:38Z]   BEGIN failed--compilation aborted at ./Configure line 23.
  | [2021-11-02T11:38:38Z]   thread 'main' panicked at '
  | [2021-11-02T11:38:38Z]
  | [2021-11-02T11:38:38Z]
  | [2021-11-02T11:38:38Z]   Error configuring OpenSSL build:
  | [2021-11-02T11:38:38Z]       Command: "perl" "./Configure" "--prefix=/var/lib/buildkite-agent/builds/buildkite-i-0f2570c8871f6e756-1/nearprotocol/nearcore/target/debug/build/openssl-sys-bd8a83f56a7e2c51/out/openssl-build/install" "no-dso" "no-shared" "no-ssl3" "no-tests" "no-comp" "no-zlib" "no-zlib-dynamic" "--libdir=lib" "no-legacy" "no-md2" "no-rc5" "no-weak-ssl-ciphers" "no-camellia" "no-idea" "no-seed" "linux-x86_64" "-O2" "-ffunction-sections" "-fdata-sections" "-fPIC" "-g" "-fno-omit-frame-pointer" "-m64"
  | [2021-11-02T11:38:38Z]       Exit status: exit status: 2
  | [2021-11-02T11:38:38Z]
  | [2021-11-02T11:38:38Z]
  | [2021-11-02T11:38:38Z]       ', /var/lib/buildkite-agent/.cargo/registry/src/git.colasdn.top-1ecc6299db9ec823/openssl-src-300.0.2+3.0.0/src/lib.rs:492:13

I think that is openssl/openssl#14541 -- I need "need to install perl-core rather than just perl." to build open-ssl now.

I don't think this is a bug per-se, just a change in build deps. Still, opening this up so that if other folks see this, they have all the pointers.

It might make sense to insta-close the issue, but I'll leave this up to you!

@leongross
Copy link

Facing the same issue, installing the required perl packages solves the problem

@EverlastingBugstopper
Copy link

@matklad - lifesaver. Thanks.

@sfackler
Copy link
Owner

sfackler commented Nov 4, 2021

The linked PR's merged, so I'm going to close this (boo perl!)

@ChristopherRabotin
Copy link

I'm having this issue in an ubuntu-latest github workflow. What are the "required perl packages" that solved your problem?

@EverlastingBugstopper
Copy link

ubuntu should just require libssl-dev. on centos 7 i needed perl-core, openssl-devel, and openssl

@s3rius
Copy link

s3rius commented Sep 19, 2023

For all people, who struggle in building openssl for maturin projects, I posted solution here: #2036 (comment).

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

6 participants