when do this step
make PREFIX=/usr USE_SYSTEMD=yes MALLOC=jemalloc V=1 BUILD_TLS=yes install
/opt/rh/devtoolset-9/root/usr/libexec/gcc/x86_64-redhat-linux/9/ld: ../deps/hiredis/libhiredis_ssl.a(ssl.o): in function redisInitOpenSSL':
/opt/redis-6.2.6/deps/hiredis/ssl.c:158: undefined reference toSSL_library_init'
/opt/rh/devtoolset-9/root/usr/libexec/gcc/x86_64-redhat-linux/9/ld: tls.o: in function tlsInit':
/opt/redis-6.2.6/src/tls.c:154: undefined reference toERR_load_crypto_strings'
/opt/rh/devtoolset-9/root/usr/libexec/gcc/x86_64-redhat-linux/9/ld: /opt/redis-6.2.6/src/tls.c:155: undefined reference to SSL_load_error_strings'
/opt/rh/devtoolset-9/root/usr/libexec/gcc/x86_64-redhat-linux/9/ld: /opt/redis-6.2.6/src/tls.c:156: undefined reference toSSL_library_init'
collect2: error: ld returned 1 exit status
make[1]: *** [redis-server] Error 1
make[1]: Leaving directory `/opt/redis-6.2.6/src'
make: *** [install] Error 2
system openssl version is : openssl version OpenSSL 3.0.1 14 Dec 2021 (Library: OpenSSL 3.0.1 14 Dec 2021)
Comment From: filipecosta90
@spacexnasa according to openssl docs:
The SSL_library_init() and OpenSSL_add_ssl_algorithms() functions were deprecated in OpenSSL 1.1.0 by OPENSSL_init_ssl().
However, checking openssl code, SSL_library_init() is only missing when OPENSSL_NO_DEPRECATED_1_1_0 is defined, as confirmed on 3.0 code https://github.com/openssl/openssl/blob/openssl-3.0/include/openssl/ssl.h.in#L2021
Is that the case?
Nonetheless IMHO we should use the OPENSSL_init_ssl when we detect newer versions of opensll. agree @yossigo @oranagra ?
Comment From: yossigo
@filipecosta90 I think it's simply not needed on newer versions of OpenSSL, but for 3.0.x I had to change a few other things as well. @spacexnasa As @filipecosta90 mentioned, this issue seems to be related to a specific OpenSSL configuration. Can you provide more information on what OS / toolchain you've used to help us reproduce this?
Update: #10291 should solve this, looking for some feedback on different platforms (confirmed on Ubuntu 22.04 nightly build).
Comment From: spacexnasa
on centos 7.9,now can worked,thanks for your effort