【已解决】crosstool编译出错:Build failed in step ‘Extracting and patching toolchain components’,in function ‘CT_DoExecLog’ (line unknown, sorry),at line # 681 in function ‘CT_Extract’

【问题】

折腾:

【记录】crosstool为xscale编译(ct-ng build)过程

期间,编译出错,完整log:

CLi@PC-CLI-1 ~/develop/crosstool-ng/crosstool-ng-1.9.3_build
$ ct-ng build
[INFO ]  Performing some trivial sanity checks
[INFO ]  Build started 20130723.164136
[INFO ]  Building environment variables
[EXTRA]  Preparing working directories
[EXTRA]  Installing user-supplied crosstool-NG configuration
[EXTRA]  =================================================================
[EXTRA]  Dumping internal crosstool-NG configuration
[EXTRA]    Building a toolchain for:
[EXTRA]      build  = i686-pc-cygwin
[EXTRA]      host   = i686-pc-cygwin
[EXTRA]      target = arm-xscale-linux-gnueabi
[EXTRA]  Dumping internal crosstool-NG configuration: done in 0.91s (at 00:33)
[INFO ]  =================================================================
[INFO ]  Retrieving needed toolchain components' tarballs
[EXTRA]    Retrieving 'expat-2.0.1'
[EXTRA]    Saving 'expat-2.0.1.tar.gz' to local storage
[INFO ]  Retrieving needed toolchain components' tarballs: done in 7.17s (at 00:40)
[INFO ]  =================================================================
[INFO ]  Extracting and patching toolchain components
[EXTRA]    Extracting 'linux-2.6.36'
[EXTRA]    Patching 'linux-2.6.36'
[EXTRA]    Extracting 'gmp-4.3.2'
[EXTRA]    Patching 'gmp-4.3.2'
[EXTRA]    Extracting 'mpfr-2.4.2'
[EXTRA]    Patching 'mpfr-2.4.2'
[EXTRA]    Extracting 'binutils-2.20'
[EXTRA]    Patching 'binutils-2.20'
[EXTRA]    Extracting 'gcc-4.4.3'
[EXTRA]    Patching 'gcc-4.4.3'
[EXTRA]    Extracting 'glibc-2.9'
[EXTRA]    Patching 'glibc-2.9'
[EXTRA]    Extracting 'glibc-ports-2.9'
[EXTRA]    Patching 'glibc-ports-2.9'
[EXTRA]    Extracting 'dmalloc-5.5.2'
[EXTRA]    Patching 'dmalloc-5.5.2'
[EXTRA]    Extracting 'gdb-6.8'
[EXTRA]    Patching 'gdb-6.8'
[EXTRA]    Extracting 'ncurses-5.7'
[ERROR]    Build failed in step 'Extracting and patching toolchain components'
[ERROR]    Error happened in '/opt/crosstool-ng/lib/ct-ng-1.9.3/scripts/functions' in function 'CT_DoExecLog' (line unknown, sorry)
[ERROR]          called from '/opt/crosstool-ng/lib/ct-ng-1.9.3/scripts/functions' at line # 681 in function 'CT_Extract'
[ERROR]          called from '/opt/crosstool-ng/lib/ct-ng-1.9.3/scripts/build/debug/300-gdb.sh' at line # 65 in function 'do_debug_gdb_extract'
[ERROR]          called from '/opt/crosstool-ng/lib/ct-ng-1.9.3/scripts/build/debug.sh' at line # 28 in function 'do_debug_extract'
[ERROR]          called from '/opt/crosstool-ng/lib/ct-ng-1.9.3/scripts/crosstool-NG.sh' at line # 569 in function 'main'
[ERROR]    Look at '/home/CLi/develop/crosstool-ng/x-tools/arm-xscale-linux-gnueabi/build.log' for more info on this error.
[ERROR]  (elapsed: 10:01.80)
[10:06] / /opt/crosstool-ng/bin/ct-ng:143: recipe for target `build' failed
make: *** [build] Error 2

 

【解决过程】

1.去对应的log文件:

D:\tmp\tmp_dev_root\cgwin\home\CLi\develop\crosstool-ng\x-tools\arm-xscale-linux-gnueabi\build.log

看看,最后的log是:

[ALL  ]    Overiding config.guess and config.sub
[ALL  ]    `/opt/crosstool-ng/lib/ct-ng-1.9.3/scripts/config.guess' -> `./config.guess'
[ALL  ]    `/opt/crosstool-ng/lib/ct-ng-1.9.3/scripts/config.guess' -> `./readline/support/config.guess'
[ALL  ]    `/opt/crosstool-ng/lib/ct-ng-1.9.3/scripts/config.sub' -> `./config.sub'
[ALL  ]    `/opt/crosstool-ng/lib/ct-ng-1.9.3/scripts/config.sub' -> `./readline/support/config.sub'
[DEBUG]    ==> Executing: 'touch /home/CLi/develop/crosstool-ng/crosstool-ng-1.9.3_build/targets/src/.gdb-6.8.patched'
[DEBUG]    ==> Executing: 'rm -f /home/CLi/develop/crosstool-ng/crosstool-ng-1.9.3_build/targets/src/.gdb-6.8.patching'
[DEBUG]    ==> Executing: 'touch /home/CLi/develop/crosstool-ng/crosstool-ng-1.9.3_build/targets/src/.ncurses-5.7.extracting'
[EXTRA]    Extracting 'ncurses-5.7'
[DEBUG]    ==> Executing: 'tar xvzf /home/CLi/develop/crosstool-ng/crosstool-ng-1.9.3_build/targets/tarballs/ncurses-5.7.tar.gz'
[FILE ]    
[FILE ]    gzip: stdin: unexpected end of file
[FILE ]    tar: Child returned status 1
[FILE ]    tar: Error is not recoverable: exiting now
[ERROR]    Build failed in step 'Extracting and patching toolchain components'
[ERROR]    Error happened in '/opt/crosstool-ng/lib/ct-ng-1.9.3/scripts/functions' in function 'CT_DoExecLog' (line unknown, sorry)
[ERROR]          called from '/opt/crosstool-ng/lib/ct-ng-1.9.3/scripts/functions' at line # 681 in function 'CT_Extract'
[ERROR]          called from '/opt/crosstool-ng/lib/ct-ng-1.9.3/scripts/build/debug/300-gdb.sh' at line # 65 in function 'do_debug_gdb_extract'
[ERROR]          called from '/opt/crosstool-ng/lib/ct-ng-1.9.3/scripts/build/debug.sh' at line # 28 in function 'do_debug_extract'
[ERROR]          called from '/opt/crosstool-ng/lib/ct-ng-1.9.3/scripts/crosstool-NG.sh' at line # 569 in function 'main'
[ERROR]    Look at '/home/CLi/develop/crosstool-ng/x-tools/arm-xscale-linux-gnueabi/build.log' for more info on this error.
[ERROR]  (elapsed: 10:01.80)

