Building x-tools - where to find the custom binutils?

This forum is for discussion about general software issues.

Building x-tools - where to find the custom binutils?

Postby tamjan » Wed Aug 24, 2016 6:23 am

Hi,

I'm trying to build x-tools6h and get an error since there are no instructions on wherefrom to fetch the custom binutils:

[INFO ] Performing some trivial sanity checks
[INFO ] Build started 20160824.074518
[INFO ] Building environment variables
[EXTRA] Preparing working directories
[EXTRA] Installing user-supplied crosstool-NG configuration
[EXTRA] =================================================================
[EXTRA] Dumping internal crosstool-NG configuration
[EXTRA] Building a toolchain for:
[EXTRA] build = x86_64-pc-linux-gnu
[EXTRA] host = x86_64-pc-linux-gnu
[EXTRA] target = arm-unknown-linux-gnueabihf
[EXTRA] Dumping internal crosstool-NG configuration: done in 0.08s (at 00:02)
[INFO ] =================================================================
$ ct-ng build
[INFO ] Retrieving needed toolchain components' tarballs
[EXTRA] Retrieving 'linux-4.5.2'
[EXTRA] Saving 'linux-4.5.2.tar.xz' to local storage
[EXTRA] Retrieving 'gmp-6.1.0'
[EXTRA] Saving 'gmp-6.1.0.tar.xz' to local storage
[EXTRA] Retrieving 'mpfr-3.1.4'
[EXTRA] Saving 'mpfr-3.1.4.tar.xz' to local storage
[EXTRA] Retrieving 'isl-0.16.1'
[EXTRA] Saving 'isl-0.16.1.tar.xz' to local storage
[EXTRA] Retrieving 'mpc-1.0.3'
[EXTRA] Saving 'mpc-1.0.3.tar.gz' to local storage
[EXTRA] Retrieving 'libiconv-1.14'
[EXTRA] Saving 'libiconv-1.14.tar.gz' to local storage
[EXTRA] Retrieving 'gettext-0.19.6'
[EXTRA] Saving 'gettext-0.19.6.tar.xz' to local storage
[ERROR] binutils: Unable to read /home/user/cross/src/binutils-2.26.tar.gz, make sure the setting is correct and double check the permissions!
[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@369]
[ERROR] >> called from: CT_GetCustom[scripts/functions@692]
[ERROR] >> called from: do_binutils_get[scripts/build/binutils/binutils.sh@8]
[ERROR] >> called from: main[scripts/crosstool-NG.sh@570]
[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/crosstool-ng/crosstool-ng-1.22.0-201-g11cb2dd/B - Known issues.txt'
[ERROR]
[ERROR] (elapsed: 1:51.81)
[01:52] / make: *** [/usr/bin/ct-ng:152: build] Error 1

I want to build my own since I want to use the chain on hosts that are not Arch, and the prebuilt ones throw an error there. The error above is on an Arch system, however (I wanted to make sure it didn't work on that either).

Anyways, this means that the description on the wiki on how to build your own do not work. Could somebody please advise?
tamjan
 
Posts: 19
Joined: Tue Jan 14, 2014 7:23 am
Location: Lund, Sweden

Re: Building x-tools - where to find the custom binutils?

Postby moonman » Wed Aug 24, 2016 6:38 am

Download the file manually and put it where crosstool-ng expects it
Pogoplug V4 | GoFlex Home | Raspberry Pi 4 4GB | CuBox-i4 Pro | ClearFog | BeagleBone Black | Odroid U2 | Odroid C1 | Odroid XU4
-----------------------------------------------------------------------------------------------------------------------
[armv5] Updated U-Boot | [armv5] NAND Rescue System
moonman
Developer
 
Posts: 3388
Joined: Sat Jan 15, 2011 3:36 am

Re: Building x-tools - where to find the custom binutils?

Postby tamjan » Wed Aug 24, 2016 9:04 am

Thank you for you your reply. But, uh... It's that easy? I just take the standard binutils source dist? Why is this step needed, then? Why is the config not set tuo ct-ng download this source package like the others? :S
tamjan
 
Posts: 19
Joined: Tue Jan 14, 2014 7:23 am
Location: Lund, Sweden

Re: Building x-tools - where to find the custom binutils?

Postby tamjan » Wed Aug 24, 2016 1:52 pm

Well, I built it on an Arch distribution, but had to add some stuff of my own. Here is my script:

$this->bbcode_second_pass_code('', '
#!/bin/bash
rm -rf ~/xtools-6h* ~/cross

mkdir -p ~/cross\:src
pushd ~/cross\:src
[[ -f 'binutils-2.26.tar.gz' ]] || wget 'http://ftp.gnu.org/gnu/binutils/binutils-2.26.tar.gz'
[[ -f 'gcc-6.1.1.tar.gz' ]] || wget -O- 'https://github.com/gcc-mirror/gcc/archive/36375203.tar.gz' > gcc-6.1.1.tar.gz
[[ -f 'glibc-2.23.tar.gz' ]] || wget 'http://ftp.gnu.org/gnu/glibc/glibc-2.23.tar.gz'
popd

mkdir -p ~/cross/bin
( cd ~/cross && ln -s ../cross\:src src )

pushd ~/cross/bin
wget -O- 'http://archlinuxarm.org/builder/xtools/xtools-dotconfig-v6' > .config
sed -i -E '\@^CT_LIBC_GLIBC_EXTRA_CONFIG_ARRAY@s@^CT_LIBC_GLIBC_EXTRA_CONFIG_ARRAY="(.*)"$@CT_LIBC_GLIBC_EXTRA_CONFIG_ARRAY="\1 --disable-werror"@' .config || exit 1
sed -i -E '\@^CT_CC_GCC_CORE_EXTRA_CONFIG_ARRAY@s@^CT_CC_GCC_CORE_EXTRA_CONFIG_ARRAY="(.*)"$@CT_CC_GCC_CORE_EXTRA_CONFIG_ARRAY="\1 --disable-werror"@' .config || exit 1
sed -i -E '\@^CT_CC_GCC_EXTRA_CONFIG_ARRAY@s@^CT_CC_GCC_EXTRA_CONFIG_ARRAY="(.*)"$@CT_CC_GCC_EXTRA_CONFIG_ARRAY="\1 --disable-werror"@' .config || exit 1
ct-ng build
popd
')

Haven't tried to use this toolchain yet, but at least building it worked. I'd suggest a wiki update.
tamjan
 
Posts: 19
Joined: Tue Jan 14, 2014 7:23 am
Location: Lund, Sweden


Return to General

Who is online

Users browsing this forum: No registered users and 4 guests