分页: 1 / 1

[问题]gnu交叉编译器中的binutils

发表于 : 2007-04-22 17:48
sanpizb
创建arm版本的gnu交叉编译器,
./configure --prefix=/usr/local/arm --target=arm-linux


creating cache ./config.cache
checking host system type... i686-pc-linux-gnu
checking target system type... arm-unknown-linux-gnu
checking build system type... i686-pc-linux-gnu
checking for a BSD compatible install... /usr/bin/install -c
checking whether ln works... yes
checking whether ln -s works... yes
checking for gcc... gcc
checking whether the C compiler (gcc ) works... yes
checking whether the C compiler (gcc ) is a cross-compiler... no
checking whether we are using GNU C... yes
checking whether gcc accepts -g... yes
checking for gnatbind... no
checking whether compiler driver understands Ada... no
checking how to compare bootstrapped objects... cmp --ignore-initial=16 $$f1 $$f2
checking for correct version of gmp.h... no
checking for bison... no
checking for bison... no
checking for byacc... no
checking for yacc... no
checking for gm4... no
checking for gnum4... no
checking for m4... m4
checking for flex... no
checking for flex... no
checking for lex... no
checking for makeinfo... makeinfo
checking for i686-pc-linux-gnu-ar... no
checking for ar... ar
checking for i686-pc-linux-gnu-as... no
checking for as... as
checking for i686-pc-linux-gnu-dlltool... no
checking for dlltool... dlltool
checking for i686-pc-linux-gnu-ld... no
checking for ld... ld
checking for i686-pc-linux-gnu-nm... no
checking for nm... nm
checking for i686-pc-linux-gnu-ranlib... no
checking for ranlib... ranlib
checking for i686-pc-linux-gnu-windres... no
checking for windres... windres
checking for i686-pc-linux-gnu-objcopy... no
checking for objcopy... objcopy
checking for i686-pc-linux-gnu-objdump... no
checking for objdump... objdump
checking for arm-linux-ar... no
checking for arm-linux-as... no
checking for arm-linux-dlltool... no
checking for arm-linux-ld... no
checking for arm-linux-nm... no
checking for arm-linux-ranlib... no
checking for arm-linux-windres... no
checking whether to enable maintainer-specific portions of Makefiles... no
checking if symbolic links between directories work... yes
updating cache ./config.cache
creating ./config.status
creating Makefile



在make其中的binutils 2.16时出现了错误:


../../../source/binutils-2.16/bfd/bfdio.c: In function 'bfd_seek':
../../../source/binutils-2.16/bfd/bfdio.c:339: error: 'EINVAL' undeclared (first use in this function)
../../../source/binutils-2.16/bfd/bfdio.c:339: error: (Each undeclared identifier is reported only once
../../../source/binutils-2.16/bfd/bfdio.c:339: error: for each function it appears in.)
make[3]: *** [bfdio.lo] 错误 1
make[3]: Leaving directory `/usr/src/build/binutils/bfd'
make[2]: *** [all-recursive] 错误 1
make[2]: Leaving directory `/usr/src/build/binutils/bfd'
make[1]: *** [all] 错误 2
make[1]: Leaving directory `/usr/src/build/binutils/bfd'
make: *** [all-bfd] 错误 2



在config.log中 的信息如下:

This file contains any messages produced by compilers while
running configure, to aid debugging if configure makes a mistake.

configure:595: checking host system type
configure:616: checking target system type
configure:634: checking build system type
configure:689: checking for a BSD compatible install
configure:742: checking whether ln works
configure:766: checking whether ln -s works
configure:1809: checking for gcc
configure:1922: checking whether the C compiler (gcc ) works
configure:1938: gcc -o conftest conftest.c 1>&5
configure:1964: checking whether the C compiler (gcc ) is a cross-compiler
configure:1969: checking whether we are using GNU C
configure:1978: gcc -E conftest.c
configure:1997: checking whether gcc accepts -g
configure:2064: checking for gnatbind
configure:2129: checking whether compiler driver understands Ada
configure:2162: checking how to compare bootstrapped objects
configure:2260: checking for correct version of gmp.h
configure:2273: gcc -c -g -O2 conftest.c 1>&5
configure:2263:17: error: gmp.h: No such file or directory
configure: In function 'main':
configure:2267: error: 'choke' undeclared (first use in this function)
configure:2267: error: (Each undeclared identifier is reported only once
configure:2267: error: for each function it appears in.)
configure:2267: error: syntax error before 'me'
configure: failed program was:
#line 2262 "configure"
#include "confdefs.h"
#include "gmp.h"
int main() {

#if __GNU_MP_VERSION < 3
choke me
#endif

; return 0; }
configure:2786: checking for bison
configure:2821: checking for bison
configure:2821: checking for byacc
configure:2821: checking for yacc
configure:2856: checking for gm4
configure:2856: checking for gnum4
configure:2856: checking for m4
configure:2891: checking for flex
configure:2926: checking for flex
configure:2926: checking for lex
configure:2961: checking for makeinfo
configure:3607: checking for i686-pc-linux-gnu-ar
configure:3640: checking for ar
configure:3679: checking for i686-pc-linux-gnu-as
configure:3712: checking for as
configure:3751: checking for i686-pc-linux-gnu-dlltool
configure:3784: checking for dlltool
configure:3823: checking for i686-pc-linux-gnu-ld
configure:3856: checking for ld
configure:3895: checking for i686-pc-linux-gnu-nm
configure:3928: checking for nm
configure:3967: checking for i686-pc-linux-gnu-ranlib
configure:4000: checking for ranlib
configure:4039: checking for i686-pc-linux-gnu-windres
configure:4072: checking for windres
configure:4111: checking for i686-pc-linux-gnu-objcopy
configure:4144: checking for objcopy
configure:4183: checking for i686-pc-linux-gnu-objdump
configure:4216: checking for objdump
configure:4262: checking for arm-linux-ar
configure:4334: checking for arm-linux-as
configure:4406: checking for arm-linux-dlltool
configure:4478: checking for arm-linux-ld
configure:4550: checking for arm-linux-nm
configure:4622: checking for arm-linux-ranlib
configure:4694: checking for arm-linux-windres
configure:4812: checking whether to enable maintainer-specific portions of Makefiles
configure:4859: checking if symbolic links between directories work


盼望各位帮我解决一下。谢谢了!!

发表于 : 2008-03-07 9:14
hjc9729
我也遇到这样的问题,gmp.h是什么头文件,也不知道要装什么

Re: [问题]gnu交叉编译器中的binutils

发表于 : 2009-10-20 20:51
advancedlp
I met the same question, any suggestion?