Thanks for the prompt reply and suggestions. I checked the config.log as per your suggestion.
>> Check the config.log file for details. A successful build should show >> something like this >> configure:5634: checking for the correct version of the gmp/mpfr/mpc >> libraries >> configure:5665: gcc -o conftest -g -O2 conftest.c -lmpc -lmpfr >> -lgmp >&5 >> configure:5665: $? = 0 >> configure:5666: result: yes >>Your file should have an error here. Please check the following relevant information present in the config.log as follows: ================================= config.log ========================== configure:5615: $? = 0 configure:5616: result: yes configure:5634: checking for the correct version of the gmp/mpfr/mpc libraries configure:5665: i386-pc-mingw32msvc-gcc -o conftest.exe -O2 -I/home/foo/mpc/prefix//include -I/home/foo/mpc/prefix//include -I/home/foo/mpc/prefix//include conftest.c -L/home/foo/mpc/prefix//lib -L/home/foo/mpc/prefix//lib -L/home/foo/mpc/prefix//lib -lmpc -lmpfr -lgmp >&5 /tmp/ccYkD69D.o:conftest.c:(.text+0x25): undefined reference to `_mpfr_init' /tmp/ccYkD69D.o:conftest.c:(.text+0x2d): undefined reference to `_mpfr_init' /tmp/ccYkD69D.o:conftest.c:(.text+0x43): undefined reference to `_mpfr_atan2' /tmp/ccYkD69D.o:conftest.c:(.text+0x55): undefined reference to `_mpfr_erfc' /tmp/ccYkD69D.o:conftest.c:(.text+0x6c): undefined reference to `_mpfr_subnormalize' /tmp/ccYkD69D.o:conftest.c:(.text+0x79): undefined reference to `_mpfr_clear' /tmp/ccYkD69D.o:conftest.c:(.text+0x84): undefined reference to `_mpfr_clear' /tmp/ccYkD69D.o:conftest.c:(.text+0x95): undefined reference to `_mpc_init2' /tmp/ccYkD69D.o:conftest.c:(.text+0xab): undefined reference to `_mpc_set_ui_ui' /tmp/ccYkD69D.o:conftest.c:(.text+0xbd): undefined reference to `_mpc_cosh' /tmp/ccYkD69D.o:conftest.c:(.text+0xd3): undefined reference to `_mpc_pow' /tmp/ccYkD69D.o:conftest.c:(.text+0xe5): undefined reference to `_mpc_acosh' /tmp/ccYkD69D.o:conftest.c:(.text+0xed): undefined reference to `_mpc_clear' collect2: ld returned 1 exit status configure:5665: $? = 1 configure:5669: result: no configure:5690: error: Building GCC requires GMP 4.2+, MPFR 2.3.1+ and MPC 0.8.0+. Try the --with-gmp, --with-mpfr and/or --with-mpc options to specify their locations. Source code for these libraries can be found at their respective hosting sites as well as at ftp://gcc.gnu.org/pub/gcc/infrastructure/. See also http://gcc.gnu.org/install/prerequisites.html for additional info. If you obtained GMP, MPFR and/or MPC from a vendor distribution package, make sure that you have installed both the libraries and the header files. They may be located in separate packages. ================================= config.log ========================== The mingw toolchain was successfully built with earlier versions(gcc-4.5-20091105). However, the above problem is faced after introduction of "MPC" libraries. Please let me know if there are any particular steps to be followed to build mingw toolchain with mpc libraries. Regards, Brew --- On Fri, 4/9/10, Jim Wilson <wil...@codesourcery.com> wrote: > From: Jim Wilson <wil...@codesourcery.com> > Subject: Re: Error while building GCC 4.5 (MinGW) > To: "Name lastlong" <brew...@yahoo.com> > Cc: gcc@gcc.gnu.org > Date: Friday, April 9, 2010, 11:48 PM > On 04/08/2010 07:21 AM, Name lastlong > wrote: > > > =============================error================================ > > checking for the correct version of the gmp/mpfr/mpc > libraries... no > > configure: error: Building GCC requires GMP 4.2+, MPFR > 2.3.1+ and MPC 0.8.0+. > > ============================ > error================================ > > Check the config.log file for details. A successful > build should show something like this > configure:5634: checking for the correct version of the > gmp/mpfr/mpc libraries > configure:5665: gcc -o conftest -g -O2 > conftest.c -lmpc -lmpfr -lgmp >&5 > configure:5665: $? = 0 > configure:5666: result: yes > > Your file should have an error here. > > Jim >