看起来,错误还是和crosstool本身有关,而不是某个库。

2.参考:

Re: crosstool-NG Build ERROR

说貌似是由于linux tarball有问题。

但是觉得有问题啊,因为前面已经:

[EXTRA]    Extracting 'linux-2.6.36'
[EXTRA]    Patching 'linux-2.6.36'

了,并且可以看到解压后的linux-2.6.36文件夹和文件的。

3.突然发现,貌似是ncurses-5.7.tar.gz有问题,而导致

gzip: stdin: unexpected end of file

的,所以,重新去下载一个:

ncurses-5.7.tar.gz

重新放到:

D:\tmp\tmp_dev_root\cgwin\home\CLi\develop\crosstool-ng\crosstool-ng-1.9.3_build\targets\src

去,再重新编译试试,结果又有其他错误:

CLi@PC-CLI-1 ~/develop/crosstool-ng/crosstool-ng-1.9.3_build
$ ct-ng build
[INFO ]  Performing some trivial sanity checks
[INFO ]  Build started 20130723.171055
[INFO ]  Building environment variables
[EXTRA]  Preparing working directories
[EXTRA]  Installing user-supplied crosstool-NG configuration
[EXTRA]  =================================================================
[EXTRA]  Dumping internal crosstool-NG configuration
[EXTRA]    Building a toolchain for:
[EXTRA]      build  = i686-pc-cygwin
[EXTRA]      host   = i686-pc-cygwin
[EXTRA]      target = arm-xscale-linux-gnueabi
[EXTRA]  Dumping internal crosstool-NG configuration: done in 0.82s (at 00:33)
[INFO ]  =================================================================
[INFO ]  Retrieving needed toolchain components' tarballs
[INFO ]  Retrieving needed toolchain components' tarballs: done in 1.57s (at 00:35)
[INFO ]  =================================================================
[INFO ]  Extracting and patching toolchain components
[ERROR]    The 'ncurses-5.7' sources were partially extracted.
[ERROR]    Please remove first:
[ERROR]     - the source dir for 'ncurses-5.7', in '/home/CLi/develop/crosstool-ng/crosstool-ng-1.9.3_build/targets/src'
[ERROR]     - the file '/home/CLi/develop/crosstool-ng/crosstool-ng-1.9.3_build/targets/src/.ncurses-5.7.extracting'
[ERROR]    I'll stop now to avoid any carnage...
[00:41] / /opt/crosstool-ng/bin/ct-ng:143: recipe for target `build' failed
make: *** [build] Error 1

4.所以,先去删除:

D:\tmp\tmp_dev_root\cgwin\home\CLi\develop\crosstool-ng\crosstool-ng-1.9.3_build\targets\src\.ncurses-5.7.extracting

再去重新build,结果又是开始的错误:

CLi@PC-CLI-1 ~/develop/crosstool-ng/crosstool-ng-1.9.3_build
$ ct-ng build
[INFO ]  Performing some trivial sanity checks
[INFO ]  Build started 20130723.171353
[INFO ]  Building environment variables
[EXTRA]  Preparing working directories
[EXTRA]  Installing user-supplied crosstool-NG configuration
[EXTRA]  =================================================================
[EXTRA]  Dumping internal crosstool-NG configuration
[EXTRA]    Building a toolchain for:
[EXTRA]      build  = i686-pc-cygwin
[EXTRA]      host   = i686-pc-cygwin
[EXTRA]      target = arm-xscale-linux-gnueabi
[EXTRA]  Dumping internal crosstool-NG configuration: done in 0.91s (at 00:34)
[INFO ]  =================================================================
[INFO ]  Retrieving needed toolchain components' tarballs
[INFO ]  Retrieving needed toolchain components' tarballs: done in 1.58s (at 00:36)
[INFO ]  =================================================================
[INFO ]  Extracting and patching toolchain components
[EXTRA]    Extracting 'ncurses-5.7'
[ERROR]    Build failed in step 'Extracting and patching toolchain components'
[ERROR]    Error happened in '/opt/crosstool-ng/lib/ct-ng-1.9.3/scripts/functions' in function 'CT_DoExecLog' (line unknown, sorry)
[ERROR]          called from '/opt/crosstool-ng/lib/ct-ng-1.9.3/scripts/functions' at line # 681 in function 'CT_Extract'
[ERROR]          called from '/opt/crosstool-ng/lib/ct-ng-1.9.3/scripts/build/debug/300-gdb.sh' at line # 65 in function 'do_debug_gdb_extract'
[ERROR]          called from '/opt/crosstool-ng/lib/ct-ng-1.9.3/scripts/build/debug.sh' at line # 28 in function 'do_debug_extract'
[ERROR]          called from '/opt/crosstool-ng/lib/ct-ng-1.9.3/scripts/crosstool-NG.sh' at line # 569 in function 'main'
[ERROR]    Look at '/home/CLi/develop/crosstool-ng/x-tools/arm-xscale-linux-gnueabi/build.log' for more info on this error.
[ERROR]  (elapsed: 0:38.24)
[00:42] / /opt/crosstool-ng/bin/ct-ng:143: recipe for target `build' failed
make: *** [build] Error 2

然后看到log中内容是:

[DEBUG]    ==> Executing: 'touch /home/CLi/develop/crosstool-ng/crosstool-ng-1.9.3_build/targets/src/.ncurses-5.7.extracting'
[EXTRA]    Extracting 'ncurses-5.7'
[DEBUG]    ==> Executing: 'tar xvzf /home/CLi/develop/crosstool-ng/crosstool-ng-1.9.3_build/targets/tarballs/ncurses-5.7.tar.gz'
[FILE ]    
[FILE ]    gzip: stdin: unexpected end of file
[FILE ]    tar: Child returned status 1
[FILE ]    tar: Error is not recoverable: exiting now
[ERROR]    Build failed in step 'Extracting and patching toolchain components'
[ERROR]    Error happened in '/opt/crosstool-ng/lib/ct-ng-1.9.3/scripts/functions' in function 'CT_DoExecLog' (line unknown, sorry)
[ERROR]          called from '/opt/crosstool-ng/lib/ct-ng-1.9.3/scripts/functions' at line # 681 in function 'CT_Extract'
[ERROR]          called from '/opt/crosstool-ng/lib/ct-ng-1.9.3/scripts/build/debug/300-gdb.sh' at line # 65 in function 'do_debug_gdb_extract'
[ERROR]          called from '/opt/crosstool-ng/lib/ct-ng-1.9.3/scripts/build/debug.sh' at line # 28 in function 'do_debug_extract'
[ERROR]          called from '/opt/crosstool-ng/lib/ct-ng-1.9.3/scripts/crosstool-NG.sh' at line # 569 in function 'main'
[ERROR]    Look at '/home/CLi/develop/crosstool-ng/x-tools/arm-xscale-linux-gnueabi/build.log' for more info on this error.
[ERROR]  (elapsed: 0:38.24)

