LinuxQuestions.org
Review your favorite Linux distribution.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Software
User Name
Password
Linux - Software This forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.

Notices


Reply
  Search this Thread
Old 08-09-2014, 07:10 PM   #1
mr.simo
Member
 
Registered: Feb 2010
Posts: 78

Rep: Reputation: 0
Error after setting up arm-linux-gnueabi-gcc


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

Last edited by mr.simo; 08-09-2014 at 07:14 PM. Reason: Title correction
 
Old 08-10-2014, 10:55 AM   #2
mr.simo
Member
 
Registered: Feb 2010
Posts: 78

Original Poster
Rep: Reputation: 0
...

Last edited by mr.simo; 08-11-2014 at 08:33 AM.
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Error compiling GCC 4.4.2 puxz Linux - Software 4 11-10-2009 12:49 PM
Error in compiling gcc-3.3.3 with gcc-4.3.2 asahlot Linux - Software 6 02-08-2009 11:25 AM
error while compiling GCC-4.1.2 andrews92 Linux From Scratch 3 02-14-2008 11:33 AM
Error When Compiling GCC fatsheep Linux From Scratch 3 10-14-2006 04:09 PM
Error compiling gcc 3.3.6 with 64bit gcc 4.0.3 cs-cam Linux - Software 0 04-22-2006 05:20 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Software

All times are GMT -5. The time now is 03:16 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration