使用 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>
相关推荐
你怎么知道我是队长11 小时前
C语言---头文件
c语言·开发语言
HellowAmy11 小时前
我的C++规范 - 玩一个小游戏
开发语言·c++·代码规范
自学不成才11 小时前
深度复盘:一次flutter应用基于内存取证的黑盒加密破解实录并完善算法推理助手
c++·python·算法·数据挖掘
3有青年12 小时前
nios ii 中 ‘ALT_CPU_FREQ‘ could not be resolved的分析和解决办法
c语言·fpga开发
玖釉-13 小时前
[Vulkan 学习之路] 08 - 给图片穿马甲:图像视图 (Image Views)
c++·windows·图形渲染
m0_7482500314 小时前
C++ 信号处理
c++·算法·信号处理
yuyanjingtao14 小时前
动态规划 背包 之 凑钱
c++·算法·青少年编程·动态规划·gesp·csp-j/s
ALzc15 小时前
深度剖析EtherCAT FOE功能:ARM固件升级的数据传输与状态机实现
c语言·stm32·ethercat·foe
scx2013100415 小时前
20260112树状数组总结
数据结构·c++·算法·树状数组
星竹晨L16 小时前
【C++内存安全管理】智能指针的使用和原理
开发语言·c++