binutils errors compiling OE
The second problem I encountered in building OpenEmbedded for our Gumstix devices was a failure when downloading binutils. Specifically, the checksum found for the downloaded file didn’t match the one that the build process expected. The message given is:
NOTE: The MD5Sums did not match. Wanted: ‘9d22ee4dafa3a194457caf4706f9cf01’ and Got: ‘ccd264a5fa9ed992a21427c69cba91d3’
NOTE: Task failed: Checksum of ‘ftp://ftp.gnu.org/gnu/binutils/binutils-2.18.tar.bz2’ failed
NOTE: package binutils-cross-2.18-r1: task do_fetch: failed
ERROR: TaskFailed event exception, aborting
NOTE: package binutils-cross-2.18: failed
ERROR: Build of /home/kemp/gumstix/gumstix-oe/org.openembedded.snapshot/packages/binutils/binutils-cross_2.18.bb do_fetch failed
ERROR: Task 317 (/home/kemp/gumstix/gumstix-oe/org.openembedded.snapshot/packages/binutils/binutils-cross_2.18.bb, do_fetch) failed
The error is due to an incompatibility between older versions of binutils and newer versions of texinfo. This post show you how to resolve this.
The first step is to open up checksums.ini (found at $GUMSTIXTOP/org.openembedded.snapshot/conf) and edit the following block:
[ftp://ftp.gnu.org/gnu/binutils/binutils-2.18.tar.bz2] md5=9d22ee4dafa3a194457caf4706f9cf01 sha256=487a33a452f0edcf1f8bb8fc23dff5c7a82edec3f3f8b65632b6c945e961ee9b
[ftp://ftp.gnu.org/gnu/binutils/binutils-2.18.tar.bz2] md5=ccd264a5fa9ed992a21427c69cba91d3 sha256=4515254f55ec3d8c4d91e7633f3850ff28f60652b2d90dc88eef47c74c194bc9
Additionally, texinfo throws an error (which you may have to scroll back a bit through the log to find):
| /home/kemp/gumstix/gumstix-oe/tmp/work/armv5te-angstrom-linux-gnueabi/binutils-cross-2.18-r1/binutils-2.18/bfd/doc/bfd.texinfo:326: unknown command `colophon’
| /home/kemp/gumstix/gumstix-oe/tmp/work/armv5te-angstrom-linux-gnueabi/binutils-cross-2.18-r1/binutils-2.18/bfd/doc/bfd.texinfo:337: unknown command `cygnus’
| ./elf.texi:11: raising the section level of @subsubsection which is too low
To resolve this one, which can only be done once a build has failed, as we’re going to work on the temporary files, open up bfd.texinfo (in $GUMSTIXTOP/tmp/work/armv5te-angstrom-linux-gnueabi/binutils-cross-2.18-r1/binutils-2.18/bfd/doc) and edit the following lines:
% I think something like @colophon should be in texinfo. In the [...] % Blame: firstname.lastname@example.org, 28mar91.
% I think something like @@colophon should be in texinfo. In the [...] % Blame: doc@@cygnus.com, 28mar91.
(The change is the additional ‘@’ on each line.)
Finally, open up elf.texi (in $GUMSTIXTOP/tmp/work/armv5te-angstrom-linux-gnueabi/binutils-cross-2.18-r1/binutils-2.18/build.x86_64-linux.arm-angstrom-linux-gnueabi/bfd/doc) and change:
(Note that this is not the elf.texi in the same directory as the first file you edited.)
I don’t have much experience with this build environment, so if anyone can tell me how to patch these items “correctly” then please do.
Now binutils should successfully compile.