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

相关推荐
only-lucky25 分钟前
C语言socket编程-补充
服务器·c语言·php
JeffersonZU2 小时前
Linux/Unix进程概念及基本操作(PID、内存布局、虚拟内存、环境变量、fork、exit、wait、exec、system)
linux·c语言·unix·gnu
ruanjiananquan993 小时前
c,c++语言的栈内存、堆内存及任意读写内存
java·c语言·c++
持梦远方4 小时前
C 语言基础入门:基本数据类型与运算符详解
c语言·开发语言·c++
Heartoxx4 小时前
c语言-指针(数组)练习2
c语言·数据结构·算法
码农不惑11 小时前
2025.06.27-14.44 C语言开发:Onvif(二)
c语言·开发语言
凌肖战13 小时前
力扣网C语言编程题:在数组中查找目标值位置之二分查找法
c语言·算法·leetcode
BreezeJuvenile13 小时前
数据结构与算法分析课设:一元多项式求值
c语言·课程设计·数据结构与算法分析·一元多项式计算
悲伤小伞15 小时前
linux_git的使用
linux·c语言·c++·git
气质、小青年!15 小时前
【排序算法】
c语言·数据结构