0

I'm porting older in house software to 21.04. I run rpcgen without error, it creates a ".h" file that has the expected "#include <rpc/rpc.h>", but I cannot locate a package that actually contains the header file that rpcgen expects. Suggestions?

TIA.

  • Is the file there? it should be in /usr/include/rpc/rpc.h? it should be provided by the libc6-dev package. – James S. Aug 25 '21 at 19:46
  • libc6-dev is installed, the only file in /usr/include/rpc is netdb.h. "libc6-dev is already the newest version (2.33-0ubuntu5)". – Don Krause Aug 25 '21 at 20:09

1 Answers1

3

Looks like it is provided by libntirpc-dev. So do a ...

sudo apt install libntirpc-dev

Then you may need to add /usr/include/tirpc to the CPATH environment variable.

List of files

fchen
  • 269
Rinzwind
  • 310,127
  • 1
    There appears to be another (newer?) port libntirpc-dev as well... – steeldriver Aug 25 '21 at 19:23
  • good catch @steeldriver that one seems newer indeed :) changed it. thanks – Rinzwind Aug 25 '21 at 19:26
  • IMHO it's worth mentioning both - since we don't know which might work for the OP's "older in house software" – steeldriver Aug 25 '21 at 19:30
  • Thanks, I wasn't sure those are "correct" rpc.h files. I'm wondering why rpcgen doesn't seem to know the "new" locations of the files. Adds a bit of work to the "make clean; make" workflow if I have to keep editing the resulting output files from rpcgen to correct the location of the header files. – Don Krause Aug 25 '21 at 19:35
  • 2
    @DonKrause I wonder if you can avoid editing the generated file(s) by passing a suitable value of CFLAGS to make ex. make CFLAGS=-I/usr/include/ntirpc ? – steeldriver Aug 25 '21 at 22:10
  • I installed libntirpc-dev but still having the same problem. can you help me? – Kaan Ateşel Oct 27 '22 at 00:03
  • I also installed libntirpc-dev and Im getting error it cant find fatal error: misc/abstract_atomic.h: No such file or directory – Slobodan Vidovic Jan 13 '23 at 22:59
  • "misc/abstract_atomic.h" https://ubuntu.pkgs.org/20.04/ubuntu-main-arm64/libntirpc-dev_3.0-0ubuntu2_arm64.deb.html it is in there. – Rinzwind Jan 14 '23 at 11:03
  • @Rinzwind Yes I have installed libntirpc-dev but C preprocessor cant find it, so I sym linked those files https://stackoverflow.com/a/75119175/3291092 – Slobodan Vidovic Jan 14 '23 at 16:00
  • Exporting that CPATH variable fixed the issue, thank you! – Dentrax May 01 '24 at 09:22