[
https://issues.apache.org/jira/browse/HDFS-16654?focusedWorklogId=789124&page=com.atlassian.jira.plugin.system.issuetabpanels:worklog-tabpanel#worklog-789124
]
ASF GitHub Bot logged work on HDFS-16654:
-----------------------------------------
Author: ASF GitHub Bot
Created on: 08/Jul/22 18:19
Start Date: 08/Jul/22 18:19
Worklog Time Spent: 10m
Work Description: GauthamBanasandra opened a new pull request, #4538:
URL: https://github.com/apache/hadoop/pull/4538
<!--
Thanks for sending a pull request!
1. If this is your first time, please read our contributor guidelines:
https://cwiki.apache.org/confluence/display/HADOOP/How+To+Contribute
2. Make sure your PR title starts with JIRA issue id, e.g.,
'HADOOP-17799. Your PR title ...'.
-->
### Description of PR
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
This check compiles but fails while linking on Windows -
```
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; }
```
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.
### How was this patch tested?
### For code changes:
- [ ] Does the title or this PR starts with the corresponding JIRA issue id
(e.g. 'HADOOP-17799. Your PR title ...')?
- [ ] Object storage: have the integration tests been executed and the
endpoint declared according to the connector-specific documentation?
- [ ] If adding new dependencies to the code, are these dependencies
licensed in a way that is compatible for inclusion under [ASF
2.0](http://www.apache.org/legal/resolved.html#category-a)?
- [ ] If applicable, have you updated the `LICENSE`, `LICENSE-binary`,
`NOTICE-binary` files?
Issue Time Tracking
-------------------
Worklog Id: (was: 789124)
Remaining Estimate: 0h
Time Spent: 10m
> 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
> Time Spent: 10m
> 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: [email protected]
For additional commands, e-mail: [email protected]