Error with generating a cross compiler

Programming, for all ages and all languages.
Post Reply
djedefre
Posts: 2
Joined: Sun Jan 03, 2016 1:48 pm

Error with generating a cross compiler

Post by djedefre »

Hey Guys
I'm fairly new to the os developing and I'm trying to build a cross compiler on Linux (debian) following this tutorial: http://wiki.osdev.org/GCC_Cross-Compiler
when I execute the command:

Code: Select all

make all-target-libgcc
it always crashs with this error.

Code: Select all

/home/djedefre/opt/cross/i686-elf/bin/ar  rc libgcc.a $objects
/home/djedefre/opt/cross/i686-elf/bin/ar: error while loading shared libraries: libfl.so.2: cannot open shared object file: No such file or directory
Makefile:895: the rule „libgcc.a“ fails
make[1]: *** [libgcc.a] Error 127
make[1]: Leaving Directory „/home/djedefre/src/build-gcc/i686-elf/libgcc“ 
Makefile:12915:the rule for target „all-target-libgcc“ fails
make: *** [all-target-libgcc] Error 2
I'm using Binutils-2.26.51 and gcc-5.3.0
Can anyone help me with this?
User avatar
iansjack
Member
Member
Posts: 4685
Joined: Sat Mar 31, 2012 3:07 am
Location: Chichester, UK

Re: Error with generating a cross compiler

Post by iansjack »

You don't have flex installed on your computer, which is a pre-requisite for building GCC. Use your package manager to install flex and flex-devel. (The package names may differ slightly on your OS.)
djedefre
Posts: 2
Joined: Sun Jan 03, 2016 1:48 pm

Re: Error with generating a cross compiler

Post by djedefre »

Thanks for your help.
Now it works absolutely fine.
Djedefre
Post Reply