我的系统是RH9的,gcc版本是3.2.2.5的,交叉编译工具gcc源使用是4.2.0的
进行到最后一步了,编译完整的gcc,却出问题了
checking for gcc... gcc checking whether the C compiler (gcc ) works... no
configure: error: installation or configuration problem: C compiler cannot create executables.
配置参数如下:
# ./configure --target=arm-linux --enable-languages=c,c++ --prefix=$PREFIX
以下是config.log的内容:
This file contains any messages produced by compilers while
running configure, to aid debugging if configure makes a mistake.
configure:630: checking host system type
configure:651: checking target system type
configure:669: checking build system type
configure:724: checking for a BSD compatible install
configure:777: checking whether ln works
configure:801: checking whether ln -s works
configure:1866: checking for gcc
configure:1979: checking whether the C compiler (gcc ) works
configure:1995: gcc -o conftest conftest.c 1>&5
/usr/bin/ld: /usr/lib/gcc-lib/i386-redhat-linux/3.2.2/../../../crt1.o: Relocations in generic ELF (EM: 40)
/usr/lib/gcc-lib/i386-redhat-linux/3.2.2/../../../crt1.o: could not read symbols: File in wrong format
collect2: ld returned 1 exit status
configure: failed program was:
#line 1990 "configure"
#include "confdefs.h"
main(){return(0);}
请大家看看这是什么原因,怎么解决,帮帮忙,谢谢叻~
deepwhite 于 2007-12-02 17:01:12发表:
configure:1979: checking whether the C compiler (gcc ) works
configure:1995: gcc -o conftest conftest.c 1>&5
似乎是说gcc没有工作,所以配置出错?等等看看有没有别人遇见过这个情况吧。
PS:
我做过好几次交叉编译,但都是在Fedora6、7上做得,没试过Redhat9上,但是应该也可以的。我使用的是cross-tool工具链进行编译的,有兴趣可以参考http://hi.baidu.com/yangyingchao/blog/item/1350e488bb803095a4c272b2.html
prllhf 于 2007-12-02 16:26:21发表:
:0wl;l1