Skip to content

Resolving download issues (e.g isl-0.20, expat-2.2.6) #1625

@cpackham

Description

@cpackham

Introduction

This issue documents how to resolve download issues for packages which have moved hosting since crosstool-ng-1.24.0 was released (it will likely remain applicable to future versions as well). This is mainly being done so it can be referred to when duplicate issues are reported

Example Error

[INFO ]  Retrieving needed toolchain components' tarballs
[EXTRA]    Retrieving 'isl-0.20'
[ERROR]    isl: download failed
[ERROR]   
[ERROR]  >>
[ERROR]  >>  Build failed in step 'Retrieving needed toolchain components' tarballs'
[ERROR]  >>        called in step '(top-level)'
[ERROR]  >>
[ERROR]  >>  Error happened in: CT_Abort[scripts/functions@487]
[ERROR]  >>        called from: CT_DoFetch[scripts/functions@2103]
[ERROR]  >>        called from: CT_PackageRun[scripts/functions@2063]
[ERROR]  >>        called from: CT_Fetch[scripts/functions@2174]
[ERROR]  >>        called from: do_isl_get[scripts/build/companion_libs/121-isl.sh@16]
[ERROR]  >>        called from: do_companion_libs_get[scripts/build/companion_libs.sh@15]
[ERROR]  >>        called from: main[scripts/crosstool-NG.sh@648]
[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/manual/B_Known_issues.md'
[ERROR]  >>
[ERROR]  >>  If you feel this is a bug in crosstool-NG, report it at:
[ERROR]  >>      https://github.com/crosstool-ng/crosstool-ng/issues/
[ERROR]  >>
[ERROR]  >>  Make sure your report includes all the information pertinent to this issue.
[ERROR]  >>  Read the bug reporting guidelines here:
[ERROR]  >>      http://crosstool-ng.github.io/support/
[ERROR]   
[ERROR]  (elapsed: 1:39.53)
[01:39] / make: *** [ct-ng:261: build] Error 1

Fixes

  1. Build from master
  2. Modify config
  3. Pre-downloaded source

Build from master

The master branch of the crosstool-ng repo has been updated with the current URLs.

git clone https://github.com/crosstool-ng/crosstool-ng.git
cd crosstool-ng
./bootstrap
./configure
make
sudo make install
cd ~
ct-ng <sample-name>
ct-ng build

Modify Config

At the time of writing isl now hosts it's source tarballs at https://libisl.sourceforge.io/. The un-renamed expat tarball is available at https://github.com/libexpat/libexpat/releases/download/R_2_2_6/expat-2.2.6.tar.bz2. To use these new locations we need to configure custom locations for the affected components.

curl http://crosstool-ng.org/download/crosstool-ng/crosstool-ng-1.24.0.tar.bz2 | tar -xj
cd crosstool-ng-1.24.0
./configure
make
sudo make install
cd ~
ct-ng <sample-name>
sed -e 's|CT_ISL_MIRRORS=.*$|CT_ISL_MIRRORS="https://libisl.sourceforge.io"|' \
    -e 's|CT_EXPAT_MIRRORS=.*$|CT_EXPAT_MIRRORS="https://github.com/libexpat/libexpat/releases/download/R_2_2_6"|' \
    -i .config
ct-ng build

Pre-download Source

By default crosstool-ng saves the downloaded sources in ~/src. If the source is already there it won't download it again. We can make use of this by pre-downloading the moved tarballs.

mkdir -p ~/src
wget -P ~/src https://libisl.sourceforge.io/isl-0.20.tar.bz2
wget -P ~/src https://github.com/libexpat/libexpat/releases/download/R_2_2_6/expat-2.2.6.tar.bz2
curl http://crosstool-ng.org/download/crosstool-ng/crosstool-ng-1.24.0.tar.bz2 | tar -xj
cd crosstool-ng-1.24.0
./configure
make
sudo make install
cd ~
ct-ng <sample-name>
ct-ng build

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions