[
https://issues.apache.org/jira/browse/HADOOP-18583?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17651787#comment-17651787
]
ASF GitHub Bot commented on HADOOP-18583:
-----------------------------------------
steveloughran commented on code in PR #5256:
URL: https://github.com/apache/hadoop/pull/5256#discussion_r1056819287
##########
hadoop-common-project/hadoop-common/src/main/native/src/org/apache/hadoop/crypto/OpensslCipher.c:
##########
@@ -35,8 +35,14 @@ static void (*dlsym_EVP_CIPHER_CTX_init)(EVP_CIPHER_CTX *);
#endif
static int (*dlsym_EVP_CIPHER_CTX_set_padding)(EVP_CIPHER_CTX *, int);
static int (*dlsym_EVP_CIPHER_CTX_test_flags)(const EVP_CIPHER_CTX *, int);
+#if OPENSSL_VERSION_NUMBER >= 0x30000000L
Review Comment:
1. how about adding a comment to say "the names were changed so the probes
have to change their type.
2. do the actual typedefs need to be made exclusive? can see that if the
actual typedef name was being recycled, but here they are being given new names
##########
hadoop-common-project/hadoop-common/src/main/native/src/org/apache/hadoop/crypto/OpensslCipher.c:
##########
@@ -207,10 +233,20 @@ JNIEXPORT void JNICALL
Java_org_apache_hadoop_crypto_OpensslCipher_initIDs
LOAD_DYNAMIC_SYMBOL(__dlsym_EVP_CIPHER_CTX_test_flags, \
dlsym_EVP_CIPHER_CTX_test_flags, env, \
openssl, "EVP_CIPHER_CTX_test_flags");
+#if OPENSSL_VERSION_NUMBER >= 0x30000000L
Review Comment:
these are all static...the probes need to be compiled for openssl 2 vs 3. do
we need this, or can it just look for either sets of symbols and be happy?
> hadoop checknative fails to load openssl 3.x
> --------------------------------------------
>
> Key: HADOOP-18583
> URL: https://issues.apache.org/jira/browse/HADOOP-18583
> Project: Hadoop Common
> Issue Type: Bug
> Components: native
> Affects Versions: 3.3.4
> Reporter: Sebastian Klemke
> Priority: Major
> Labels: pull-request-available
> Attachments: 100-hadoop-3.3.4-openssl-3.patch
>
>
> After building Hadoop 3.3.4 from source on Ubuntu 22.04, `hadoop checknative`
> reports
> {code:java}
> $ hadoop checknative
> 2022-12-21 22:12:02,106 INFO bzip2.Bzip2Factory: Successfully loaded &
> initialized native-bzip2 library system-native
> 2022-12-21 22:12:02,107 INFO zlib.ZlibFactory: Successfully loaded &
> initialized native-zlib library
> 2022-12-21 22:12:02,130 INFO nativeio.NativeIO: The native code was built
> without PMDK support.
> Native library checking:
> hadoop: true /hadoop/lib/native/libhadoop.so.1.0.0
> zlib: true /lib/x86_64-linux-gnu/libz.so.1
> zstd : true /lib/x86_64-linux-gnu/libzstd.so.1
> bzip2: true /lib/x86_64-linux-gnu/libbz2.so.1
> openssl: false EVP_CIPHER_CTX_block_size
> ISA-L: true /lib/x86_64-linux-gnu/libisal.so.2
> PMDK: false The native code was built without PMDK support.{code}
> The issue seems to be at least two symbols that were removed from ABI in
> OpenSSL 3.x releases:
> * EVP_CIPHER_CTX_block_size (new name: EVP_CIPHER_CTX_get_block_size)
> * EVP_CIPHER_CTX_encrypting (new name: EVP_CIPHER_CTX_is_encrypting)
> The attached patch [^100-hadoop-3.3.4-openssl-3.patch] works around the issue.
--
This message was sent by Atlassian Jira
(v8.20.10#820010)
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]