Dear all,
I have a problem after compiling arm-linux-gnueabi-gcc..
I have successfully compiled arm-linux-gnueabi binutils, I suppose the same for arm-linux-gnueabi-gcc and glibc for ARM..
After having compiled glibc, I tried to compile a simple C code named hello.c:
Code:
#include <stdio.h>
int main()
{
int a = 0;
return 0;
}
But when I execute arm-linux-gnueabi-gcc, I get this error:
Code:
arm-linux-gnueabi-gcc hello.c -o hello
hello.c:2:19: fatal error: stdio.h: No such file or directory
#include <stdio.h>
^
compilation terminated.
But this is the content of /opt/arm/include/
Quote:
alloca.h
a.out.h
argz.h
ar.h
assert.h
bits
byteswap.h
complex.h
cpio.h
ctype.h
dirent.h
dlfcn.h
endian.h
envz.h
err.h
errno.h
error.h
fcntl.h
features.h
fenv.h
fmtmsg.h
fnmatch.h
fpu_control.h
fstab.h
fts.h
ftw.h
_G_config.h
gconv.h
getopt.h
glob.h
gnu
gnu-versions.h
grp.h
iconv.h
ieee754.h
inttypes.h
langinfo.h
libgen.h
libintl.h
libio.h
limits.h
locale.h
malloc.h
math.h
mcheck.h
memory.h
mntent.h
monetary.h
nl_types.h
obstack.h
paths.h
poll.h
printf.h
pwd.h
re_comp.h
regex.h
regexp.h
sched.h
scsi
search.h
setjmp.h
sgtty.h
signal.h
spawn.h
stab.h
stdc-predef.h
stdint.h
stdio_ext.h
stdio.h
stdlib.h
string.h
strings.h
sys
syscall.h
sysexits.h
syslog.h
tar.h
termio.h
termios.h
tgmath.h
time.h
ttyent.h
uchar.h
ucontext.h
ulimit.h
unistd.h
ustat.h
utime.h
values.h
wait.h
wchar.h
wordexp.h
xlocale.h
|
I suppose I made some mistake during compilation process.. Libraries seems to be not linked correctly..
These are the command line option I set for compiling, please note the install directort is /opt/arm:
binutils:
Code:
:~ $ ../configure \
--prefix=/opt/arm \
--with-sysroot=/opt/arm/lib \
--with-lib-path=/opt/arm \
--target=arm-linux-gnueabi \
--disable-nls \
:~ $ make
:~ $ sudo make install
kernel headers 3.16:
Code:
:~ $ make mrproper
:~ $ make ARCH=arm defconfig
:~ $ make ARCH=arm headers_check
:~ $ sudo make ARCH=arm INSTALL_HDR_PATH=/opt/arm/sysroot/usr headers_install
gcc:
Quote:
:~ $ cd gcc-4.8.2
:~ $../configure --build=i686-linux-gnu \
--host=i686-linux-gnu \
--target=arm-linux-gnueabi \
--prefix=/opt/arm --without-headers \
--enable-bootstrap \
--enable-languages=c,c++ \
--disable-threads \
--enable-__cxa_atexit \
--disable-libmudflap \
--with-gnu-ld \
--with-gnu-as \
--disable-libssp \
--disable-libgomp \
--disable-nls \
--disable-shared \
--disable-decimal-float \
--disable-libatomic --disable-libgomp \--disable-libitm --disable-libmudflap \
--disable-libquadmath \--disable-libsanitizer \
--disable-libssp \
--disable-libstdc++-v3
:~ $ make
|
glibc:
Code:
../configure \
--prefix=/opt/arm \
--build=i686-pc-linux-gnu \
--host=arm-linux-gnueabi \
--with-headers=/opt/arm/sysroot/usr/include \
--disable-profile libc_cv_ \
forced_unwind=yes \
libc_cv_c_cleanup=yes \
libc_cv_ctors_header=yes
sudo make -k install-headers cross_compiling=yes install_root=/opt/arm/sysroot
make
sudo make install_root=/opt/arm/sysroot install
I do not understand where I am wrong. Probably I did not understand something..
Of course I will appreciate any support and suggestion.
Thank you in advance for it.
Simon