Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix compilation error 'fatal error: rpc/rpc.h: No such file or directory' #16

Open
purplewall1206 opened this issue Oct 30, 2020 · 2 comments

Comments

@purplewall1206
Copy link

first
replace #include <rpc/xxx> by #include <tirpc/rpc/xxx>

second
and there are some problems in '/usr/include/tirpc/rpc' directory, cd into it , then

grep '#include <rpc' ./ -lr | xargs sed -i 's/#include <rpc\//#include <tirpc\/rpc\//g'

grep '#include <netconfig' ./ -lr | xargs sed -i 's/#include <netconfig.h>/#include \"..\/netconfig.h\"/g'

finally

make results LDFLAGS=-ltirpc

the problem will be fixed, tested successfully on manjaro 20

@mimuyi
Copy link

mimuyi commented Apr 14, 2021

Centos8:
modify the content of /usr/include/netdb.h file
<rpc/netdb.h> => <tirpc/rpc/netdb.h>

@gipi
Copy link

gipi commented Mar 3, 2023

I think is more correct to change the CFLAGS variable to point to the right include instead of modify the system headers.

diff --git a/src/Makefile b/src/Makefile
index 2555014..dcf3226 100644
--- a/src/Makefile
+++ b/src/Makefile
@@ -58,6 +58,8 @@ SAMPLES=lmbench/Results/aix/rs6000 lmbench/Results/hpux/snake \
        lmbench/Results/irix/indigo2 lmbench/Results/linux/pentium \
        lmbench/Results/osf1/alpha lmbench/Results/solaris/ss20* 
 
+CPPFLAGS:=$(CPPFLAGS) -I /usr/include/tirpc/
+
 COMPILE=$(CC) $(CFLAGS) $(CPPFLAGS) $(LDFLAGS)
 
 INCS = bench.h lib_mem.h lib_tcp.h lib_udp.h stats.h timing.h

AndrewFasano pushed a commit to AndrewFasano/lmbench that referenced this issue Apr 3, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants