LinuxQuestions.org
Welcome to the most active Linux Forum on the web.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This 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!

Notices



Reply
 
Search this Thread
Old 02-19-2011, 03:59 PM   #1
StefanTh
LQ Newbie
 
Registered: Jan 2011
Posts: 7

Rep: Reputation: 0
Can not compile gcc, fatal error: stdio.h: No such file or directory


Dear sir or madame

I am trying to upgrade my NAS with anew toolchain, gcc-4.5.2
The NAS have been "hacked" fonz_plug, that contain a gcc version 4.1.3 with uClibc

I have download all needed tar files and done the following.
My goal is to upgrade the gcc to 4.5.2 and replace the ucLibc on the system with a GNU libc.



#
# Pass one
#
# binutils
./configure --prefix=/ffp --libdir=/ffp/lib --includedir=/ffp/include --with-gmp=/ffp --with-mpfr=/ffp


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[3]: 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 \
-fvisibility=hidden -DHIDE_EXPORTS
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[3]", 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.

Would appreciate some help here

Regards
 
Old 02-20-2011, 11:55 AM   #2
Kenny_Strawn
Senior Member
 
Registered: Feb 2010
Location: /usa/ca/orange_county/lake_forest
Distribution: ArchBang, Google Android 2.1 + Motoblur (on Motortola Flipside), Google Chrome OS (on Cr-48)
Posts: 1,791
Blog Entries: 62

Rep: Reputation: 55
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.
 
Old 02-20-2011, 01:05 PM   #3
StefanTh
LQ Newbie
 
Registered: Jan 2011
Posts: 7

Original Poster
Rep: Reputation: 0
Hi

# uname -a
Linux Brisinga 2.6.22.18 #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)
/ffp/armv5tejl-unknown-linux-gnu/include
/ffp/armv5tejl-unknown-linux-gnu/sys-include


but these does not exists, is this some missing installation from binutils ?



/Stefan

Last edited by StefanTh; 02-20-2011 at 01:15 PM.
 
Old 02-20-2011, 03:48 PM   #4
knudfl
LQ 5k Club
 
Registered: Jan 2008
Location: Copenhagen, DK
Distribution: pclos2014.08, Slack14.1 DebWheezy, +50+ other Linux OS, for test only.
Posts: 14,276

Rep: Reputation: 2664Reputation: 2664Reputation: 2664Reputation: 2664Reputation: 2664Reputation: 2664Reputation: 2664Reputation: 2664Reputation: 2664Reputation: 2664Reputation: 2664
uClibc is your system and cannot be changed.

All libraries, all commands depend on that.

Changing any uClibc components will probably stop your OS immediately :
No commands will work any more.

..
 
Old 02-21-2011, 01:48 AM   #5
StefanTh
LQ Newbie
 
Registered: Jan 2011
Posts: 7

Original Poster
Rep: Reputation: 0
> uClibc is your system and cannot be changed.

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.
 
Old 02-09-2014, 05:43 PM   #6
donjoshu
LQ Newbie
 
Registered: Dec 2011
Posts: 1

Rep: Reputation: Disabled
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:

ifdef DEB_STAGE
CONFARGS += \
--disable-decimal-float \
--disable-libatomic \
--disable-libgomp \
--disable-libmudflap \
--disable-libssp \
--disable-libquadmath \
--disable-libsanitizer \
--disable-threads \
--libexecdir=/$(libexecdir) \
--libdir=/$(PF)/$(configured_libdir) \
$(if $(with_build_sysroot),--with-build-sysroot=$(with_build_sysroot)) \
$(if $(with_sysroot),--with-sysroot=$(with_sysroot))
.
.
.
ifeq ($(DEB_STAGE),stage1)
CONFARGS += \
--disable-shared \
--with-newlib \
--without-headers
else
# stage2
CONFARGS += \
--enable-shared
endif
else
CONFARGS += \
--enable-shared \
--enable-linker-build-id

LFS sets similar flags disabling the build of the libraries in their pass 1 build of gcc before they have a libc, saying that the libraries will fail to cross compile under such circumstances.
 
Old 02-10-2014, 01:06 AM   #7
John VV
Guru
 
Registered: Aug 2005
Posts: 13,508

Rep: Reputation: 1804Reputation: 1804Reputation: 1804Reputation: 1804Reputation: 1804Reputation: 1804Reputation: 1804Reputation: 1804Reputation: 1804Reputation: 1804Reputation: 1804
donjoshu

this thread is from February 2011
3 years ago
if this was not fixed 3 years back..........
 
  


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
cmem.c:38:19: error: stdio.h: No such file or directory skedar Linux - Newbie 1 08-10-2010 03:39 PM
stdio.h: No such file or directory elaa82 Linux - Software 2 12-29-2009 05:31 AM
GCC 3.2.3 gives error with <stdio.h> on slackware 9.1 Daid Slackware 4 03-01-2009 11:53 PM
test.c:1:19: error: stdio.h: No such file or directory Lokathor Debian 2 09-14-2006 01:11 PM
test.c:1:19: Stdio.h: No such file or directory :( wogga Linux - Software 1 06-11-2004 03:57 PM


All times are GMT -5. The time now is 10:18 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
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration