分页: 1 / 1

【交叉编译工具链搭建问题】编译gcc报错

发表于 : 2013-11-20 12:23
一半挂在墙上
nux-gnu/bin/ -B/home/dell/vita/cross-gcc-tmp/i686-none-linux-gnu/lib/ -isystem /home/dell/vita/cross-gcc-tmp/i686-none-linux-gnu/include -isystem /home/dell/vita/cross-gcc-tmp/i686-none-linux-gnu/sys-include
checking for suffix of object files... configure: error: in `/home/dell/vita/build/gcc-build/i686-none-linux-gnu/libgcc':
configure: error: cannot compute suffix of object files: cannot compile
See `config.log' for more details.


报这个错,怎么解决啊

Re: 【交叉编译工具链搭建问题】编译gcc报错

发表于 : 2013-11-20 22:49
yaner
你也在玩交叉编译呀,我也在玩,菜鸟级别,也是这个错误,网上搜了一下,有个答案,自己慢慢翻译,还不知道行不行。
http://gcc.gnu.org/wiki/FAQ
Configuration fails with ''configure: error: cannot compute suffix of object files: cannot compile''. What is the problem?

[ Permalink ]

Like any of the GNU projects, GCC is using the GNU autotools to commonly configure the compilation for the specifics of the build system. The configure script thereby uses small test programs - usually called conftest.c - to test if certain functions and/or features are available. If the compilation of such a test program fails, you'll see an error message like:

checking for suffix of object files... configure: error: in `/home/manu/gcc/gcc/i686-pc-linux-gnu/libgcc':
configure: error: cannot compute suffix of object files: cannot compile
See `config.log' for more details.
make[2]: *** [configure-stage1-target-libgcc] Error 1
make[2]: Leaving directory `/home/manu/gcc/gcc'

This error message is quite misleading and frequently the problem has nothing to do with the message. You have to check the file 'config.log' in the directory where the error occurred. In the example above, you would have to check the 'config.log' file in the directory '/home/manu/gcc/gcc/i686-pc-linux-gnu/libgcc'. There might be several test programs that failed during the configuration, but some of these failures are non-critical. Check for the last error entry in the file.

Common causes for this error message are:

Required libraries for the GCC build are missing, specifically MPFR, GMP and MPC. If installed as shared libraries they must be in the runtime linker's search path so they can be found. Please, follow the instructions in the answer to Why does my ./configure and make fail?

The compiler crashed. For example, if there is an error such as 'conftest.c: internal compiler error:', this indicates a bug in the compiler. If you are using an unmodified version of GCC, please follow the procedure to report the bug.