即,对于ncurses-5.7.tar.gz,用的是tar xvzf,所以看起来不对,应该是针对xx.tar.bz2才用xvzf

5.所以,重新去找个ncurses-5.7.tar.bz2,最后在:

http://code.google.com/p/mywolfe/source/browse/trunk/T2-8rc-N/ncurses-5.7.tar.bz2?r=118

找到:

http://mywolfe.googlecode.com/svn-history/r118/trunk/T2-8rc-N/ncurses-5.7.tar.bz2

下载后,拷贝到:

D:\tmp\tmp_dev_root\cgwin\home\CLi\develop\crosstool-ng\crosstool-ng-1.9.3_build\targets\src

并且删除其下的:

ncurses-5.7.tar.gz

.ncurses-5.7.extracting

然后重新编译试试:

结果仍然出错:

CLi@PC-CLI-1 ~/develop/crosstool-ng/crosstool-ng-1.9.3_build
$ ct-ng build
[INFO ]  Performing some trivial sanity checks
[INFO ]  Build started 20130723.171924
[INFO ]  Building environment variables
[EXTRA]  Preparing working directories
[EXTRA]  Installing user-supplied crosstool-NG configuration
[EXTRA]  =================================================================
[EXTRA]  Dumping internal crosstool-NG configuration
[EXTRA]    Building a toolchain for:
[EXTRA]      build  = i686-pc-cygwin
[EXTRA]      host   = i686-pc-cygwin
[EXTRA]      target = arm-xscale-linux-gnueabi
[EXTRA]  Dumping internal crosstool-NG configuration: done in 0.88s (at 00:34)
[INFO ]  =================================================================
[INFO ]  Retrieving needed toolchain components' tarballs
[INFO ]  Retrieving needed toolchain components' tarballs: done in 1.60s (at 00:36)
[INFO ]  =================================================================
[INFO ]  Extracting and patching toolchain components
[EXTRA]    Extracting 'ncurses-5.7'
[ERROR]    Build failed in step 'Extracting and patching toolchain components'
[ERROR]    Error happened in '/opt/crosstool-ng/lib/ct-ng-1.9.3/scripts/functions' in function 'CT_DoExecLog' (line unknown, sorry)
[ERROR]          called from '/opt/crosstool-ng/lib/ct-ng-1.9.3/scripts/functions' at line # 681 in function 'CT_Extract'
[ERROR]          called from '/opt/crosstool-ng/lib/ct-ng-1.9.3/scripts/build/debug/300-gdb.sh' at line # 65 in function 'do_debug_gdb_extract'
[ERROR]          called from '/opt/crosstool-ng/lib/ct-ng-1.9.3/scripts/build/debug.sh' at line # 28 in function 'do_debug_extract'
[ERROR]          called from '/opt/crosstool-ng/lib/ct-ng-1.9.3/scripts/crosstool-NG.sh' at line # 569 in function 'main'
[ERROR]    Look at '/home/CLi/develop/crosstool-ng/x-tools/arm-xscale-linux-gnueabi/build.log' for more info on this error.
[ERROR]  (elapsed: 0:38.28)
[00:43] / /opt/crosstool-ng/bin/ct-ng:143: recipe for target `build' failed
make: *** [build] Error 2

但是很诡异的是,log文件:

D:\tmp\tmp_dev_root\cgwin\home\CLi\develop\crosstool-ng\x-tools\arm-xscale-linux-gnueabi\build.log

中的log内容,没有任何变化:

6.删除:

.ncurses-5.7.extracting

ncurses-5.7.tar.bz2

让其自己下载试试是否会出错。

7.不过,突然发现,原来这里:

D:\tmp\tmp_dev_root\cgwin\home\CLi\develop\crosstool-ng\crosstool-ng-1.9.3_build\targets\tarballs\ncurses-5.7.tar.gz

还有个ncurses-5.7.tar.gz,所以刚才才出问题,不是用我最新的ncurses-5.7.tar.bz2,所以,删除:

D:\tmp\tmp_dev_root\cgwin\home\CLi\develop\crosstool-ng\crosstool-ng-1.9.3_build\targets\tarballs\ncurses-5.7.tar.gz

再拷贝ncurses-5.7.tar.bz2到:

D:\tmp\tmp_dev_root\cgwin\home\CLi\develop\crosstool-ng\crosstool-ng-1.9.3_build\targets\src

重新编译试试,然后貌似终于可以了:

[EXTRA]    Extracting 'ncurses-5.7'
[EXTRA]    Patching 'ncurses-5.7'

8.但是接着又出现了同样的错误,但是是对于expat-2.0.1的:

CLi@PC-CLI-1 ~/develop/crosstool-ng/crosstool-ng-1.9.3_build
$ ct-ng build
[INFO ]  Performing some trivial sanity checks
[INFO ]  Build started 20130723.172851
[INFO ]  Building environment variables
[EXTRA]  Preparing working directories
[EXTRA]  Installing user-supplied crosstool-NG configuration
[EXTRA]  =================================================================
[EXTRA]  Dumping internal crosstool-NG configuration
[EXTRA]    Building a toolchain for:
[EXTRA]      build  = i686-pc-cygwin
[EXTRA]      host   = i686-pc-cygwin
[EXTRA]      target = arm-xscale-linux-gnueabi
[EXTRA]  Dumping internal crosstool-NG configuration: done in 0.91s (at 00:33)
[INFO ]  =================================================================
[INFO ]  Retrieving needed toolchain components' tarballs
[INFO ]  Retrieving needed toolchain components' tarballs: done in 1.85s (at 00:36)
[INFO ]  =================================================================
[INFO ]  Extracting and patching toolchain components
[EXTRA]    Extracting 'ncurses-5.7'
[EXTRA]    Patching 'ncurses-5.7'
[EXTRA]    Extracting 'expat-2.0.1'
[ERROR]    Build failed in step 'Extracting and patching toolchain components'
[ERROR]    Error happened in '/opt/crosstool-ng/lib/ct-ng-1.9.3/scripts/functions' in function 'CT_DoExecLog' (line unknown, sorry)
[ERROR]          called from '/opt/crosstool-ng/lib/ct-ng-1.9.3/scripts/functions' at line # 681 in function 'CT_Extract'
[ERROR]          called from '/opt/crosstool-ng/lib/ct-ng-1.9.3/scripts/build/debug/300-gdb.sh' at line # 70 in function 'do_debug_gdb_extract'
[ERROR]          called from '/opt/crosstool-ng/lib/ct-ng-1.9.3/scripts/build/debug.sh' at line # 28 in function 'do_debug_extract'
[ERROR]          called from '/opt/crosstool-ng/lib/ct-ng-1.9.3/scripts/crosstool-NG.sh' at line # 569 in function 'main'
[ERROR]    Look at '/home/CLi/develop/crosstool-ng/x-tools/arm-xscale-linux-gnueabi/build.log' for more info on this error.
[ERROR]  (elapsed: 1:30.63)
[01:35] / /opt/crosstool-ng/bin/ct-ng:143: recipe for target `build' failed
make: *** [build] Error 2

然后去看了看:

(1)

D:\tmp\tmp_dev_root\cgwin\home\CLi\develop\crosstool-ng\crosstool-ng-1.9.3_build\targets\src

中,没有任何关于expat-2.0.1的tar包或类似的.expat-2.0.1.extracting的文件。

(2)D:\tmp\tmp_dev_root\cgwin\home\CLi\develop\crosstool-ng\src

中的确有:expat-2.0.1.tar.gz

但是size是1KB:

expat only 1kB size

很明显不是合法的tar包。

所以:

(1)先去删除:

D:\tmp\tmp_dev_root\cgwin\home\CLi\develop\crosstool-ng\crosstool-ng-1.9.3_build\targets\tarballs

中的

expat-2.0.1.tar.gz

(2)再去删除:

D:\tmp\tmp_dev_root\cgwin\home\CLi\develop\crosstool-ng\src

中的:

expat-2.0.1.tar.gz

(3)重新下载一个完整的:

http://www.linuxfromscratch.org/blfs/view/6.3/general/expat.html

->

http://downloads.sourceforge.net/expat/expat-2.0.1.tar.gz

->

或:

http://zh.sourceforge.jp/projects/sfnet_expat/downloads/expat/2.0.1/expat-2.0.1.tar.gz/

->

expat-2.0.1.tar.gz

