Michael Smith created HADOOP-19611: -------------------------------------- Summary: Native profile fails to build on SLES 15 Key: HADOOP-19611 URL: https://issues.apache.org/jira/browse/HADOOP-19611 Project: Hadoop Common Issue Type: Bug Components: tools/pipes Affects Versions: 3.4.1 Reporter: Michael Smith
Hadoop build fails to find pthreads on SLES 15 builds while linking rpc. It looks like it checks for SunRPC library via rpc/rpc.h, but instead finds tirpc and sets it up incorrectly. {code} Performing C SOURCE FILE Test CMAKE_HAVE_LIBC_PTHREAD failed with the following output: Change Dir: /grid/0/jenkins/workspace/workspace/CDH-parallel-sles15/SOURCES/hadoop/hadoop-tools/hadoop-pipes/target/native/CMakeFiles/CMakeTmp Run Build Command(s):/usr/bin/gmake cmTC_4ddc0/fast && /usr/bin/gmake -f CMakeFiles/cmTC_4ddc0.dir/build.make CMakeFiles/cmTC_4ddc0.dir/build gmake[1]: Entering directory '/grid/0/jenkins/workspace/workspace/CDH-parallel-sles15/SOURCES/hadoop/hadoop-tools/hadoop-pipes/target/native/CMakeFiles/CMakeTmp' Building C object CMakeFiles/cmTC_4ddc0.dir/src.c.o /usr/bin/gcc-8 -DCMAKE_HAVE_LIBC_PTHREAD -o CMakeFiles/cmTC_4ddc0.dir/src.c.o -c /grid/0/jenkins/workspace/workspace/CDH-parallel-sles15/SOURCES/hadoop/hadoop-tools/hadoop-pipes/target/native/CMakeFiles/CMakeTmp/src.c Linking C executable cmTC_4ddc0 /grid/0/jenkins/tools/cmake/3.19.3/bin/cmake -E cmake_link_script CMakeFiles/cmTC_4ddc0.dir/link.txt --verbose=1 /usr/bin/gcc-8 -rdynamic CMakeFiles/cmTC_4ddc0.dir/src.c.o -o cmTC_4ddc0 /usr/lib64/gcc/x86_64-suse-linux/8/../../../../x86_64-suse-linux/bin/ld: CMakeFiles/cmTC_4ddc0.dir/src.c.o: in function `main': src.c:(.text+0x2d): undefined reference to `pthread_create' /usr/lib64/gcc/x86_64-suse-linux/8/../../../../x86_64-suse-linux/bin/ld: src.c:(.text+0x39): undefined reference to `pthread_detach' /usr/lib64/gcc/x86_64-suse-linux/8/../../../../x86_64-suse-linux/bin/ld: src.c:(.text+0x45): undefined reference to `pthread_cancel' /usr/lib64/gcc/x86_64-suse-linux/8/../../../../x86_64-suse-linux/bin/ld: src.c:(.text+0x56): undefined reference to `pthread_join' collect2: error: ld returned 1 exit status gmake[1]: *** [CMakeFiles/cmTC_4ddc0.dir/build.make:106: cmTC_4ddc0] Error 1 gmake[1]: Leaving directory '/grid/0/jenkins/workspace/workspace/CDH-parallel-sles15/SOURCES/hadoop/hadoop-tools/hadoop-pipes/target/native/CMakeFiles/CMakeTmp' gmake: *** [Makefile:140: cmTC_4ddc0/fast] Error 2 {code} There are two possible fixes here: # Link with pthreads to fix the undefined references. # We noticed RHEL 8 uses tirpc. Using that on SLES 15 also fixes the issue. As tirpc seems to be newer and supports IPv6, it seems like we should prefer tirpc if it's available. Attached a patch that works across a variety of platforms for me. -- This message was sent by Atlassian Jira (v8.20.10#820010) --------------------------------------------------------------------- To unsubscribe, e-mail: common-dev-unsubscr...@hadoop.apache.org For additional commands, e-mail: common-dev-h...@hadoop.apache.org