This is an automated email from the ASF dual-hosted git repository.

gaurava pushed a commit to branch trunk
in repository https://gitbox.apache.org/repos/asf/hadoop.git


The following commit(s) were added to refs/heads/trunk by this push:
     new 440f4c2b285 HDFS-16654. Link OpenSSL lib for CMake deps check (#4538)
440f4c2b285 is described below

commit 440f4c2b28515d2007b81ac00b549bbf14fa9f64
Author: Gautham B A <gautham.bangal...@gmail.com>
AuthorDate: Sun Jul 17 20:47:30 2022 +0530

    HDFS-16654. Link OpenSSL lib for CMake deps check (#4538)
    
    * The check_c_source_compiles fails on Windows
      while linking with an "unable to resolve
      external symbol" error.
    * This PR links OpenSSL lib for this check to
      fix this issue.
---
 hadoop-hdfs-project/hadoop-hdfs-native-client/src/CMakeLists.txt | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/hadoop-hdfs-project/hadoop-hdfs-native-client/src/CMakeLists.txt 
b/hadoop-hdfs-project/hadoop-hdfs-native-client/src/CMakeLists.txt
index 1e8a689e0c7..8522fc8b927 100644
--- a/hadoop-hdfs-project/hadoop-hdfs-native-client/src/CMakeLists.txt
+++ b/hadoop-hdfs-project/hadoop-hdfs-native-client/src/CMakeLists.txt
@@ -127,7 +127,8 @@ if(OPENSSL_LIBRARY AND OPENSSL_INCLUDE_DIR)
     include(CheckCSourceCompiles)
     set(OLD_CMAKE_REQUIRED_INCLUDES ${CMAKE_REQUIRED_INCLUDES})
     set(CMAKE_REQUIRED_INCLUDES ${OPENSSL_INCLUDE_DIR})
-    check_c_source_compiles("#include 
\"${OPENSSL_INCLUDE_DIR}/openssl/evp.h\"\nint main(int argc, char **argv) { 
return !EVP_aes_256_ctr; }" HAS_NEW_ENOUGH_OPENSSL)
+    set(CMAKE_REQUIRED_LIBRARIES ${OPENSSL_LIBRARY})
+    check_c_source_compiles("#include <openssl/evp.h>\nint main(int argc, char 
**argv) { return !EVP_aes_256_ctr; }" HAS_NEW_ENOUGH_OPENSSL)
     set(CMAKE_REQUIRED_INCLUDES ${OLD_CMAKE_REQUIRED_INCLUDES})
     if(NOT HAS_NEW_ENOUGH_OPENSSL)
         message("The OpenSSL library installed at ${OPENSSL_LIBRARY} is too 
old.  You need a version at least new enough to have EVP_aes_256_ctr.")


---------------------------------------------------------------------
To unsubscribe, e-mail: common-commits-unsubscr...@hadoop.apache.org
For additional commands, e-mail: common-commits-h...@hadoop.apache.org

Reply via email to