Search code examples
clinuxnfs

Make compiling nfsshell claims rpc/rpc.h doesn't exist


I'm trying to compile the c source code for nfsshell which was written in 1997. Unfortunately the make file produces the above error when attempting to run make on a modern Debian version. Extensive googling revealed that this was a part of glibc for a long time, but that no longer appears to be the case. Does anyone know how to go about hunting down the dinosaur? Thank you in advance!

https://github.com/NetDirect/nfsshell


Solution

  • Glibc's RPC support was deprecated some years ago but could still be built up to version 2.31, if an appropriate configure option was provided. Debian apparently did this, unlike some other distributions (such as RedHat). In version 2.32 of GNU libc, the legacy support was removed. Here's an extract from the 2.32 announcement:

    Deprecated and removed features, and other changes affecting compatibility:

    • Remove configure option --enable-obsolete-rpc. Sun RPC is removed from glibc. This includes the rpcgen program, librpcsvc, and the Sun RPC header files. Backward compatibility for old programs is kept only for architectures and ABIs that have been added in or before glibc 2.31. New programs need to use TI-RPC http://git.linux-nfs.org/?p=steved/libtirpc.git;a=summary and rpcsvc-proto https://github.com/thkukuk/rpcsvc-proto.

    • Remove configure option --enable-obsolete-nsl. libnsl is only built as shared library for backward compatibility and the NSS modules "nis" and "nisplus" are not built at all and libnsl's headers aren't installed. This compatibility is kept only for architectures and ABIs that have been added in or before version 2.28. Replacement implementations based on TI-RPC, which additionally support IPv6, are available from https://github.com/thkukuk/. This change does not affect the "compat" NSS module, which does not depended on libnsl since 2.27 and thus can be used without NIS.

    And here's a Debian package search for tirpc: https://packages.debian.org/search?keywords=tirpc