cygwinraspberry-picross-compilingeglibc

Unable to build eglibc under cygwin for raspberry pi cross-toolchain


I am using Mikhail Kupchik's tutorial to build a raspberry pi cross-toolchain for Windows. For avoiding problems related to usage of too recent packages I used Cygwin Time Machine. The packages I got are listed here.

According to the manual I installed Windows XP in a VirtualBox and downloaded all needed archives. I merged the steps for preparing the build in one shell script:

#!/bin/bash

cd /opt/crosstool/src
for i in `ls -1 *.tar.gz`
do
    tar -xf $i
    rm -f $i
done

mkdir patches
mv *.diff patches

mkdir -p /opt/crosstool/gcc-4.6.3-eglibc-2.13/arm-linux-gnueabi
mkdir /opt/crosstool/gcc-4.6.3-eglibc-2.13/arm-linux-gnueabihf

cp -r gcc-4.6.3 gcc-4.6.3.noarmhf
cd gcc-4.6.3
cat ../patches/gcc--armhf-triplet.diff | patch -p2
cat ../patches/gcc--arm-dynamic-linker.diff | patch -p2
cat ../patches/gcc--arm-multilib-defaults.diff | patch -p2
cd ../eglibc-2.13
cat ../patches/eglibc--remove-manual.diff | patch -p1
cat ../patches/eglibc--cross-cygwin.diff | patch -p1
cd ..
cp -r eglibc-2.13 eglibc-2.13.noarmhf
cd eglibc-2.13
cat ../patches/eglibc--armhf-triplet.diff | patch -p1
cat ../patches/eglibc--armhf-linker.diff | patch -p1
cat ../patches/eglibc--ldconfig-cache-abi.diff | patch -p1
cat ../patches/eglibc--soname-hack.diff | patch -p1
cd ..
tar -h -zcf gcc-4.6.3-all.tar.gz \
    gcc-4.6.3 gcc-4.6.3.noarmhf

replace () {
    for i in extra-lib.mk Makeconfig Makerules linuxthreads/Makefile \
             nptl/Makefile sysdeps/i386/i686/Makefile sysdeps/sparc/sparc32/sparcv9/Makefile
    do
        sed -i.bak s/\.oS/\.oZ/ $i
    done
}

cd /opt/crosstool/src/eglibc-2.13
replace
cd /opt/crosstool/src/eglibc-2.13.noarmhf
replace

cd /opt/crosstool/src
for i in build-gmp build-mpfr build-mpc build-binutils build-gcc build-eglibc build-linux
do
    mkdir $i
done

Then I execute the build at a blow: for i in ``seq 1 4``; do ./build_gcc_cross_$i.sh; done. The scripts contain build-sets, which come from the tutorial as well. Listings: 1 (original) 2 (original) 3 (original) 4 (original)

The first three build-sets go well. But the fourth fails. On the console I see tons of "file not found" errors. With pleasure I provide full stout+stderr and config.log.

I would appreciate any help concerning my issue.


Solution

  • Shame on me: I didn't read properly the output of the third script and missed the error message:

    /bin/sh: perl: Command not found.
    

    That's probably because the script's output was:

    === build script: OK ===
    

    I noticed then the total lack for error handling in the script.

    After I installed perl, I could proceed with the build of the cross-compiling environment.