使用 LLVM 16.0.4 编译 MiBench 中的 patricia遇到的 rpc 库问题

编译MiBench 中的 patricia 时,报如下错误

复制代码
patricia_test.c:46:10: fatal error: 'rpc/rpc.h' file not found
#include <rpc/rpc.h>
         ^~~~~~~~~~~
1 error generated.
DEBUG:execCmd: /root/SVF/llvm-16.0.4.obj/bin/clang [-O0 -Xclang -optnone -g -fno-discard-value-names -w -emit-llvm -c patricia_test.c -o .patricia_test.c.o.bc] had exitCode 1
DEBUG:execCmd: error was exit status 1
ERROR:Failed to build bitcode file for patricia_test.c because: exit status 1
DEBUG:Calling [gclang -static patricia.c patricia_test.c -O0 -Xclang -optnone -g -fno-discard-value-names -w -o patricia] returned 1
make: *** [Makefile:2:patricia] 错误 1
  1. 先装库
bash 复制代码
sudo apt-get update
sudo apt-get install libtirpc-dev
  1. 库文件本身有一些问题,切换到/usr/include/tirpc目录下
  2. #include <rpc/rpc.h>替换为#include <tirpc/rpc/rpc.h>
  3. 还有一些类似的 include 报错,逐个修改即可,有一个比较特殊的是把#include <netconfig.h>改为#include <tirpc/netconfig.h>
相关推荐
RuoZoe1 小时前
重塑WPF辉煌?基于DirectX 12的现代.NET UI框架Jalium
c语言
blasit3 小时前
笔记:Qt C++建立子线程做一个socket TCP常连接通信
c++·qt·tcp/ip
肆忆_1 天前
# 用 5 个问题学懂 C++ 虚函数(入门级)
c++
不想写代码的星星1 天前
虚函数表:C++ 多态背后的那个男人
c++
端平入洛3 天前
delete又未完全delete
c++
祈安_3 天前
C语言内存函数
c语言·后端
端平入洛4 天前
auto有时不auto
c++
norlan_jame5 天前
C-PHY与D-PHY差异
c语言·开发语言
哇哈哈20215 天前
信号量和信号
linux·c++
多恩Stone5 天前
【C++入门扫盲1】C++ 与 Python:类型、编译器/解释器与 CPU 的关系
开发语言·c++·人工智能·python·算法·3d·aigc