public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug bootstrap/37330]  New: mpfr & 32/64 multilib issue
@ 2008-09-02 13:41 olivier dot raoult at st dot com
  2008-09-02 13:53 ` [Bug bootstrap/37330] " schwab at suse dot de
                   ` (3 more replies)
  0 siblings, 4 replies; 5+ messages in thread
From: olivier dot raoult at st dot com @ 2008-09-02 13:41 UTC (permalink / raw)
  To: gcc-bugs

Hi,

My mpfr and gmp 32/64 bits libraries are installed respectively in $PREFIX/lib
and $PREFIX/lib64.
'configure' is called as following:
  configure .. --with-gmp-lib=$PREFIX/lib --with-mpfr-lib=$PREFIX/lib ...
It produces a Makefile with the following line:
  HOST_GMPLIBS = -L$PREFIX/lib -L$PREFIX/lib -lmpfr -lgmp
As far as I can see, there is no specific management of multilib context and
'make bootstrap' fails on mpfr link error.

As a workaround, I used the 64bits path for gmp and the 32bits path for mpfr:
  configure .. --with-gmp-lib=$PREFIX/lib64 --with-mpfr-lib=$PREFIX/lib ...
The Makefile line becomes:
  HOST_GMPLIBS = -L$PREFIX/lib64 -L$PREFIX/lib -lmpfr -lgmp
Then it works, even on a full 32 bits context (ie. i686-unknown-pc-linux) but
it's ugly, doesn't it? ;-)

Rgds,
  Olivier


-- 
           Summary: mpfr & 32/64 multilib issue
           Product: gcc
           Version: 4.3.1
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: bootstrap
        AssignedTo: unassigned at gcc dot gnu dot org
        ReportedBy: olivier dot raoult at st dot com
 GCC build triplet: x86_64-unknown-linux-gnu (RedHat 3/4)
  GCC host triplet: x86_64-unknown-linux-gnu (RedHat 3/4)
GCC target triplet: x86_64-unknown-linux-gnu (RedHat 3/4)


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=37330


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

* [Bug bootstrap/37330] mpfr & 32/64 multilib issue
  2008-09-02 13:41 [Bug bootstrap/37330] New: mpfr & 32/64 multilib issue olivier dot raoult at st dot com
@ 2008-09-02 13:53 ` schwab at suse dot de
  2008-09-02 14:13 ` olivier dot raoult at st dot com
                   ` (2 subsequent siblings)
  3 siblings, 0 replies; 5+ messages in thread
From: schwab at suse dot de @ 2008-09-02 13:53 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #1 from schwab at suse dot de  2008-09-02 13:51 -------
Why do you need two flavors?  The mfpr/gmp libraries are only used for the
compiler which is only built in one flavor.  If you are building for x86-64 you
should configure with $PREFIX/lib64 for both library directories.


-- 


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=37330


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

* [Bug bootstrap/37330] mpfr & 32/64 multilib issue
  2008-09-02 13:41 [Bug bootstrap/37330] New: mpfr & 32/64 multilib issue olivier dot raoult at st dot com
  2008-09-02 13:53 ` [Bug bootstrap/37330] " schwab at suse dot de
@ 2008-09-02 14:13 ` olivier dot raoult at st dot com
  2008-09-02 17:38 ` brian at dessent dot net
  2008-09-03 14:05 ` olivier dot raoult at st dot com
  3 siblings, 0 replies; 5+ messages in thread
From: olivier dot raoult at st dot com @ 2008-09-02 14:13 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #2 from olivier dot raoult at st dot com  2008-09-02 14:12 -------
Hmm.. maybe! I tried to script a gcc builder program which shall work on i686,
and on x86_64. Then, for the second, it shall support native 64 and -m32 modes.

As libmpfr and libmgp appear as dynamic libraries, I assumed they will be used
... but 'ldd g++' doesn't confirm. So, the only thing I have to do is to use
-with-..-lib=$PREFIX/lib64 on x86_64 machines and -with-..-lib=$PREFIX/lib on
i686?!? Good!

If it works, it's a non-bug :( .. Sorry and thanks!


-- 


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=37330


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

* [Bug bootstrap/37330] mpfr & 32/64 multilib issue
  2008-09-02 13:41 [Bug bootstrap/37330] New: mpfr & 32/64 multilib issue olivier dot raoult at st dot com
  2008-09-02 13:53 ` [Bug bootstrap/37330] " schwab at suse dot de
  2008-09-02 14:13 ` olivier dot raoult at st dot com
@ 2008-09-02 17:38 ` brian at dessent dot net
  2008-09-03 14:05 ` olivier dot raoult at st dot com
  3 siblings, 0 replies; 5+ messages in thread
From: brian at dessent dot net @ 2008-09-02 17:38 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #3 from brian at dessent dot net  2008-09-02 17:36 -------
Subject: Re:  mpfr & 32/64 multilib issue


g++ (and gcc, gfortran, etc.) are just driver programs that invoke other
programs, they don't use these libraries.  You need to look at cc1 (or
cc1plus, f951, etc.) to see the dependency on these libraries.  You can
use e.g. "ldd $(gcc -print-prog-name=cc1)" to get the path to them
programatically.

As pointed out already gmp and mpfr are *host* libraries not *target*
libraries.  Even when gcc is built in a multilib configuration
supporting several targets there is still only a single host compiler,
and thus you need to specify the gmp and mpfr appropriate for the host.


-- 


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=37330


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

* [Bug bootstrap/37330] mpfr & 32/64 multilib issue
  2008-09-02 13:41 [Bug bootstrap/37330] New: mpfr & 32/64 multilib issue olivier dot raoult at st dot com
                   ` (2 preceding siblings ...)
  2008-09-02 17:38 ` brian at dessent dot net
@ 2008-09-03 14:05 ` olivier dot raoult at st dot com
  3 siblings, 0 replies; 5+ messages in thread
From: olivier dot raoult at st dot com @ 2008-09-03 14:05 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #4 from olivier dot raoult at st dot com  2008-09-03 14:04 -------
Verstehen! Thanks!


-- 

olivier dot raoult at st dot com changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|UNCONFIRMED                 |RESOLVED
         Resolution|                            |INVALID


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=37330


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

end of thread, other threads:[~2008-09-03 14:05 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2008-09-02 13:41 [Bug bootstrap/37330] New: mpfr & 32/64 multilib issue olivier dot raoult at st dot com
2008-09-02 13:53 ` [Bug bootstrap/37330] " schwab at suse dot de
2008-09-02 14:13 ` olivier dot raoult at st dot com
2008-09-02 17:38 ` brian at dessent dot net
2008-09-03 14:05 ` olivier dot raoult at st dot com

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).