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

相关推荐
草莓熊Lotso2 小时前
【数据结构初阶】--算法复杂度的深度解析
c语言·开发语言·数据结构·经验分享·笔记·其他·算法
KyollBM2 小时前
【CF】Day75——CF (Div. 2) B (数学 + 贪心) + CF 882 (Div. 2) C (01Trie | 区间最大异或和)
c语言·c++·算法
CodeOfCC3 小时前
c语言 封装跨平台线程头文件
linux·c语言·windows
momo卡4 小时前
MinGW-w64的安装详细步骤(c_c++的编译器gcc、g++的windows版,win10、win11真实可用)
c语言·c++·windows
超的小宝贝5 小时前
数据结构算法(C语言)
c语言·数据结构·算法
凤年徐7 小时前
【数据结构初阶】单链表
c语言·开发语言·数据结构·c++·经验分享·笔记·链表
hjyowl15 小时前
题解:AT_abc407_c [ABC407C] Security 2
c语言·开发语言·算法
old_power17 小时前
UCRT 和 MSVC 的区别(Windows 平台上 C/C++ 开发相关)
c语言·c++·windows
@老蝴17 小时前
C语言 — 编译和链接
c语言·开发语言
LunaGeeking19 小时前
三分算法与DeepSeek辅助证明是单峰函数
c语言·c++·算法·编程·信奥赛·ai辅助学习·三分