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

Ayush Saxena commented on YARN-8498:
------------------------------------

Thanx everyone for the discussion!!

Faced the same issue in 18.04

First one


{noformat}
[WARNING] 
CMakeFiles/oom-listener.dir/main/native/oom-listener/impl/oom_listener_main.c.o:
 In function `main':
[WARNING] 
/home/ayush/hadoop/trunk/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-server/hadoop-yarn-server-nodemanager/src/main/native/oom-listener/impl/oom_listener_main.c:89:
 undefined reference to `cleanup'
{noformat}

Second one 


{noformat}
[WARNING] 
/home/ayush/hadoop/trunk/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-server/hadoop-yarn-server-nodemanager/src/main/native/oom-listener/test/oom_listener_test_main.cc:
 In member function ‘virtual void OOMListenerTest_test_oom_Test::TestBody()’:
[WARNING] 
/home/ayush/hadoop/trunk/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
[WARNING]        __WAIT_STATUS mem_hog_status = {};
[WARNING]        ^~~~~~~~~~~~~
[WARNING] 
/home/ayush/hadoop/trunk/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:
 note: suggested alternative: ‘__WEXITSTATUS’
[WARNING]        __WAIT_STATUS mem_hog_status = {};
[WARNING]        ^~~~~~~~~~~~~
[WARNING]        __WEXITSTATUS
[WARNING] 
/home/ayush/hadoop/trunk/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
[WARNING]        __pid_t exited0 = wait(mem_hog_status);
[WARNING]                               ^~~~~~~~~~~~~~
[WARNING] 
/home/ayush/hadoop/trunk/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:
 note: suggested alternative: ‘mem_hog_pid’
[WARNING]        __pid_t exited0 = wait(mem_hog_status);
[WARNING]                               ^~~~~~~~~~~~~~
[WARNING]                               mem_hog_pid
[WARNING] 
/home/ayush/hadoop/trunk/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’
[WARNING]        __WAIT_STATUS oom_listener_status = {};
[WARNING]                      ^~~~~~~~~~~~~~~~~~~
[WARNING] 
/home/ayush/hadoop/trunk/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
[WARNING]        __pid_t exited1 = wait(oom_listener_status);
[WARNING]                               ^~~~~~~~~~~~~~~~~~~
[WARNING] 
/home/ayush/hadoop/trunk/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:
 note: suggested alternative: ‘oom_listener’
[WARNING]        __pid_t exited1 = wait(oom_listener_status);
[WARNING]                               ^~~~~~~~~~~~~~~~~~~
[WARNING]                               oom_listener
[WARNING] make[2]: *** 
[CMakeFiles/test-oom-listener.dir/main/native/oom-listener/test/oom_listener_test_main.cc.o]
 Error 1
[WARNING] make[1]: *** [CMakeFiles/test-oom-listener.dir/all] Error 2
[WARNING] make: *** [all] Error 2
{noformat}


Uploaded v1 with the fix.

References ::

For first one ::

Can give a check why extern is needed here.

https://stackoverflow.com/questions/26503235/c-inline-function-and-gcc


 For the second one :

The macro __WAIT_STATUS supposedly to be in stdlib header isn't there in 18.04 
but there in previous ones check ::

Present here

 
https://github.com/trailofbits/abigen/blob/master/data/platforms/ubuntu/14.04.5/usr/include/stdlib.h


But not here 

https://github.com/trailofbits/abigen/blob/master/data/platforms/ubuntu/18.04.1/usr/include/stdlib.h






> 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
>              Labels: trunk
>         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: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to