Skip to content

failed to run custom build command for `openssl-sys v0.9.99 #130

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
vetmohit89 opened this issue Feb 15, 2024 · 2 comments
Closed

failed to run custom build command for `openssl-sys v0.9.99 #130

vetmohit89 opened this issue Feb 15, 2024 · 2 comments

Comments

@vetmohit89
Copy link

vetmohit89 commented Feb 15, 2024

Hello, I am getting this error when I am trying to install modkit with command:
cargo install --path .

I have openssl verison:
/share/apps/rc/software/OpenSSL/1.1/bin/openssl

when running this command:

cargo install --path .
Installing mod_kit v0.2.5 (/data/user/home/mbansal/local/modkit)
Updating crates.io index
Compiling openssl-sys v0.9.99
error: failed to run custom build command for openssl-sys v0.9.99
note: To improve backtraces for build dependencies, set the CARGO_PROFILE_RELEASE_BUILD_OVERRIDE_DEBUG=true environment variable to enable debug information generation.

Caused by:
process didn't exit successfully: /home/mbansal/.cargo/release/build/openssl-sys-c4c9a212cd6072e2/build-script-main (exit status: 101)
--- stdout
cargo:rerun-if-env-changed=X86_64_UNKNOWN_LINUX_GNU_OPENSSL_NO_VENDOR
X86_64_UNKNOWN_LINUX_GNU_OPENSSL_NO_VENDOR unset
cargo:rerun-if-env-changed=OPENSSL_NO_VENDOR
OPENSSL_NO_VENDOR unset
cargo:rerun-if-env-changed=CC_x86_64-unknown-linux-gnu
CC_x86_64-unknown-linux-gnu = None
cargo:rerun-if-env-changed=CC_x86_64_unknown_linux_gnu
CC_x86_64_unknown_linux_gnu = None
cargo:rerun-if-env-changed=HOST_CC
HOST_CC = None
cargo:rerun-if-env-changed=CC
CC = None
cargo:rerun-if-env-changed=CRATE_CC_NO_DEFAULTS
CRATE_CC_NO_DEFAULTS = None
DEBUG = Some("false")
CARGO_CFG_TARGET_FEATURE = Some("fxsr,sse,sse2")
cargo:rerun-if-env-changed=CFLAGS_x86_64-unknown-linux-gnu
CFLAGS_x86_64-unknown-linux-gnu = None
cargo:rerun-if-env-changed=CFLAGS_x86_64_unknown_linux_gnu
CFLAGS_x86_64_unknown_linux_gnu = None
cargo:rerun-if-env-changed=HOST_CFLAGS
HOST_CFLAGS = None
cargo:rerun-if-env-changed=CFLAGS
CFLAGS = None
cargo:rerun-if-env-changed=AR_x86_64-unknown-linux-gnu
AR_x86_64-unknown-linux-gnu = None
cargo:rerun-if-env-changed=AR_x86_64_unknown_linux_gnu
AR_x86_64_unknown_linux_gnu = None
cargo:rerun-if-env-changed=HOST_AR
HOST_AR = None
cargo:rerun-if-env-changed=AR
AR = None
cargo:rerun-if-env-changed=ARFLAGS_x86_64-unknown-linux-gnu
ARFLAGS_x86_64-unknown-linux-gnu = None
cargo:rerun-if-env-changed=ARFLAGS_x86_64_unknown_linux_gnu
ARFLAGS_x86_64_unknown_linux_gnu = None
cargo:rerun-if-env-changed=HOST_ARFLAGS
HOST_ARFLAGS = None
cargo:rerun-if-env-changed=ARFLAGS
ARFLAGS = None
cargo:rerun-if-env-changed=RANLIB_x86_64-unknown-linux-gnu
RANLIB_x86_64-unknown-linux-gnu = None
cargo:rerun-if-env-changed=RANLIB_x86_64_unknown_linux_gnu
RANLIB_x86_64_unknown_linux_gnu = None
cargo:rerun-if-env-changed=HOST_RANLIB
HOST_RANLIB = None
cargo:rerun-if-env-changed=RANLIB
RANLIB = None
cargo:rerun-if-env-changed=RANLIBFLAGS_x86_64-unknown-linux-gnu
RANLIBFLAGS_x86_64-unknown-linux-gnu = None
cargo:rerun-if-env-changed=RANLIBFLAGS_x86_64_unknown_linux_gnu
RANLIBFLAGS_x86_64_unknown_linux_gnu = None
cargo:rerun-if-env-changed=HOST_RANLIBFLAGS
HOST_RANLIBFLAGS = None
cargo:rerun-if-env-changed=RANLIBFLAGS
RANLIBFLAGS = None
running cd "/home/mbansal/.cargo/release/build/openssl-sys-3849d68cf9f95fbd/out/openssl-build/build/src" && env -u CROSS_COMPILE AR="ar" CC="cc" RANLIB="ranlib" "perl" "./Configure"
"--prefix=/home/mbansal/.cargo/release/build/openssl-sys-3849d68cf9f95fbd/out/openssl-build/install" "--openssldir=/usr/local/ssl" "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" "linux-x86_64" "-O2" "-ffunction-sections" "-fdata-sections" "-fPIC"
"-m64"
--- stderr
Can't locate IPC/Cmd.pm in @inc (@inc contains: /data/user/home/mbansal/.cargo/release/build/openssl-sys-3849d68cf9f95fbd/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 . /data/user/home/mbansal/.cargo/release/build/openssl-sys-3849d68cf
9f95fbd/out/openssl-build/build/src/external/perl/Text-Template-1.56/lib) at /data/user/home/mbansal/.cargo/release/build/openssl-sys-3849d68cf9f95fbd/out/openssl-build/build/src/util/
perl/OpenSSL/config.pm line 19.
BEGIN failed--compilation aborted at /data/user/home/mbansal/.cargo/release/build/openssl-sys-3849d68cf9f95fbd/out/openssl-build/build/src/util/perl/OpenSSL/config.pm line 19.
Compilation failed in require at ./Configure line 23.
BEGIN failed--compilation aborted at ./Configure line 23.
thread 'main' panicked at /home/mbansal/.cargo/registry/src/index.crates.io-6f17d22bba15001f/openssl-src-300.2.3+3.2.1/src/lib.rs:611:9:
Error configuring OpenSSL build:
Command: cd "/home/mbansal/.cargo/release/build/openssl-sys-3849d68cf9f95fbd/out/openssl-build/build/src" && env -u CROSS_COMPILE AR="ar" CC="cc" RANLIB="ranlib" "perl" "./Config
ure" "--prefix=/home/mbansal/.cargo/release/build/openssl-sys-3849d68cf9f95fbd/out/openssl-build/install" "--openssldir=/usr/local/ssl" "no-dso" "no-shared" "no-ssl3" "no-tests" "no-co
mp" "no-zlib" "no-zlib-dynamic" "--libdir=lib" "no-md2" "no-rc5" "no-weak-ssl-ciphers" "no-camellia" "no-idea" "no-seed" "linux-x86_64" "-O2" "-ffunction-sections" "-fdata-sections" "-
fPIC" "-m64"
Exit status: exit status: 2

stack backtrace:
0: rust_begin_unwind
at /rustc/82e1608dfa6e0b5569232559e3d385fea5a93112/library/std/src/panicking.rs:645:5
1: core::panicking::panic_fmt
at /rustc/82e1608dfa6e0b5569232559e3d385fea5a93112/library/core/src/panicking.rs:72:14
2: openssl_src::Build::run_command
3: openssl_src::Build::build
4: build_script_main::find_vendored::get_openssl
5: build_script_main::find_openssl
6: build_script_main::main
7: core::ops::function::FnOnce::call_once
note: Some details are omitted, run with RUST_BACKTRACE=full for a verbose backtrace.
error: failed to compile mod_kit v0.2.5 (/data/user/home/mbansal/local/modkit), intermediate artifacts can be found at /home/mbansal/.cargo/.
To reuse those artifacts with a future compilation, set the environment variable CARGO_TARGET_DIR to that path.

@ArtRand
Copy link
Contributor

ArtRand commented Feb 16, 2024

Hello @vetmohit89,

From a quick internet search it looks like openssl has some system dependencies that you're missing. This thread might be helpful to pull on. Have you tried using the pre-compiled release binaries? Given that this problem stems from one of the build dependencies and not modkit itself, how do you feel about raising the issue in rust-openssl instead?

@vetmohit89
Copy link
Author

vetmohit89 commented Feb 16, 2024

These are the commands I followed to fix this issue:

module reset
module load Perl/5.36.1-GCCcore-12.3.0
module load CMake/3.26.4-GCCcore-13.1.0
cd modkit
cargo install --git https://github.com/nanoporetech/modkit.git

Thank you
Mohit

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