5.2.1.2. Build failed in step ‘Extracting and patching toolchain components’,in function ‘CT_DoExecLog’ (line unknown, sorry)

错误现象:

cygwin下ct-ng build去编译crosstool-ng出现:


[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

            

原因:

此处遇到此问题的原因,好像是:

由于之前下载过程中,由于某种原因,比如网络不稳定等,而导致下载下来的源码包不是完整的

从而导致后续的解压和打补丁出错。

解决办法:

去确定,你当前正在处理,即正在解压和打包的是哪个软件包

然后去重新下载一个对应的,完整的无误的,该版本的软件包

放到对应的目录下即可。

比如:此处正在处理的是ncurses的5.7版本的源码包

对应的文件是:ncurses-5.7.tar.gz

所以去:

  1. 删除

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

    中的.ncurses-5.7.extractingncurses-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

如果你遇到类似问题,参考上面的步骤,去试试,应该就可以解决此类问题了。

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