C preprocessor fails sanity check

编译某一产品固件时,遇到如下现象:

checking how to run the C preprocessor... /opt/mipsel-24kec-linux-uclibc/bin/mipsel-24kec-linux-uclibc-gcc
configure: error: in `/home/ivan/work/***/m4':
configure: error: C preprocessor "/opt/mipsel-24kec-linux-uclibc/bin/mipsel-24kec-linux-uclibc-gcc" fails sanity check
See `config.log' for more details
make: *** [setup] Error 1



/* config.log文件 查找error位置 */
configure:3345: checking how to run the C preprocessor
configure:3415: result: /opt/mipsel-24kec-linux-uclibc/bin/mipsel-24kec-linux-uclibc-gcc
configure:3435: /opt/mipsel-24kec-linux-uclibc/bin/mipsel-24kec-linux-uclibc-gcc conftest.c
conftest.c(14): error: identifier "Syntax" is undefined
             Syntax error
             ^

明明用的是交叉编译,可错误打印中的C preprocessor路径却是系统配置的gcc,而非交叉编译工具链gcc,很费解。
后面在同事的提醒下,之前在这个窗口编译过其它SDK,执行过命令"source ~/.bashrc",这会修改当前编译窗口的编译环境变量,导致编译器路径被修改。

解决方法,很简单: 关闭当前编译窗口,打开新窗口,重新编译,问题解决。

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值