Score:0

rpc.h missing? Ubuntu 21.04

cn flag

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.

James S. avatar
de flag
Is the file there? it should be in /usr/include/rpc/rpc.h? it should be provided by the libc6-dev package.
cn flag
libc6-dev is installed, the only file in /usr/include/rpc is netdb.h. "libc6-dev is already the newest version (2.33-0ubuntu5)".
Score:2
cn flag

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

sudo apt install libntirpc-dev

List of files

hr flag
There appears to be another (**n**ewer?) port [libntirpc-dev](https://packages.ubuntu.com/hirsute/libntirpc-dev) as well...
cn flag
good catch @steeldriver that one seems newer indeed :) changed it. thanks
hr flag
IMHO it's worth mentioning both - since we don't know which might work for the OP's "older in house software"
cn flag
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.
hr flag
@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` ?
Kaan Ateşel avatar
sh flag
I installed libntirpc-dev but still having the same problem. can you help me?
Slobodan Vidovic avatar
gn flag
I also installed libntirpc-dev and Im getting error it cant find fatal error: misc/abstract_atomic.h: No such file or directory
cn flag
"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.
Slobodan Vidovic avatar
gn flag
@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
mangohost

Post an answer

Most people don’t grasp that asking a lot of questions unlocks learning and improves interpersonal bonding. In Alison’s studies, for example, though people could accurately recall how many questions had been asked in their conversations, they didn’t intuit the link between questions and liking. Across four studies, in which participants were engaged in conversations themselves or read transcripts of others’ conversations, people tended not to realize that question asking would influence—or had influenced—the level of amity between the conversationalists.