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

Qiyuan Gong commented on YARN-8498:
-----------------------------------

Facing the same 'cleanup' and '__WAIT_STATUS' errors in Fedora 27, when we 
tried to build Hadoop with native. However, the same code, the same building 
command works well on Ubuntu 16.04 and CentOS 7. 
 
I think this problem is caused by C and C++ code compatibility on high version 
gcc (gcc is version 7+ in Ubuntu 18 and Fedora 27, while version 5+ in Ubuntu 
16.04 and CentOS 7). According to 
[https://gcc.gnu.org/projects/cxx-status.html], gcc 5 and gcc 7 have lots of 
difference, such as inline 
([https://en.cppreference.com/w/cpp/language/inline]).
 
Solving this problem requires to make some changes in related C and C++ code, 
i.e., 'oom_listener_main.c' and 'oom_listener_test_main.cc', just like what you 
have done in this patch. I have tried your patch, it works for me (Fedora 27 
with gcc 7.3.1).

> Yarn NodeManager OOM Listener Fails Compilation on Ubuntu 18.04
> ---------------------------------------------------------------
>
>                 Key: YARN-8498
>                 URL: https://issues.apache.org/jira/browse/YARN-8498
>             Project: Hadoop YARN
>          Issue Type: Bug
>            Reporter: Jack Bearden
>            Priority: Blocker
>         Attachments: YARN-8948-01.patch
>
>
> While building this project, I ran into a few compilation errors here. The 
> first one was in this file:
> hadoop-yarn-project/hadoop-yarn/hadoop-yarn-server/hadoop-yarn-server-nodemanager/src/main/native/oom-listener/impl/oom_listener_main.c
> At the very end, during the compilation of the OOM test, it fails again:
>  
> hadoop-yarn-project/hadoop-yarn/hadoop-yarn-server/hadoop-yarn-server-nodemanager/src/main/native/oom-listener/test/oom_listener_test_main.cc
> hadoop-yarn-project/hadoop-yarn/hadoop-yarn-server/hadoop-yarn-server-nodemanager/src/main/native/oom-listener/test/oom_listener_test_main.cc:256:7:
>  error: ‘__WAIT_STATUS’ was not declared in this scope
>  __WAIT_STATUS mem_hog_status = {};
> hadoop-yarn-project/hadoop-yarn/hadoop-yarn-server/hadoop-yarn-server-nodemanager/src/main/native/oom-listener/test/oom_listener_test_main.cc:257:30:
>  error: ‘mem_hog_status’ was not declared in this scope
>  __pid_t exited0 = wait(mem_hog_status);
> hadoop-yarn-project/hadoop-yarn/hadoop-yarn-server/hadoop-yarn-server-nodemanager/src/main/native/oom-listener/test/oom_listener_test_main.cc:275:21:
>  error: expected ‘;’ before ‘oom_listener_status’
>  __WAIT_STATUS oom_listener_status = {};
> hadoop-yarn-project/hadoop-yarn/hadoop-yarn-server/hadoop-yarn-server-nodemanager/src/main/native/oom-listener/test/oom_listener_test_main.cc:276:30:
>  error: ‘oom_listener_status’ was not declared in this scope
>  __pid_t exited1 = wait(oom_listener_status);
>  



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

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

Reply via email to