[
https://issues.apache.org/jira/browse/HADOOP-19611?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=18010021#comment-18010021
]
ASF GitHub Bot commented on HADOOP-19611:
-----------------------------------------
MikaelSmith commented on PR #7789:
URL: https://github.com/apache/hadoop/pull/7789#issuecomment-3119813754
We've built and tested this on RedHat 8 (ARM and x86_64), RedHat 9, SLES 15,
Ubuntu 20, and Ubuntu 22. Ran extensive tests on RedHat 8 and 9.
Conceptually I think it makes sense to use tirpc if it's available. Part of
the problem we observed was that on SLES 15, it detected rpc.h but that came
from tirpc, so the build was not configured correctly.
> 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
> Priority: Major
> Labels: pull-request-available
>
> 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: [email protected]
For additional commands, e-mail: [email protected]