On 27 March 2011 18:40, Nasser M. Abbasi wrote: > On 3/27/2011 2:13 AM, Marc Glisse wrote: >> >> On Sun, 27 Mar 2011, Nasser M. Abbasi wrote: >> >>> I am trying to build gcc 4.6 which I downloaded today. I followed >>> all instructions, did the following: >>> >>> 1. build/install m4-latest >>> 2. build/install gmp-5.0.01 >>> 3. build/install mpfr-3.0.0 >>> 4. build/install mpc-0.9 >>> 5. and now for gcc 4.6: >>> >>> ./configure >>> make >>> This after about 2 hrs compiling, I get this error: >>> >>> checking for suffix of object files... configure: error: in >>> >>> `/media/sf_nabbasi/data/Fortran_related/gcc_4_6/gcc-4.6.0/i686-pc-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 >>> make[2]: Leaving directory >>> `/media/sf_nabbasi/data/Fortran_related/gcc_4_6/gcc-4.6.0' >> > > >> See http://gcc.gnu.org/wiki/FAQ item 5. >> > > THanks Marc; > > I looked at the above link. But not able to figure what is > wrong. I see no error in my config.log file, here it is again > > http://12000.org/tmp/march_27_2011/ Did you read http://gcc.gnu.org/wiki/FAQ#configure_suffix properly? There are several config.log files, you need to look at the one in the right directory, in your case that should be the one in the libgcc diretory. > I did clean; ./configure; make and same error. See this FAQ: http://gcc.gnu.org/wiki/FAQ#configure As stated in the installation instructions at gcc.gnu.org/install/configure.html you should not run ./configure, you should build GCC in a different directory from the one containing the sources. The docs are not just written for fun, they're there to help you. > I am no expert in these things. Anything specific I should > try to do? Any one can see any error in the log file? You're looking in the wrong file. As the FAQ says, the usual reason is that the runtime linker can't find the prerequisite libraries (which is also stated in the --with-gmp docs at http://gcc.gnu.org/install/configure.html - you should read that too.) > I do not need to build gcc 4.6 if I can help it, but > not able to find prebuild one for my system. You could try using the makefile linked to at http://advogato.org/person/redi/diary/229.html which makes building gcc much easier (especially if you don't read the documentation about ensuring libgmp.so etc. can be found by the runtime linker)