Can not compile gcc, fatal error: stdio.h: No such file or directory
Linux - NewbieThis Linux forum is for members that are new to Linux.
Just starting out and have a question?
If it is not in the man pages or the how-to's this is the place!
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Introduction to Linux - A Hands on Guide
This guide was created as an overview of the Linux Operating System, geared toward new users as an exploration tour and getting started guide, with exercises at the end of each chapter.
For more advanced trainees it can be a desktop reference, and a collection of the base knowledge needed to proceed with system and network administration. This book contains many real life examples derived from the author's experience as a Linux system and network administrator, trainer and consultant. They hope these examples will help you to get a better understanding of the Linux system and that you feel encouraged to try out things on your own.
Click Here to receive this Complete Guide absolutely free.
But when I try to compile the gcc with
../configure --prefix=/ffp --libdir=/ffp/lib --includedir=/ffp/include --enable-__cxa_atexit --with-float=soft --enable-languages=c,c++ --with-build-sysroot=/ffp --with-build-time-tools=/ffp/bin --with-system-zlib --enable-threads=posix --disable-bootstrap
I get the follwoing error
make: Leaving directory `/mnt/HD/HD_a2/ffp/install/gcc-4.5.2/build/armv5tejl-unknown-linux-gnu/libgcc'
/ffp/install/gcc-4.5.2/build/./gcc/xgcc -B/ffp/install/gcc-4.5.2/build/./gcc/ -B/ffp/armv5tejl-unknown-linux-gnu/bin/ -B/ffp/armv5tejl-unknown-linux-gnu/lib/ -isystem /ffp/armv5tejl-unknown-linux-gnu/include -isystem /ffp/armv5tejl-unknown-linux-gnu/sys-include --sysroot=/ffp -g -O2 -O2 -g -O2 -DIN_GCC -W -Wall -Wwrite-strings -Wcast-qual -Wstrict-prototypes -Wmissing-prototypes -Wold-style-definition -isystem ./include -fomit-frame-pointer -fPIC -Wno-missing-prototypes -g -DHAVE_GTHR_DEFAULT -DIN_LIBGCC2 -D__GCC_FLOAT_NOT_NEEDED -I. -I. -I../.././gcc -I../../../libgcc -I../../../libgcc/. -I../../../libgcc/../gcc -I../../../libgcc/../include -DHAVE_CC_TLS -o _muldi3.o -MT _muldi3.o -MD -MP -MF _muldi3.dep -DL_muldi3 -c ../../../libgcc/../gcc/libgcc2.c \
In file included from ../../../libgcc/../gcc/libgcc2.c:29:0:
../../../libgcc/../gcc/tsystem.h:87:19: fatal error: stdio.h: No such file or directory
Why is it doing "Make", I thought --disable-bootstrap avoided that.
Why do I get this error ?
The NAS I have a fulyl working linux environment, I can compie on it and so fort, but apparently not the gcc.
What Linux distro is on the NAS? From what I understand, you need to compile glibc first before compiling gcc, because stdio.h is the C standard library. If you still get errors, chances are other things still need to be installed for dependencies. Post the output of other errors, and if they point to other dependency problems let me know.
# uname -a
Linux Brisinga 188.8.131.52 #22 Mon Aug 30 19:09:34 CST 2010 armv5tejl GNU/Linux
Well, I could try to compile glibc, let me check.
The thing is that fun_plug (that is the distro that have been installed originaly on the NAS) does not have glibc
but instead uClibc.
My goal is to compile up binutils/gcc/glibc and by this replacing the older gcc and uClibc that exist on the NAS.
The toolchain on the NAS at the moment is working in the sense that it is possible to compile and install
other softwares like autoconfig, mediatomb etc. (but I want to upgrade to newer gcc and glibc) so
this mean that I am not trying to build a cross compiler or configuring up something from scratch
but more of updating an existing system
Also, the installation of binutils created the directory "/ffp/armv5tejl-unknown-linux-gnu" (as expected)
but in this directory there is only a bin and a lib directory and I can see that when compiling up the gcc
the /ffp/install/gcc-4.5.2/build/./gcc/xgcc is looking for the directory (among others)
but these does not exists, is this some missing installation from binutils ?
That sucks stone hard, I do not want uClibc, I want GNU
I was mearly thinking that if ucLibc is some light version of glibc it's interfaces should be
the same so replacing uClibc with glibc would go smoothly.
Btw, I manage to compile the gcc by adding a link in the armv5tejl-unknown-linux-gnu
to the ordinary include directory on the system and gcc works fine so at least I got the gcc updated.
If you are compiling gcc for a clib you have not installed yet, use the --with-newlib switch in your configure. This is what Linux From Scratch does, and is also available in the Debian source package build process by setting their environment variable DEB_STAGE=stage1. The Debian code from debian/rules2: