如何解决 ct-ng 构建中的错误 404 问题?

如何解决 ct-ng 构建中的错误 404 问题?

我通过 YaST (版本 1.21.0-4.22) 获得了适用于 openSuSE 42.2 的 crosstool-ng。安装 crosstool 本身工作正常,但尝试使用 构建交叉编译器时ct-ng build,我收到以下错误消息:

[ALL  ]    --2018-02-01 21:36:27--  https://cbuild.validation.linaro.org/snapshots/binutils-linaro-2.25.0-2015.01-2
[ALL  ]    Connecting to cbuild.validation.linaro.org (cbuild.validation.linaro.org)|51.148.40.7|:443... connected.
[ALL  ]    HTTP request sent, awaiting response... 404 Not Found
[ALL  ]    2018-02-01 21:36:27 ERROR 404: Not Found.
[ALL  ]    
[DEBUG]    Not at this location: "http://cbuild.validation.linaro.org/snapshots/binutils-linaro-2.25.0-2015.01-2"
[ERROR]  
[ERROR]  >>
[ERROR]  >>  Build failed in step 'Retrieving needed toolchain components' tarballs'
[ERROR]  >>        called in step '(top-level)'
[ERROR]  >>
[ERROR]  >>  Error happened in: do_binutils_get[scripts/build/binutils/binutils.sh@741]
[ERROR]  >>        called from: main[scripts/crosstool-NG.sh@584]
[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]  >>      '/usr/share/doc/packages/crosstool-ng/ct-ng.1.21.0/B - Known issues.txt'

问题是:我无法影响 Linaro 的网络服务器的内容。那么有没有办法解决这个问题呢?

答案1

您使用的 ct-ng 1.21 版本非常旧(2015 年 5 月 25 日),链接可能会中断。

我使用 ct-ng 进行了很多交叉编译,并构建了许多 x-libs。但我从源代码构建 ct-ng。我不使用 HEAD 或 MASTER。我尝试使用最新的标签,如果失败,我会选择一个较旧的标签,依此类推,直到找到一个可用的标签。目前对我有用的是“tags/crosstool-ng-1.23.0”。

mkdir -p $HOME/_dev/_build
cd $HOME/_dev/_build

git clone https://github.com/crosstool-ng/crosstool-ng
cd crosstool-ng

# check out an older state, but they are not always error-free
#git checkout master # can have errors
git tag -l # list tags
git checkout tags/crosstool-ng-1.23.0 # choose last tag that works for you

./bootstrap

mkdir -p $HOME/_dev/_bin/ct-ng
./configure --prefix=$HOME/_dev/_bin/ct-ng

make
make install
export PATH="$PATH:$HOME/_dev/_bin/ct-ng/bin" # if you want to use ct-ng in current shell

cd $HOME
rm -rf $HOME/_dev/_build

答案2

好的,我可以自己解决这个问题:我不得不取消选中 Linaro 编译器选项并求助于普通的 gcc。此外,我无法从我的主目录启动配置和构建过程,因为配置工具会将所有内容存储在名为的文件中.config,但已经有一个名为 .config 的目录。

相关内容