[
https://issues.apache.org/jira/browse/HDFS-16736?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17585326#comment-17585326
]
ASF GitHub Bot commented on HDFS-16736:
---------------------------------------
GauthamBanasandra commented on code in PR #4782:
URL: https://github.com/apache/hadoop/pull/4782#discussion_r955971687
##########
hadoop-hdfs-project/hadoop-hdfs-native-client/src/main/native/libhdfspp/CMakeLists.txt:
##########
@@ -28,7 +28,7 @@ project (libhdfspp)
cmake_minimum_required(VERSION 2.8)
-find_package (Boost 1.72.0 REQUIRED)
+find_package (Boost 1.72.0 REQUIRED COMPONENTS date_time)
Review Comment:
> I'd like to avoid setting this in 4 places.
I've now removed the redundant calls to `find_package(Boost ...)`. I'm
calling it only in the main `CMakeLists.txt` now.
##########
hadoop-hdfs-project/hadoop-hdfs-native-client/src/main/native/libhdfspp/CMakeLists.txt:
##########
@@ -28,7 +28,7 @@ project (libhdfspp)
cmake_minimum_required(VERSION 2.8)
-find_package (Boost 1.72.0 REQUIRED)
+find_package (Boost 1.72.0 REQUIRED COMPONENTS date_time)
Review Comment:
> I'd like to avoid setting this in 4 places.
I've now removed the redundant calls to `find_package(Boost ...)`. I'm
calling it only in the main `CMakeLists.txt` now.
> Link to Boost library in libhdfspp
> ----------------------------------
>
> Key: HDFS-16736
> URL: https://issues.apache.org/jira/browse/HDFS-16736
> 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
>
> The compilation of HDFS Native Client fails on Windows 10 due to the
> following error -
> {code}
> [exec]
> "H:\hadoop-hdfs-project\hadoop-hdfs-native-client\target\native\main\native\libhdfspp\tests\logging_test.vcxproj"
> (default target) (105) ->
> [exec] rpc.lib(rpc_engine.obj) : error LNK2019: unresolved external symbol
> "__declspec(dllimport) public: __cdecl
> boost::gregorian::greg_month::greg_month(unsigned short)"
> (__imp_??0greg_month@gregorian@boost@@QEAA@G@Z) referenced in function
> "private: static class boost::posix_time::ptime __cdecl
> boost::date_time::microsec_clock<class
> boost::posix_time::ptime>::create_time(struct tm * (__cdecl*)(__int64 const
> *,struct tm *))"
> (?create_time@?$microsec_clock@Vptime@posix_time@boost@@@date_time@boost@@CA?AVptime@posix_time@3@P6APEAUtm@@PEB_JPEAU6@@Z@Z)
>
> [H:\hadoop-hdfs-project\hadoop-hdfs-native-client\target\native\main\native\libhdfspp\tests\logging_test.vcxproj]
> [exec] rpc.lib(request.obj) : error LNK2001: unresolved external symbol
> "__declspec(dllimport) public: __cdecl
> boost::gregorian::greg_month::greg_month(unsigned short)"
> (__imp_??0greg_month@gregorian@boost@@QEAA@G@Z)
> [H:\hadoop-hdfs-project\hadoop-hdfs-native-client\target\native\main\native\libhdfspp\tests\logging_test.vcxproj]
> [exec]
> H:\hadoop-hdfs-project\hadoop-hdfs-native-client\target\native\main\native\libhdfspp\tests\RelWithDebInfo\logging_test.exe
> : fatal error LNK1120: 1 unresolved externals
> [H:\hadoop-hdfs-project\hadoop-hdfs-native-client\target\native\main\native\libhdfspp\tests\logging_test.vcxproj]
> {code}
> Thus, we need to link against the Boost library to resolve this error.
--
This message was sent by Atlassian Jira
(v8.20.10#820010)
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]