使用 crosstool-ng 构建 ARM 交叉编译器失败

Failed to build an ARM cross compiler with crosstool-ng

我正在做一个从 Free Electron 到构建交叉编译工具链的实验 但是当我 运行 构建命令时,它在下载东西后不久就失败了...

我的东西:xubuntu 14.04.3 | crosstool-ng-1.19.0

当我运行 ./ct-ng build

[DEBUG]    Entering '/home/thibaut/felabs/sysdev/toolchain/crosstool-ng-1.19.0/.build/src/mpfr-2.4.2'
[DEBUG]    Running autoreconf
[DEBUG]    ==> Executing: 'autoreconf' 
[ALL  ]    aclocal: warning: autoconf input should be named 'configure.ac', not 'configure.in'
[ERROR]    configure.in:294: error: automatic de-ANSI-fication support has been removed
[ALL  ]    /usr/share/aclocal-1.14/obsolete.m4:26: AM_C_PROTOTYPES is expanded from...
[ALL  ]    configure.in:294: the top level
[ALL  ]    autom4te: /usr/bin/m4 failed with exit status: 1
[ERROR]    aclocal: error: echo failed with exit status: 1
[ALL  ]    autoreconf: aclocal failed with exit status: 1
[ERROR]  
[ERROR]  >>
[ERROR]  >>  Build failed in step 'Extracting and patching toolchain components'
[ERROR]  >>        called in step '(top-level)'
[ERROR]  >>
[ERROR]  >>  Error happened in: CT_DoExecLog[scripts/functions@257]
[ERROR]  >>        called from: do_mpfr_extract[scripts/build/companion_libs/110-mpfr.sh@37]
[ERROR]  >>        called from: do_companion_libs_extract[scripts/build/companion_libs.sh@22]
[ERROR]  >>        called from: main[scripts/crosstool-NG.sh@600]
[ERROR]  >>
[ERROR]  >>  For more info on this error, look at the file: 'build.log'
[ERROR]  >>  There is a list of known issues, some with workarounds, in:
[ERROR]  >>      'docs/B - Known issues.txt'
[ERROR]  
[ERROR]  (elapsed: 0:03.97)

看来 crosstool-ng 使用的 mpfr 版本与您的 autoconf 版本不兼容。我建议尝试更新版本的 crosstool-ng(1.19 版于 2013 年发布)。

如果你真的需要crosstool-ng 1.19,你可以尝试从"Companion tools"编译autoconf版本(必须设置EXPERIMENTAL)。

您也可以尝试安装另一个版本的autoconf。我相信 Ubuntu 14.04 提供了 autoconf 2.13、2.59 和 2.68。你可以试试。

解决方案: 问题是我的 mpfr 版本...所以为了修复我用 ./-ct-ng menuconfig 配置的问题,我告诉他 重建这个模块 。它位于 配套库 .

部分