Page 1 of 1

Building binutils Error

Posted: Mon Nov 08, 2010 5:05 pm
by Aphex
(I've just changed this topic subject as i realised that i needed to build a cross compiler before i tackled my other problem.)

While making the binutils following a cross compiler tutorial (http://wiki.osdev.org/GCC_Cross-Compiler), I recieve some errors, which are as follows
$ make
make[1]: Entering directory `/usr/src/build-binutils/libiberty'
if [ -n "" ] && [ ! -d pic ]; then \
mkdir pic; \
else true; fi
touch stamp-picdir
echo "# !Automatically generated from ../binutils-2.9.1/libiberty/functions.def"
\
"- DO NOT EDIT!" >needed2.awk
grep '^DEFVAR(' < ../binutils-2.9.1/libiberty/functions.def \
| sed -e '/DEFVAR/s|DEFVAR.\([^,]*\).*|/\1/ { printf "#ifndef NEED_\1\\
n#define NEED_\1\\n#endif\\n" }|' \
>>needed2.awk
grep '^DEFFUNC(' < ../binutils-2.9.1/libiberty/functions.def \
| sed -e '/DEFFUNC/s|DEFFUNC.\([^,]*\).*|/\1/ { printf "#ifndef NEED_\1
\\n#define NEED_\1\\n#endif\\n" }|' \
>>needed2.awk
gcc -c -g -O2 -I. -I../binutils-2.9.1/libiberty/../include -DNEED_sys_siglist -D
NEED_basename -DNEED_strsignal ../binutils-2.9.1/libiberty/dummy.c 2>/dev/null
make[1]: *** [dummy.o] Error 3
make[1]: Leaving directory `/usr/src/build-binutils/libiberty'
make: *** [all-libiberty] Error 2
this was after typing the "make all "command.

I followed the tutorial exactly and searched all around to find the answer, has anyone got any ideas?

Re: Building binutils Error

Posted: Mon Nov 08, 2010 7:34 pm
by gerryg400
Your binutils is old. Note that binutils 2.10 is newer than binutils 2.9. So the latest binutils is 2.20.x

Re: Building binutils Error

Posted: Mon Nov 08, 2010 8:59 pm
by TylerH
Explanation:
Step 1 - Bootstrap wrote:Note: The versioning scheme used is that each fullstop separates a full number, i.e. binutils 2.20.0 is newer than 2.9.0. This may be confusing, if you have not encountered this (quite common) versioning scheme yet, when looking at an alphanumerically sorted list of tarballs: The file at the bottom of the list is not the latest version!

Re: Building binutils Error

Posted: Tue Nov 09, 2010 11:39 am
by Aphex
Yes, I have used a new version 2.20.1 and it compiles fine, thanks. Now to see if i can compile my kernel.

Re: Building binutils Error

Posted: Tue Nov 09, 2010 3:37 pm
by Aphex
Finally, I got my cross compiler built correctly and booted my first kernel using GRUB. :D

I ended up using bibutils-2.20 and gcc-4.5.1. I also installed all the other packages recommended on the Cross comiler tutorial on osdev, then just followed the bare bones tutorial using my shiny new cross compiler.

Sorry for the slightly redundant post, and thanks for your help, i'll be back.