如何解決 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-lib。但我從源頭建構了 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 的目錄。

相關內容