error: C preprocessor fails sanity check

问题

bash 复制代码
./configure --prefix=/opt/mips_lib/libev --host=mipsel-openwrt-linux CC=mipsel-openwrt-linux-gcc

运行后提示

bash 复制代码
checking how to run the C preprocessor... mipsel-openwrt-linux-gcc --sysroot=/opt/mt7628/toolchain-mipsel_24kc_gcc-8.4.0_musl -I/opt/mt7628/toolchain-mipsel_24kc_gcc-8.4.0_musl/usr/include
configure: error: in `/opt/mips_lib/libev-4.19':
configure: error: C preprocessor "mipsel-openwrt-linux-gcc --sysroot=/opt/mt7628/toolchain-mipsel_24kc_gcc-8.4.0_musl -I/opt/mt7628/toolchain-mipsel_24kc_gcc-8.4.0_musl/usr/include" fails sanity check
See `config.log' for more details

解决

bash 复制代码
./configure --prefix=/opt/mips_lib/libev --host=mipsel-openwrt-linux CC=mipsel-openwrt-linux-gcc CPP='mipsel-openwrt-linux-g++ -E'

参考

配置:错误:C预处理器无法进行健全性检查

相关推荐
Zip-List5 分钟前
工作小记-pytorch的算子优化: 转gpu核函数 python调c
c语言·c++·pytorch·python·cuda
C++ 老炮儿的技术栈1 小时前
char 造成的数据溢出
linux·服务器·c语言·c++·算法·c
Zwawa14 小时前
先把轮子转稳,才不会烧心:编码器速度环 PID 怎么接回 PWM
c语言·单片机·嵌入式
Escalating_xu18 小时前
【C 语言】编译和链接:从源文件、目标文件到可执行程序完整解析
c语言·开发语言
C++ 老炮儿的技术栈18 小时前
std::atomic 是什么
linux·c语言·网络·c++·visual studio
Logic10119 小时前
C语言/数据结构位运算题解:异或XOR找出数轴移动中只出现一次的指令——只出现一次的数字
c语言·数据结构·数组·位运算·时间复杂度·算法题·异或性质
weixin_4629019719 小时前
CubeIDE串口重定向 printf
c语言
人邮异步社区20 小时前
C语言好学,还是Python好学?
c语言·开发语言·python
水饺编程1 天前
第2章:Linux 基础,echo 命令
linux·c语言·汇编
晓蛋1 天前
C语言中定义常量为什么要加后缀
c语言·溢出·常量定义·后缀·类型限定