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预处理器无法进行健全性检查

相关推荐
Navigator_Z4 小时前
LeetCode //C++ - 1226. The Dining Philosophers
c语言·算法·leetcode
思麟呀6 小时前
嵌入式入门(一)宏观生态到首次烧录
c语言·嵌入式硬件
小雪崩6 小时前
嵌入式学习 day39:TCP并发服务器模型
linux·服务器·c语言·网络·学习·tcp/ip
无损检测小白白7 小时前
【嵌入式面试题一】
c语言·单片机
wdfk_prog10 小时前
canopennode-rtt推荐,不只可以做从站,也可以承担主站角色
c语言·开发语言·数据库·学习·算法·深度优先
无小道10 小时前
C/C++——可变参数
c语言·开发语言·c++·可变参数
是隼人11 小时前
buuctf-pwn PWN1题解(学习过程持续更新)
c语言·学习·安全·pwn入门·ctf入门
zbyyd11 小时前
Linux 网络编程:IO 多路复用
linux·运维·c语言·网络
晊晌_h12 小时前
嵌入式从0到精通——Linux 网络通信|TCP、HTTP 网络编程
linux·c语言·网络
路上有只喵13 小时前
STM32 UI Designer:一个开源的嵌入式 LCD 界面可视化设计工具(自动生成 C 代码)
c语言·驱动开发·stm32