rpc/rpc.h missing - building dovecot for RHEL 8.1

Latest response

I am attempting to build the dovecot package from the source code provided for RHEL 8.1. All of the dependencies have been met for the build. While compiling I get the following error. I have queried yum to see what provided /usr/include/rpc/rpc.h and it didn't return any package. From my google searches other seem to have similar issues.

Does anyone know what RHEL package has rpc/rpc.h?

rquota_xdr.c:2:10: fatal error: rpc/rpc.h: No such file or directory
#include <rpc/rpc.h>
^~~~~~~~~~~
compilation terminated.
make[4]: *** [Makefile:763: rquota_xdr.lo] Error 1
make[4]: *** Waiting for unfinished jobs....
In file included from quota-fs.c:28:
rquota.h:9:10: fatal error: rpc/rpc.h: No such file or directory
#include <rpc/rpc.h>
^~~~~~~~~~~
compilation terminated.
make[4]: *** [Makefile:763: quota-fs.lo] Error 1
make[4]: Leaving directory '/home/mikel/rpmbuild/BUILD/dovecot-2.2.36/src/plugins/quota'
make[3]: *** [Makefile:472: all-recursive] Error 1
make[3]: Leaving directory '/home/mikel/rpmbuild/BUILD/dovecot-2.2.36/src/plugins'
make[2]: *** [Makefile:497: all-recursive] Error 1
make[2]: Leaving directory '/home/mikel/rpmbuild/BUILD/dovecot-2.2.36/src'
make[1]: *** [Makefile:621: all-recursive] Error 1
make[1]: Leaving directory '/home/mikel/rpmbuild/BUILD/dovecot-2.2.36'
make: *** [Makefile:465: all] Error 2
error: Bad exit status from /var/tmp/rpm-tmp.IwV7of (%build)

Responses

Hi Mikel,

Unfortunately I cannot provide you with a solution which lets you safely install /usr/include/rpc/rpc.h on RHEL 8.
The file was included in the glibc-headers package on RHEL 7 - but it's not included in that package on RHEL 8.

RHEL 7.7 :

sudo rpm -ql glibc-headers | grep rpc/
/usr/include/rpc/auth.h
/usr/include/rpc/auth_des.h
/usr/include/rpc/auth_unix.h
/usr/include/rpc/clnt.h
/usr/include/rpc/des_crypt.h
/usr/include/rpc/key_prot.h
/usr/include/rpc/netdb.h
/usr/include/rpc/pmap_clnt.h
/usr/include/rpc/pmap_prot.h
/usr/include/rpc/pmap_rmt.h
/usr/include/rpc/rpc.h
/usr/include/rpc/rpc_des.h
/usr/include/rpc/rpc_msg.h
/usr/include/rpc/svc.h
/usr/include/rpc/svc_auth.h
/usr/include/rpc/types.h
/usr/include/rpc/xdr.h

RHEL 8.1 :

sudo rpm -ql glibc-headers | grep rpc/
/usr/include/rpc/netdb.h

As manipulating glibc and related headers may lead to a broken and unusable system, I recommend to open a case.
Eventually Red Hat has an alternative solution, or can provide you with a safe workaround ... I wish you good luck ! :)

Regards,
Christian

I am guessing you have the rpcgen package installed, because, if I am reading the code right, that is what triggers the build requirement for rpc/rpc.h which I don't believe RHEL 8 has. You could try uninstalling the rpcgen package before building dovecot, or could wait for RHEL 8.2 which (based on the beta) should have a later version of dovecot that handles this situation better.

It looks like rpc.h is now provided by libtirpc-devel:

$ rpm -qlp libtirpc-devel-1.1.4-3.el8.x86_64.rpm | grep rpc.h
/usr/include/tirpc/rpc/rpc.h