【问题标题】:crosstool-ng build failcrosstool-ng 构建失败
【发布时间】:2011-06-29 18:21:56
【问题描述】:

我正在使用来自Free-Electrons.com的指南

我正在尝试安装 crosstool-ng 编译器,并已转到第 6 页标题为 Produce The Toolchain 下运行以下命令的位置。

./ct-ng build

需要注意的是文章说要使用Release 1.4.2 of Crosstool-ng,我已经这样做了。

在构建过程中它会失败,说它无法下载 sstrip 这似乎记录在 here

失败示例:

[INFO ]  Retrieving needed toolchain components' tarballs
[EXTRA]    Retrieving 'sstrip'
[ERROR]    Could not retrieve 'sstrip'.
[00:10] / make: *** [build] Error 1

简而言之,原因是存储库已移动,并且发布的解决方案是:

Yes, the buildroot repository has migrated to git from svn after the 1.4.0
release was out, so 1.4.0 still uses the old URL.

Please try:
http://ymorin.is-a-geek.org/download/crosstool-ng/01-fixes/1.4.0/002-sstrip-URL.patch
And while you're at it, you should also apply both of:
http://ymorin.is-a-geek.org/download/crosstool-ng/01-fixes/1.4.0/000-glibc-2.8+_from_cvs_if_addon.patch
http://ymorin.is-a-geek.org/download/crosstool-ng/01-fixes/1.4.0/001-glibc_force_ports_ARM_MIPS.patch

好的,所以安装补丁有点奇怪,但基于README

补丁应该直接在顶层应用 crosstool-NG 目录,命令如下:

patch -p1 < ..../xxx-blabla.patch

(将 ..../xxx-blabla.patch 替换为实际的补丁名称)

所以我做的是:

%> patch -p1 /felabs/sysdev/toolchain/crosstool-ng-1.4.2/scripts/build/tools/200-sstrip.sh<002-sstrip-URL.patch

我不确定上面的命令是否正确,但是在运行 ./ct-ng build 后,它现在会下载脚本,所以我想没问题。

我应该应用其他两个补丁,但不确定源文件,无论如何新版本一直持续到这一点:

[INFO ]  Build started 20110629.182838
[INFO ]  Checking environment sanity
[INFO ]  Building environment variables
[EXTRA]  Preparing working directories
[WARN ]  You did not specify the build system. That's OK, I can guess...
[EXTRA]  Installing user-supplied crosstool-NG configuration
[EXTRA]  =================================================================
[EXTRA]  Dumping internal crosstool-NG configuration
[EXTRA]    Building a toolchain for:
[EXTRA]      build  = i686-linux-gnu
[EXTRA]      host   = i686-linux-gnu
[EXTRA]      target = arm-unknown-linux-uclibcgnueabi
[EXTRA]  Dumping internal crosstool-NG configuration: done in 0.05s (at 00:01)
[INFO ]  =================================================================
[INFO ]  Retrieving needed toolchain components' tarballs
[EXTRA]    Retrieving 'ltrace_0.5.orig'
[EXTRA]    Saving 'ltrace_0.5.orig.tar.gz' to local storage
[EXTRA]    Retrieving 'strace-4.5.17'
[EXTRA]    Saving 'strace-4.5.17.tar.bz2' to local storage
[INFO ]  Retrieving needed toolchain components' tarballs: done in 8.54s (at 00:09)
[INFO ]  =================================================================
[INFO ]  Extracting and patching toolchain components
[INFO ]  Extracting and patching toolchain components
[EXTRA]    Extracting 'linux-2.6.29'
[EXTRA]    Patching 'linux-2.6.29'
[EXTRA]    Extracting 'gmp-4.2.4'
[EXTRA]    Patching 'gmp-4.2.4'
[EXTRA]    Extracting 'mpfr-2.4.1'
[EXTRA]    Patching 'mpfr-2.4.1'
[EXTRA]    Extracting 'binutils-2.19.1'
[EXTRA]    Patching 'binutils-2.19.1'
[EXTRA]    Extracting 'gcc-4.3.2'
[EXTRA]    Patching 'gcc-4.3.2'
[EXTRA]    Extracting 'uClibc-0.9.30.1'
[EXTRA]    Patching 'uClibc-0.9.30.1'    
[EXTRA]    Extracting 'libelf-0.8.10'
[EXTRA]    Patching 'libelf-0.8.10'
[EXTRA]    Extracting 'sstrip'
[EXTRA]    Patching 'sstrip'
[EXTRA]    Extracting 'gdb-6.8'
[ERROR]    Build failed in step 'Extracting and patching toolchain components'
[ERROR]    Error happened in '/home/swamprat/felabs/sysdev/toolchain/crosstool-ng-1.4.2/scripts/functions' in function 'CT_DoExecLog' (line unknown, sorry)
[ERROR]          called from '/home/swamprat/felabs/sysdev/toolchain/crosstool-ng-1.4.2/scripts/functions' at line # 535 in function 'CT_Extract'
[ERROR]          called from '/home/swamprat/felabs/sysdev/toolchain/crosstool-ng-1.4.2/scripts/build/debug/300-gdb.sh' at line # 60 in function 'do_debug_gdb_extract'
[ERROR]          called from '/home/swamprat/felabs/sysdev/toolchain/crosstool-ng-1.4.2/scripts/build/debug.sh' at line # 28 in function 'do_debug_extract'
[ERROR]          called from '/home/swamprat/felabs/sysdev/toolchain/crosstool-ng-1.4.2/scripts/crosstool-NG.sh' at line # 470 in function 'main'
[ERROR]    Look at '/usr/local/xtools/arm-unknown-linux-uclibcgnueabi/build.log' for more info on this error.
[ERROR]  (elapsed: 1:53.45)
[01:53] / make: *** [build] Error 2

这就是我遇到任何想法的地方吗?

【问题讨论】:

  • 您忘记提及提到的build.log 文件中的发现。与运行 ct-ng build 时获得的更简洁的输出相比,此处将详细描述原因。

标签: gcc cross-platform beagleboard


【解决方案1】:

解决方案是使用最新的 1.11.x 版本的Crosstool-ng

【讨论】:

    【解决方案2】:

    可能性和解决方案:

    • 您使用的是 xxx.tar.gz

    解决方案:

    使用xxx.tar.bz2 而不是xxx.tar.gz

    • tar 球文件不完整

    不管你是下载tar还是使用crosstool自动下载,只要:

    解决方案:

    确保 tar 文件,例如 xxx.tar.bz2 为 intact, not broken

    更多详情,请参考我的帖子: crosstool build error:in function ‘CT_Extract’

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 2018-08-05
      • 2022-06-29
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2023-03-21
      • 1970-01-01
      相关资源
      最近更新 更多