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

Haibo Chen commented on YARN-8498:
----------------------------------

I have finally been able to setup a Ubuntu 18.04 machine to reproduce the error 
here.

But the compilation failed first with the following message, which is different 
from what [~jackbearden] reported. I could not decipher what the error message 
means. [~jackbearden] Did you see the undefined reference to "phread_create" 
too? 
{code:java}
Determining if the pthread_create exist failed with the following output:
Change Dir: 
/home/haibochen/Documents/hadoop/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-server/hadoop-yarn-server-nodemanager/target/native/CMakeFiles/CMakeTmp

Run Build Command:"/usr/bin/make" "cmTryCompileExec1732495724/fast"
/usr/bin/make -f CMakeFiles/cmTryCompileExec1732495724.dir/build.make 
CMakeFiles/cmTryCompileExec1732495724.dir/build
make[1]: Entering directory 
'/home/haibochen/Documents/hadoop/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-server/hadoop-yarn-server-nodemanager/target/native/CMakeFiles/CMakeTmp'
/home/haibochen/Documents/software/cmake-3.1.0-Linux-x86_64/bin/cmake -E 
cmake_progress_report 
/home/haibochen/Documents/hadoop/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-server/hadoop-yarn-server-nodemanager/target/native/CMakeFiles/CMakeTmp/CMakeFiles
 1
Building C object 
CMakeFiles/cmTryCompileExec1732495724.dir/CheckSymbolExists.c.o
/usr/bin/cc -o CMakeFiles/cmTryCompileExec1732495724.dir/CheckSymbolExists.c.o 
-c 
/home/haibochen/Documents/hadoop/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-server/hadoop-yarn-server-nodemanager/target/native/CMakeFiles/CMakeTmp/CheckSymbolExists.c
Linking C executable cmTryCompileExec1732495724
/home/haibochen/Documents/software/cmake-3.1.0-Linux-x86_64/bin/cmake -E 
cmake_link_script CMakeFiles/cmTryCompileExec1732495724.dir/link.txt --verbose=1
/usr/bin/cc CMakeFiles/cmTryCompileExec1732495724.dir/CheckSymbolExists.c.o -o 
cmTryCompileExec1732495724 -rdynamic
CMakeFiles/cmTryCompileExec1732495724.dir/CheckSymbolExists.c.o: In function 
`main':
CheckSymbolExists.c:(.text+0x1b): undefined reference to `pthread_create'
collect2: error: ld returned 1 exit status
CMakeFiles/cmTryCompileExec1732495724.dir/build.make:88: recipe for target 
'cmTryCompileExec1732495724' failed
make[1]: Leaving directory 
'/home/haibochen/Documents/hadoop/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-server/hadoop-yarn-server-nodemanager/target/native/CMakeFiles/CMakeTmp'
Makefile:118: recipe for target 'cmTryCompileExec1732495724/fast' failed
make[1]: *** [cmTryCompileExec1732495724] Error 1
make: *** [cmTryCompileExec1732495724/fast] Error 2

File 
/home/haibochen/Documents/hadoop/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-server/hadoop-yarn-server-nodemanager/target/native/CMakeFiles/CMakeTmp/CheckSymbolExists.c:
/* */
#include <pthread.h>

int main(int argc, char** argv)
{
(void)argv;
#ifndef pthread_create
return ((int*)(&pthread_create))[argc];
#else
(void)argc;
return 0;
#endif
}

Determining if the function pthread_create exists in the pthreads failed with 
the following output:
Change Dir: 
/home/haibochen/Documents/hadoop/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-server/hadoop-yarn-server-nodemanager/target/native/CMakeFiles/CMakeTmp

Run Build Command:"/usr/bin/make" "cmTryCompileExec1721675268/fast"
/usr/bin/make -f CMakeFiles/cmTryCompileExec1721675268.dir/build.make 
CMakeFiles/cmTryCompileExec1721675268.dir/build
make[1]: Entering directory 
'/home/haibochen/Documents/hadoop/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-server/hadoop-yarn-server-nodemanager/target/native/CMakeFiles/CMakeTmp'
/home/haibochen/Documents/software/cmake-3.1.0-Linux-x86_64/bin/cmake -E 
cmake_progress_report 
/home/haibochen/Documents/hadoop/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-server/hadoop-yarn-server-nodemanager/target/native/CMakeFiles/CMakeTmp/CMakeFiles
 1
Building C object 
CMakeFiles/cmTryCompileExec1721675268.dir/CheckFunctionExists.c.o
/usr/bin/cc -DCHECK_FUNCTION_EXISTS=pthread_create -o 
CMakeFiles/cmTryCompileExec1721675268.dir/CheckFunctionExists.c.o -c 
/home/haibochen/Documents/software/cmake-3.1.0-Linux-x86_64/share/cmake-3.1/Modules/CheckFunctionExists.c
Linking C executable cmTryCompileExec1721675268
/home/haibochen/Documents/software/cmake-3.1.0-Linux-x86_64/bin/cmake -E 
cmake_link_script CMakeFiles/cmTryCompileExec1721675268.dir/link.txt --verbose=1
/usr/bin/cc -DCHECK_FUNCTION_EXISTS=pthread_create 
CMakeFiles/cmTryCompileExec1721675268.dir/CheckFunctionExists.c.o -o 
cmTryCompileExec1721675268 -rdynamic -lpthreads
/usr/bin/x86_64-linux-gnu-ld: cannot find -lpthreads
collect2: error: ld returned 1 exit status
CMakeFiles/cmTryCompileExec1721675268.dir/build.make:88: recipe for target 
'cmTryCompileExec1721675268' failed
make[1]: Leaving directory 
'/home/haibochen/Documents/hadoop/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-server/hadoop-yarn-server-nodemanager/target/native/CMakeFiles/CMakeTmp'
Makefile:118: recipe for target 'cmTryCompileExec1721675268/fast' failed
make[1]: *** [cmTryCompileExec1721675268] Error 1
make: *** [cmTryCompileExec1721675268/fast] Error 2{code}

> 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
>
> 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