GauthamBanasandra commented on code in PR #4538:
URL: https://github.com/apache/hadoop/pull/4538#discussion_r918125982
##########
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)
Review Comment:
@iwasakims the `OPENSSSL_INCLUDE_DIR` is specified by setting
`CMAKE_REQUIRED_INCLUDES` prior to invoking the `check_c_source_compiles`
command.
https://github.com/apache/hadoop/blob/4e8c0b902ec199af66dad60c454e16cc2114985a/hadoop-hdfs-project/hadoop-hdfs-native-client/src/CMakeLists.txt#L129
As per the [CMake
documentation](https://cmake.org/cmake/help/v3.19/module/CheckCSourceCompiles.html),
> A
[;-list](https://cmake.org/cmake/help/v3.19/manual/cmake-language.7.html#cmake-language-lists)
of header search paths to pass to the compiler. These will be the only header
search paths used by try_compile(), i.e. the contents of the
[INCLUDE_DIRECTORIES](https://cmake.org/cmake/help/v3.19/prop_dir/INCLUDE_DIRECTORIES.html#prop_dir:INCLUDE_DIRECTORIES)
directory property will be ignored.
The `OPENSSL_INCLUDE_DIR` is derived from `CUSTOM_OPENSSL_INCLUDE` -
https://github.com/apache/hadoop/blob/4e8c0b902ec199af66dad60c454e16cc2114985a/hadoop-hdfs-project/hadoop-hdfs-native-client/src/CMakeLists.txt#L119-L122
Thus, this PR shouldn't affect the ability to use custom OpenSSL library.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]