You are viewing a plain text version of this content. The canonical link for it is here.
Posted to hdfs-issues@hadoop.apache.org by "ASF GitHub Bot (Jira)" <ji...@apache.org> on 2022/12/10 22:23:00 UTC

[jira] [Commented] (HDFS-16654) Link OpenSSL lib for CMake deps check

    [ https://issues.apache.org/jira/browse/HDFS-16654?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17645687#comment-17645687 ] 

ASF GitHub Bot commented on HDFS-16654:
---------------------------------------

FahaoTang commented on PR #4538:
URL: https://github.com/apache/hadoop/pull/4538#issuecomment-1345397392

   I think the existing check (not related to this PR) might be wrong:
   ```
   check_c_source_compiles("#include <openssl/evp.h>\nint main(int argc, char **argv) { return !EVP_aes_256_ctr; }" HAS_NEW_ENOUGH_OPENSSL)
   ```
   
   I'm using the latest Open SSL (3.0.7) which does have the definition of EVP_aes_256_ctr but cannot pass on this check when building this native HDFS library on Windows:
   https://github.com/openssl/openssl/blob/33290c534750f031cbf384f0ad8c05555a16f726/include/openssl/evp.h#L1053
   
   It gives me the error of saying Open SSL is too old which is clearly not the case. 
   
   




> Link OpenSSL lib for CMake deps check
> -------------------------------------
>
>                 Key: HDFS-16654
>                 URL: https://issues.apache.org/jira/browse/HDFS-16654
>             Project: Hadoop HDFS
>          Issue Type: Bug
>          Components: libhdfs++
>    Affects Versions: 3.4.0
>         Environment: Windows 10
>            Reporter: Gautham Banasandra
>            Assignee: Gautham Banasandra
>            Priority: Major
>              Labels: libhdfscpp, pull-request-available
>             Fix For: 3.4.0
>
>          Time Spent: 2h
>  Remaining Estimate: 0h
>
> CMake checks whether the required components of OpenSSL are available prior to building HDFS native client - https://github.com/apache/hadoop/blob/fac895828f714b5587b57900d588acac69880c1e/hadoop-hdfs-project/hadoop-hdfs-native-client/src/CMakeLists.txt#L130
> {code}
> 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)
> {code}
> This check compiles but fails while linking on Windows -
> {code}
> src.obj : error LNK2019: unresolved external symbol EVP_aes_256_ctr referenced in function main [H:\hadoop-hdfs-project\hadoop-hdfs-native-client\src\out\build\x64-Debug\CMakeFiles\CMakeTmp\cmTC_e391b.vcxproj]
> H:\hadoop-hdfs-project\hadoop-hdfs-native-client\src\out\build\x64-Debug\CMakeFiles\CMakeTmp\Debug\cmTC_e391b.exe : fatal error LNK1120: 1 unresolved externals [H:\hadoop-hdfs-project\hadoop-hdfs-native-client\src\out\build\x64-Debug\CMakeFiles\CMakeTmp\cmTC_e391b.vcxproj]
> Source file was:
> #include <openssl/evp.h>
> int main(int argc, char **argv) { return !EVP_aes_256_ctr; }
> {code}
> Thus, we need to link to the OpenSSL library prior to running this check. Please note that this check doesn't fail on Linux since CMake is able to pick it up from the standard location where libs are installed.



--
This message was sent by Atlassian Jira
(v8.20.10#820010)

---------------------------------------------------------------------
To unsubscribe, e-mail: hdfs-issues-unsubscribe@hadoop.apache.org
For additional commands, e-mail: hdfs-issues-help@hadoop.apache.org