Saturday, October 27, 2012

Building a Raspberry Pi Cross Compiler: could not retrieve eglibc-2_16

tl;dr svn is required to fetch eglibc-2_16 when building a Raspberry Pi cross compiler with crosstool-NG

The Raspberry Pi is a great little device. While it's possible to do compiles on the platform, because of limited memory/CPU, for bigger binaries it's faster to work on my regular desktop box.

I'm using crosstool-NG to build a toolchain for cross compiling binaries for the Raspberry Pi.
Following along Chris Boot's steps from How to build a cross compiler for your Raspberry Pi, the final build failed during the "Retrieving needed toolchain components' tarballs" step with the error

ct-ng could not retrieve eglibc-2_16

Looks like the the eglibc folk don't provide tarball releases, so svn is required to fetch eglibc.
Installed Subversion, and had a successful build.

Just for the records, the final list of packages needed for building the cross compiler were:
sudo apt-get -y install libssl-dev openssh-server git-core pkg-config build-essential curl gcc g++
sudo apt-get -y install bison flex gperf libtool texinfo gawk automake libncurses5-dev
sudo apt-get -y install subversion

Update: If you're planning on cross compiling Node.js (build time: 10 minutes instead of 2 hours!), make sure to enable C++ from within ct-ng menuconfig (under C-compiler > Additional supported languages)

3 comments:

  1. I have the same problem with eglibc-2_16 as you describe. Would it be possible to have a more detailed description on how you solved the problem using svn.

    Regards

    stenhh

    ReplyDelete
    Replies
    1. The svn command was installed as part of the subversion package ("sudo apt-get -y install subversion"). After it was installed, the "Retrieving needed toolchain components" step was able to fetch eglibc-2_16 and the build completed.

      Delete
  2. thanks i've the same problem on fedora and i solve with your suggest to install subversion.
    in my case i've must write yum install -y subversion

    thanks.

    ReplyDelete