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

相关推荐
海绵宝宝的月光宝盒28 分钟前
[stm32] 4-1 USART(1)
c语言·开发语言·笔记·stm32·单片机
Mr_Chenph9 小时前
真.从“零”搞 VSCode+STM32CubeMx+C <2>调试+烧录
c语言·stm32·嵌入式硬件
YuforiaCode9 小时前
第十六届蓝桥杯 2025 C/C++B组第一轮省赛 全部题解(未完结)
c语言·c++·蓝桥杯
Darkwanderor11 小时前
c语言的常用的预处理指令和条件编译
c语言
bai_lan_ya11 小时前
C语言中结构体的字节对齐的应用
c语言·开发语言
海阔天空任鸟飞~11 小时前
杰理-安卓通过map获取时间的时候,部分手机切换sbc和aac时候单耳无声音
c语言·单片机·aac
珊瑚里的鱼14 小时前
第一讲 | 算法复杂度
c语言·开发语言·数据结构·笔记·算法·visualstudio·visual studio
YuforiaCode1 天前
第十六届蓝桥杯 2025 C/C++组 破解信息
c语言·c++·蓝桥杯
南玖yy1 天前
C++ 成员变量缺省值:引用、const 与自定义类型的初始化规则详解,引用类型和const类型的成员变量自定义类型成员是否可以用缺省值?
c语言·开发语言·c++·后端·架构·c++基础语法
YuforiaCode1 天前
第十六届蓝桥杯 2025 C/C++组 旗帜
c语言·c++·蓝桥杯