I am trying to compile a piece of code on my Linux system (x86_64) for MIPS big endian architecture.
Basically I followed this URL: https://www.linux-mips.org/wiki/Toolchains
to get my own tool chain.
I tried to compile software, configure phase is OK:
./configure --target=mips-unknown-linux-gnu --host=mips-unknown-linux-gnu CC=/opt/cross/bin/mips-unknown-linux-gnu-gcc --prefix=/opt/mycode
I get this error just after "make":
# make
make all-recursive
make[1]: Entering directory `/usr/local/src/code2.0.9'
Making all in compat
make[2]: Entering directory `/usr/local/src/code2.0.9/compat'
/opt/cross/bin/mips-unknown-linux-gnu-gcc -DHAVE_CONFIG_H -I. -I.. -I../include -I../include -Wall -O2 -MT Thread.o -MD -MP -MF .deps/Thread.Tpo -c -o Thread.o Thread.c
In file included from Thread.c:71:0:
../include/headers.h:78:20: fatal error: stdlib.h: No such file or directory
#include <stdlib.h>
How can I fix this issue? Thank you
<stdlib.h>
header file is part of the C standard library, it should be available for all C implementations. If you don't have it then your cross-compilation environment is not properly installed. Have you e.g. installed a C standard library, cross-compiled for your target? – Some programmer dudestdlib.h
somehwere inside/opt/cross
directory? – KamilCuk