Page 1 of 1

Error with generating a cross compiler

Posted: Sun Jan 03, 2016 1:55 pm
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?

Re: Error with generating a cross compiler

Posted: Sun Jan 03, 2016 4:51 pm
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.)

Re: Error with generating a cross compiler

Posted: Mon Jan 04, 2016 8:08 am
by djedefre
Thanks for your help.
Now it works absolutely fine.
Djedefre