C preprocessor fails sanity check

来源:互联网 发布:我的少女时代 知乎 编辑:程序博客网 时间:2024/06/09 21:44

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

checking how to run the C preprocessor... /opt/mipsel-24kec-linux-uclibc/bin/mipsel-24kec-linux-uclibc-gccconfigure: error: in `/home/ivan/work/***/m4':configure: error: C preprocessor "/opt/mipsel-24kec-linux-uclibc/bin/mipsel-24kec-linux-uclibc-gcc" fails sanity checkSee `config.log' for more detailsmake: *** [setup] Error 1/* config.log文件 查找error位置 */configure:3345: checking how to run the C preprocessorconfigure:3415: result: /opt/mipsel-24kec-linux-uclibc/bin/mipsel-24kec-linux-uclibc-gccconfigure:3435: /opt/mipsel-24kec-linux-uclibc/bin/mipsel-24kec-linux-uclibc-gcc conftest.cconftest.c(14): error: identifier "Syntax" is undefined             Syntax error             ^

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

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

0 0
原创粉丝点击