日期:2014-05-16  浏览次数:20706 次

一个制作交叉编译工具链的问题
./liao-arm.sh 时遇到下面的错误,好像是gcc的问题,我该怎么去改呢



+ test = 
+ PATH=/home/liao/download/tool-chain/gcc-4.1.0-glibc-2.3.2/arm-linux/bin:/home/liao/download/crosstool-0.43/build/arm-linux/gcc-4.1.0-glibc-2.3.2/gcc-core-prefix/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games
+ export PATH
+ mkdir -p /home/liao/download/tool-chain/gcc-4.1.0-glibc-2.3.2/arm-linux/arm-linux
+ touch /home/liao/download/tool-chain/gcc-4.1.0-glibc-2.3.2/arm-linux/arm-linux/test-if-write
+ test -w /home/liao/download/tool-chain/gcc-4.1.0-glibc-2.3.2/arm-linux/arm-linux/test-if-write
+ rm -f /home/liao/download/tool-chain/gcc-4.1.0-glibc-2.3.2/arm-linux/arm-linux/test-if-write
+ test -z 
+ SYSROOT=/home/liao/download/tool-chain/gcc-4.1.0-glibc-2.3.2/arm-linux/arm-linux
+ HEADERDIR=/home/liao/download/tool-chain/gcc-4.1.0-glibc-2.3.2/arm-linux/arm-linux/include
+ BINUTILS_SYSROOT_ARG=--with-sysroot=/home/liao/download/tool-chain/gcc-4.1.0-glibc-2.3.2/arm-linux/arm-linux
+ GCC_SYSROOT_ARG_CORE=--without-headers
+ GCC_SYSROOT_ARG=--with-headers=/home/liao/download/tool-chain/gcc-4.1.0-glibc-2.3.2/arm-linux/arm-linux/include
+ GLIBC_SYSROOT_ARG=prefix=
+ mkdir -p /home/liao/download/tool-chain/gcc-4.1.0-glibc-2.3.2/arm-linux/arm-linux/lib
+ mkdir -p /home/liao/download/tool-chain/gcc-4.1.0-glibc-2.3.2/arm-linux/arm-linux/usr/lib
+ echo

+ echo Building for --target=arm-linux, --prefix=/home/liao/download/tool-chain/gcc-4.1.0-glibc-2.3.2/arm-linux
Building for --target=arm-linux, --prefix=/home/liao/download/tool-chain/gcc-4.1.0-glibc-2.3.2/arm-linux
+ test -z linux-libc-headers-2.6.12.0
+ echo Copy sanitized headers
Copy sanitized headers
+ cd /home/liao/download/crosstool-0.43/build/arm-linux/gcc-4.1.0-glibc-2.3.2/linux-libc-headers-2.6.12.0
+ mkdir -p /home/liao/download/tool-chain/gcc-4.1.0-glibc-2.3.2/arm-linux/arm-linux/include
+ test -z linux-libc-headers-2.6.12.0
+ cp -r include/linux /home/liao/download/tool-chain/gcc-4.1.0-glibc-2.3.2/arm-linux/arm-linux/include
+ cp -r include/asm-arm /home/liao/download/tool-chain/gcc-4.1.0-glibc-2.3.2/arm-linux/arm-linux/include/asm
+ cd /home/liao/download/crosstool-0.43/build/arm-linux/gcc-4.1.0-glibc-2.3.2
+ echo Build binutils
Build binutils
+ mkdir -p build-binutils
+ cd build-binutils
+ test ! -f Makefile
+ /home/liao/download/crosstool-0.43/build/arm-linux/gcc-4.1.0-glibc-2.3.2/binutils-2.16.1/configure --target=arm-linux --host=i686-host_pc-linux-gnu --prefix=/home/liao/download/tool-chain/gcc-4.1.0-glibc-2.3.2/arm-linux --disable-nls --with-sysroot=/home/liao/download/tool-chain/gcc-4.1.0-glibc-2.3.2/arm-linux/arm-linux
creating cache ./config.cache
checking host system type... i686-host_pc-linux-gnu
checking target system type... arm-unknown-linux-gnu
checking build system type... i686-host_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... no
checking for cc... no
configure: error: no acceptable cc found in $PATH


------解决方案--------------------
gcc没有被找到,可能是gcc的path没有给对,或者是32bit和64bit混杂的问题
------解决方案--------------------
checking for gcc... no
checking for cc... no
configure: error: no acceptable cc found in $PATH
1、系统没有GCC编译;
2、GCC编译器不在$PATH路径中。

个人认为第一个可能性最大。
------解决方案--------------------
运行
gcc -v
gcc4.5 -v
看信息都是啥
------解决方案--------------------
探讨
checking for gcc... no
checking for cc... no
configure: error: no acceptable cc found in $PATH