Building binutils Error

Question about which tools to use, bugs, the best way to implement a function, etc should go here. Don't forget to see if your question is answered in the wiki first! When in doubt post here.
Post Reply
Aphex
Posts: 15
Joined: Mon Nov 23, 2009 5:57 pm

Building binutils Error

Post 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?
gerryg400
Member
Member
Posts: 1801
Joined: Thu Mar 25, 2010 11:26 pm
Location: Melbourne, Australia

Re: Building binutils Error

Post 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
If a trainstation is where trains stop, what is a workstation ?
TylerH
Member
Member
Posts: 285
Joined: Tue Apr 13, 2010 8:00 pm
Contact:

Re: Building binutils Error

Post 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!
Aphex
Posts: 15
Joined: Mon Nov 23, 2009 5:57 pm

Re: Building binutils Error

Post 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.
Aphex
Posts: 15
Joined: Mon Nov 23, 2009 5:57 pm

Re: Building binutils Error

Post 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.
Post Reply