You are viewing a plain text version of this content. The canonical link for it is here.
Posted to yarn-issues@hadoop.apache.org by "Wei-Chiu Chuang (JIRA)" <ji...@apache.org> on 2019/04/16 17:38:00 UTC

[jira] [Commented] (YARN-9487) NodeManager native build shouldn't link against librt on macOS

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

Wei-Chiu Chuang commented on YARN-9487:
---------------------------------------

+1

 

I think it'll also be useful if you could update the instruction for building Hadoop native lib on Mac.

> NodeManager native build shouldn't link against librt on macOS
> --------------------------------------------------------------
>
>                 Key: YARN-9487
>                 URL: https://issues.apache.org/jira/browse/YARN-9487
>             Project: Hadoop YARN
>          Issue Type: Bug
>          Components: nodemanager
>    Affects Versions: 3.2.0, 3.3.0
>         Environment: Darwin 18.5.0 Darwin Kernel Version 18.5.0: Mon Mar 11 20:40:32 PDT 2019; root:xnu-4903.251.3~3/RELEASE_X86_64 x86_64
> Apple LLVM version 10.0.1 (clang-1001.0.46.3)
>            Reporter: Siyao Meng
>            Assignee: Siyao Meng
>            Priority: Major
>         Attachments: YARN-9487.001.patch
>
>
> I'm compiling hadoop/trunk native on a Mac. Found that when compiling NodeManager it is trying to link against librt on Darwin as well - and it failed for sure. Diff for a quick fix:
> {code}
> diff --git a/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-server/hadoop-yarn-server-nodemanager/src/CMakeLists.txt b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-server/hadoop-yarn-server-nodemanager/src/CMakeLists.txt
> index f0f005d53b5..9c3f0135aaf 100644
> --- a/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-server/hadoop-yarn-server-nodemanager/src/CMakeLists.txt
> +++ b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-server/hadoop-yarn-server-nodemanager/src/CMakeLists.txt
> @@ -190,5 +190,10 @@ add_executable(test-oom-listener
>          main/native/oom-listener/impl/oom_listener.h
>          main/native/oom-listener/test/oom_listener_test_main.cc
>  )
> -target_link_libraries(test-oom-listener gtest rt)
> +if(CMAKE_SYSTEM_NAME MATCHES "Darwin")
> +    # macOS does not have rt
> +    target_link_libraries(test-oom-listener gtest)
> +else()
> +    target_link_libraries(test-oom-listener gtest rt)
> +endif()
>  output_directory(test-oom-listener test)
> {code}
> This line of code is added in YARN-8437, so this affects 3.2.0+.



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)

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