得到436KB的:

expat-2.0.1.tar.gz

然后,拷贝到:

D:\tmp\tmp_dev_root\cgwin\home\CLi\develop\crosstool-ng\crosstool-ng-1.9.3_build\targets\src

然后重新编译试试,结果还是错误:

CLi@PC-CLI-1 ~/develop/crosstool-ng/crosstool-ng-1.9.3_build
$ ct-ng build
[INFO ]  Performing some trivial sanity checks
[INFO ]  Build started 20130723.174202
[INFO ]  Building environment variables
[EXTRA]  Preparing working directories
[EXTRA]  Installing user-supplied crosstool-NG configuration
[EXTRA]  =================================================================
[EXTRA]  Dumping internal crosstool-NG configuration
[EXTRA]    Building a toolchain for:
[EXTRA]      build  = i686-pc-cygwin
[EXTRA]      host   = i686-pc-cygwin
[EXTRA]      target = arm-xscale-linux-gnueabi
[EXTRA]  Dumping internal crosstool-NG configuration: done in 0.90s (at 00:34)
[INFO ]  =================================================================
[INFO ]  Retrieving needed toolchain components' tarballs
[INFO ]  Retrieving needed toolchain components' tarballs: done in 1.86s (at 00:36)
[INFO ]  =================================================================
[INFO ]  Extracting and patching toolchain components
[ERROR]    The 'expat-2.0.1' sources were partially extracted.
[ERROR]    Please remove first:
[ERROR]     - the source dir for 'expat-2.0.1', in '/home/CLi/develop/crosstool-ng/crosstool-ng-1.9.3_build/targets/src'
[ERROR]     - the file '/home/CLi/develop/crosstool-ng/crosstool-ng-1.9.3_build/targets/src/.expat-2.0.1.extracting'
[ERROR]    I'll stop now to avoid any carnage...
[00:42] / /opt/crosstool-ng/bin/ct-ng:143: recipe for target `build' failed
make: *** [build] Error 1

9.估计是要用expat-2.0.1.tar.bz2才可以。

所以去找,http://zh.sourceforge.jp/projects/sfnet_devkitpro/downloads/portlibs/src/expat-2.0.1.tar.bz2/

->

expat-2.0.1.tar.bz2

(或expat-2.0.1.tar.bz2

然后

(1)删除:

D:\tmp\tmp_dev_root\cgwin\home\CLi\develop\crosstool-ng\crosstool-ng-1.9.3_build\targets\src

中的.expat-2.0.1.extracting和expat-2.0.1.tar.gz

(2)删除

D:\tmp\tmp_dev_root\cgwin\home\CLi\develop\crosstool-ng\crosstool-ng-1.9.3_build\targets\tarballs

中的

expat-2.0.1.tar.gz

(3)拷贝刚下载的336KB的expat-2.0.1.tar.bz2到:

D:\tmp\tmp_dev_root\cgwin\home\CLi\develop\crosstool-ng\crosstool-ng-1.9.3_build\targets\src

然后再次编译试试,最后终于可以了:

[EXTRA]    Extracting 'expat-2.0.1'
[EXTRA]    Patching 'expat-2.0.1'

 

【总结】

当编译crosstool时,出现类似于:

[EXTRA]    Extracting 'ncurses-5.7'
[ERROR]    Build failed in step 'Extracting and patching toolchain components'
[ERROR]    Error happened in '/opt/crosstool-ng/lib/ct-ng-1.9.3/scripts/functions' in function 'CT_DoExecLog' (line unknown, sorry)
[ERROR]          called from '/opt/crosstool-ng/lib/ct-ng-1.9.3/scripts/functions' at line # 681 in function 'CT_Extract'
[ERROR]          called from '/opt/crosstool-ng/lib/ct-ng-1.9.3/scripts/build/debug/300-gdb.sh' at line # 65 in function 'do_debug_gdb_extract'
[ERROR]          called from '/opt/crosstool-ng/lib/ct-ng-1.9.3/scripts/build/debug.sh' at line # 28 in function 'do_debug_extract'
[ERROR]          called from '/opt/crosstool-ng/lib/ct-ng-1.9.3/scripts/crosstool-NG.sh' at line # 569 in function 'main'
[ERROR]    Look at '/home/CLi/develop/crosstool-ng/x-tools/arm-xscale-linux-gnueabi/build.log' for more info on this error.

的错误时,原因和解决办法是:

(以此处的ncurses-5.7为例)

1.对应的库文件是xxx.tar.gz

比如

ncurses-5.7

所对应的:

ncurses-5.7.tar.gz,所以出错。

解决办法:

换成ncurses-5.7.tar.bz2

 

2.用到的tar包,的确本身是有问题的

要么是,crosstool自动通过网络下载,结果中间出错,只下载了部分,没下载完全,所以gzip解压出错;

要么是,你自己下载的,然后拷贝过来的,结果不小心,也是下载了部分内容,tar包不完整,导致gzip解压出错。

解决办法:

删除旧的文件,比如ncurses-5.7.tar.bz2

重新下载一个,完整的。

 

注意:

不论哪种原因,都要注意的是,要去:

(1)删除:

crosstool-ng\crosstool-ng-1.9.3_build\targets\src

中的.ncurses-5.7.extracting和ncurses-5.7.tar.gz

(2)删除

crosstool-ng\crosstool-ng-1.9.3_build\targets\tarballs

中的

ncurses-5.7.tar.gz

(3)拷贝最新的

ncurses-5.7.tar.bz2

到:

crosstool-ng\crosstool-ng-1.9.3_build\targets\src



发表评论

电子邮件地址不会被公开。 必填项已用*标注

无觅相关文章插件,快速提升流量