Jonathan I did go through the configure suffix .There is apparently few thing I noticed .If I give only prefix and target .I am good . I had a very basic question - Do I need to build the GCC in 2 stages or 3 stages. Please note that mine is the case of cross compilation .Because as I understood it in first stage gcc needs to be built without any headers . Only in later stage I want gcc to use glibc headers and build final gcc and install it on a different system . Thanks Gaurav -----Original Message----- From: Jonathan Wakely [mailto:jwakely.gcc@xxxxxxxxx] Sent: Wednesday, March 06, 2013 2:59 PM To: GUPTA, GAURAV G (GAURAV) Cc: gcc-help@xxxxxxx.orgbu Subject: Re: issues with gcc 4. On 6 March 2013 05:05, GUPTA, GAURAV G (GAURAV) wrote: > > > Hello There > > While trying to build gcc 4.4.6 I keep hitting few errors . > > My configure option sare > > Stage 1 : > AR=ar ${SOURCES_GCC}/configure \ > --prefix=${CLFS_CROSS_TOOLS} \ > --target=${CLFS_TARGET} --disable-nls --enable-shared=libstdc++ --without-headers --with-newlib --disable-decimal-float --disable-libmudflap --disable-libgomp --disable-threads --enable-languages=c --enable-checking=release > > Stage 2 > AR=ar ${SOURCES_GCC}/configure \ > --prefix=${CLFS_CROSS_TOOLS} \ > --target=${CLFS_TARGET} --with-sysroot=${CLFS} --disable-nls -enable-shared --enable-__cxa_atexit --enable-long-long --enable-threads=posix --enable-c99 --enable-languages=c,c++,objc,obj-c++,java --enable-checking=release Does this mean you're manually configuring stage 2? Shouldn't that happen automatically? > CLFS_TARGET=x86_64-unknown-linux-gnu > CLFS=/local/gagupta/gccfolder > CLFS_SOURCES=/local/gagupta/gccfolder/crosscompile > NAME_BINUTILS=binutils > SOURCES_BINUTILS=$CLFS_SOURCES/binutils-2.20.51.0.2 > CLFS_CROSS_TOOLS=$CLFS/cross-tools > CLFS_TOOLS=$CLFS/tools > NAME_GCC=gcc > SOURCES_GCC=$CLFS_SOURCES/gcc-4.4.6-20120305 > NAME_GLIBC=glibc > SOURCES_GLIBC=$CLFS_SOURCES/glibc-2.12-2-gc4ccff1 > SOURCES_LINUX=$CLFS_SOURCES/linux-2.6.32-279.9.1.el6 > PATH=/local/gagupta/gccfolder:/local/gagupta/gccfolder/usr:/local/gagupta/gccfolder/tools:$CLFS_CROSS_TOOLS/bin:$PATH > LC_ALL=POSIX > > > 1. /local/gagupta/gccfolder/crosscompile/gcc-4.4.6-20120305/libgcc/../gcc/tsystem.h:87:19: error: stdio.h: No such file or directory .Please note that my path Variable has sysroot set that contains the header files . Header files aren't searched for in PATH > 2. some time errors related to > > checking for suffix of object files... configure: error: in `/local/gagupta/gccfolder/crosscompile/gcc-build/x86_64-unknown-linux-gnu/libgcc': > configure: error: cannot compute suffix of object files: cannot compile > See `config.log' for more details. > make[2]: *** [configure-stage1-target-libgcc] Error 1 Did you look in libgcc/config.log? Did you read http://gcc.gnu.org/wiki/FAQ#configure_suffix ?