public inbox for gcc@gcc.gnu.org
 help / color / mirror / Atom feed
* Error while building GCC 4.5 (MinGW)
@ 2010-04-08 14:32 Name lastlong
  2010-04-09 18:59 ` Jim Wilson
  0 siblings, 1 reply; 5+ messages in thread
From: Name lastlong @ 2010-04-08 14:32 UTC (permalink / raw)
  To: gcc

Hi,

I am trying to build a toolchain for gcc-4.5-20100401 snapshot.
The linux toolchain was built successfully as expected.

However, on building the mingw toolchain, it generated the following error
while configuring gcc:-

=============================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================================

The following commands were used to build the precision libraries.
./gmp-4.2.2/configure  --host=mingw32 --target=mingw32 --build=i686-pc-linux-gnu --prefix=$prefix
./mpfr-2.3.1configure  --host=mingw32 --target=mingw32 --build=i686-pc-linux-gnu --with-gmp=$prefix --prefix=$prefix
./mpc-0.8/configure 
 --host=mingw32 --target=mingw32 --build=i686-pc-linux-gnu --with-gmp=$prefix --with-mpfr=$prefix --prefix=$prefix

The LD_LIBRARY PATH was also exported to $PREFIX PATH.
However, the error was not resolved. This error is due to the addition of MPC library  dependency.

Please let me know whether its a known problem OR I am missing anything while building the libraries?

Regards,
Brew


      

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: Error while building GCC 4.5 (MinGW)
  2010-04-08 14:32 Error while building GCC 4.5 (MinGW) Name lastlong
@ 2010-04-09 18:59 ` Jim Wilson
  2010-04-12 15:46   ` Name lastlong
  0 siblings, 1 reply; 5+ messages in thread
From: Jim Wilson @ 2010-04-09 18:59 UTC (permalink / raw)
  To: Name lastlong; +Cc: gcc

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

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: Error while building GCC 4.5 (MinGW)
  2010-04-09 18:59 ` Jim Wilson
@ 2010-04-12 15:46   ` Name lastlong
  2010-04-12 17:44     ` Jim Wilson
  2010-04-12 19:12     ` Dave Korn
  0 siblings, 2 replies; 5+ messages in thread
From: Name lastlong @ 2010-04-12 15:46 UTC (permalink / raw)
  To: Jim Wilson; +Cc: gcc

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 <wilson@codesourcery.com> wrote:

> From: Jim Wilson <wilson@codesourcery.com>
> Subject: Re: Error while building GCC 4.5 (MinGW)
> To: "Name lastlong" <brew_pt@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
> 



^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: Error while building GCC 4.5 (MinGW)
  2010-04-12 15:46   ` Name lastlong
@ 2010-04-12 17:44     ` Jim Wilson
  2010-04-12 19:12     ` Dave Korn
  1 sibling, 0 replies; 5+ messages in thread
From: Jim Wilson @ 2010-04-12 17:44 UTC (permalink / raw)
  To: Name lastlong; +Cc: gcc

On Mon, 2010-04-12 at 08:34 -0700, Name lastlong wrote:
> Please check the following relevant information present in the config.log 
> as follows:

Now that you can see what is wrong, you should try to manually reproduce
the error.  Check the libraries to see if they are OK, and if the right
versions of the libraries are being linked in.  Look to see where the
undefined references are coming from.  Etc.

> Please let me know if there are any particular steps to be followed to build 
> mingw toolchain with mpc libraries.

I have no idea.  I haven't built a mingw toolchain anytime recently.

Jim


^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: Error while building GCC 4.5 (MinGW)
  2010-04-12 15:46   ` Name lastlong
  2010-04-12 17:44     ` Jim Wilson
@ 2010-04-12 19:12     ` Dave Korn
  1 sibling, 0 replies; 5+ messages in thread
From: Dave Korn @ 2010-04-12 19:12 UTC (permalink / raw)
  To: Name lastlong; +Cc: Jim Wilson, gcc

On 12/04/2010 16:34, Name lastlong wrote:

> ================================= 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

  This just looks like your mpfr and mpc libraries are completely busted.  Cut
and paste the command-line into a shell, and add "-v -Wl,-v -Wl,-Map,out.map".
 Take a look at the linker output and make sure it's linking against the mpc
and mpfr library files that you expect it to be; take a look at those files
with "nm" to see what symbols they define.

  This is /probably/ not a GCC bug, so maybe we should move it to the gcc-help
list if something doesn't show up in the next round or two of debugging.

    cheers,
      DaveK

^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2010-04-12 18:35 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2010-04-08 14:32 Error while building GCC 4.5 (MinGW) Name lastlong
2010-04-09 18:59 ` Jim Wilson
2010-04-12 15:46   ` Name lastlong
2010-04-12 17:44     ` Jim Wilson
2010-04-12 19:12     ` Dave Korn

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).