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

ASF GitHub Bot commented on HADOOP-19611:
-----------------------------------------

MikaelSmith opened a new pull request, #7789:
URL: https://github.com/apache/hadoop/pull/7789

   ### Description of PR
   
   On SLES 15, failing to add tirpc results in failures linking pthreads. tirpc 
is present and appears and the newer RPC library option (with support for 
IPv6). Use it when available.
   
   ### How was this patch tested?
   
   Builds on RHEL 8, RHEL 9, Ubuntu 22, and SLES 15.
   
   ### For code changes:
   
   - [ ] Does the title or this PR starts with the corresponding JIRA issue id 
(e.g. 'HADOOP-17799. Your PR title ...')?
   - [ ] Object storage: have the integration tests been executed and the 
endpoint declared according to the connector-specific documentation?
   - [ ] If adding new dependencies to the code, are these dependencies 
licensed in a way that is compatible for inclusion under [ASF 
2.0](http://www.apache.org/legal/resolved.html#category-a)?
   - [ ] If applicable, have you updated the `LICENSE`, `LICENSE-binary`, 
`NOTICE-binary` files?
   
   




> 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
>
> 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-issues-unsubscr...@hadoop.apache.org
For additional commands, e-mail: common-issues-h...@hadoop.apache.org

Reply via email to