cloudflare / pingora

A library for building fast, reliable and evolvable network services.
Apache License 2.0
20.25k stars 1.1k forks source link

Compilation Error Due to Dependency Issue with OpenSSL on CentOS 7 #254

Open Maydisease opened 1 month ago

Maydisease commented 1 month ago

[root@localhost openssl-3.2.0]# cat /etc/os-release NAME="CentOS Linux" VERSION="7 (Core)"

========================================================

Compiling openssl-sys v0.9.102 Compiling tokio-rustls v0.24.1 Compiling encoding_rs v0.8.34 Compiling indexmap v1.9.3 Compiling memoffset v0.6.5 Compiling protobuf v2.28.0 Compiling mime v0.3.17 Compiling base64 v0.21.7 Compiling ipnet v2.9.0 Compiling tokio-openssl v0.6.4 Compiling arrayvec v0.7.4 Compiling unicode-width v0.1.12 Compiling sync_wrapper v0.1.2 Compiling bitflags v1.3.2 Compiling alloc-no-stdlib v2.0.4 Compiling unicode-segmentation v1.11.0 Compiling rust_decimal v1.35.0 Compiling textwrap v0.11.0 Compiling hyper-rustls v0.24.2 Compiling trackable v1.3.0 Compiling alloc-stdlib v0.2.2 error: failed to run custom build command for openssl-sys v0.9.102

Caused by: process didn't exit successfully: /home/workspace/proxy-service-inst/target/release/build/openssl-sys-dfa491e788020866/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=CC_ENABLE_DEBUG_OUTPUT 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/workspace/proxy-service-inst/target/release/build/openssl-sys-fc961b2f031d2a14/out/openssl-build/build/src" && env -u CROSS_COMPILE AR="ar" CC="cc" RANLIB="ranlib" "perl" "./Configure" "--prefix=/home/workspace/proxy-service-inst/target/release/build/openssl-sys-fc961b2f031d2a14/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: /home/workspace/proxy-service-inst/target/release/build/openssl-sys-fc961b2f031d2a14/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 . /home/workspace/proxy-service-inst/target/release/build/openssl-sys-fc961b2f031d2a14/out/openssl-build/build/src/external/perl/Text-Template-1.56/lib) at /home/workspace/proxy-service-inst/target/release/build/openssl-sys-fc961b2f031d2a14/out/openssl-build/build/src/util/perl/OpenSSL/config.pm line 19. BEGIN failed--compilation aborted at /home/workspace/proxy-service-inst/target/release/build/openssl-sys-fc961b2f031d2a14/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 /root/.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/workspace/proxy-service-inst/target/release/build/openssl-sys-fc961b2f031d2a14/out/openssl-build/build/src" && env -u CROSS_COMPILE AR="ar" CC="cc" RANLIB="ranlib" "perl" "./Configure" "--prefix=/home/workspace/proxy-service-inst/target/release/build/openssl-sys-fc961b2f031d2a14/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" Exit status: exit status: 2

note: run with RUST_BACKTRACE=1 environment variable to display a backtrace warning: build failed, waiting for other jobs to finish...

========================================================================================

I encountered a compilation error because the default OpenSSL version on my CentOS 7 system is 1.0.2. I checked the dependency tree and found that pingora-core depends on pingora-openssl, which in turn depends on openssl-sys v0.9.102.

How can I find the appropriate version? What steps should I take to resolve this issue?

eaufavor commented 1 month ago

I think this issue is https://github.com/sfackler/rust-openssl/issues/1550

JosiahParry commented 1 week ago

its worth noting that centos 7 reaches EOL in one week