Reputation: 921
I'm trying to build Hadoop 3.0.3 on Fedora 28. When the build gets to building Apache Hadoop Pipes the build stops with the error:
[WARNING] /home/hadoop/tool/hadoop-3.0.3-src/hadoop-tools/hadoop-pipes/src/main/native/utils/impl/SerialUtils.cc:22:10: fatal error: rpc/types.h: No such file or directory
I understand that Fedora 28 removed Sun RPC and was replaced by libtirpc.
I tried instructing maven gcc to build using the libtirrpc using the following commands:
1) Specifying CFLAGS
$ export CFLAGS=-I/usr/include/tirpc
$ mvn package -Pdist,native -DskipTests -Dtar -Drequire.isal
2) Using container-executor.additional_cflags
$ mvn package -Pdist,native -DskipTests -Dtar -Drequire.isal -Dcontainer-executor.additional_cflags="-I/usr/include/tirpc"
Unfortunately I always get the same error.
What am I doing wrong? I would greatly appreciate any suggestions of how to solve this problem.
Kind regards
Jean
Upvotes: 0
Views: 399
Reputation: 491
Use LDFLAGS to tell linker to use libtirpc:
export CXXFLAGS="-I/usr/include/tirpc"
export LDFLAGS="-ltirpc"
It works for me to compile hadoop3.1.
Upvotes: 0
Reputation: 1
I've encountered the same issue and resolved it by adding tirpc to required libraries and also the include paths at CMakefiles.
Sorry, I don't know why your approach is not working, but A workable "patch" can be found here: https://issues.apache.org/jira/browse/HADOOP-15685
p.s.: a right fix for this should be check rpc path and conditionally add tirpc path, like https://github.com/gnudatalanguage/gdl/pull/338/commits/86837a0038be8c72d5b7b9691f1deff5c6691744 and a more hadoop style way of fixing this can refer to other hadoop module CMakefiles
Upvotes: 0