On Mon, 21 Jan 2008, [ISO-8859-1] Manuel L?pez-Ib??ez wrote:

> On 20/01/2008, Kaveh R. GHAZI <[EMAIL PROTECTED]> wrote:
> >
> > What does "gcc -v foo.c" say about GMP and MPFR?
>
> [EMAIL PROTECTED]:~/131656/build/gcc$ ./xgcc -v -c -B . foo.c
> [...]
> revision 131656], GMP version 4.2.1, MPFR version 2.3.0.
> warning: MPFR header version 2.3.0 differs from library version 2.2.0.
>
> > You should always report this when asking about mpfr related issues in
> > GCC.  Sometimes the version you think you compiled into GCC isn't actually
> > the one that got used.  E.g. I've had reports that turned out to be shared
> > libs differ at runtime, or header file mismatches can caused problems.
>
> Exactly this issue. I am not sure how this can happen. My configure
> options are above. I am using the Compile Farm.


This happens because you linked GCC with a shared MPFR library in
/opt/cfarm/mpfr-2.3.0/lib, but because there is no -rpath set you get the
system mpfr-2.2.0 from /usr/lib at runtime.

I believe this is a variation of PR21547.  IMHO, we need a portable way to
set -rpath when linking cc1.  (My libtool-fu is weak.)


> It works if I use --with-mpfr=/home/ghazi/gcc-testing/lib/422-230/ instead.
> Thanks,
> Manuel.


Yeah :-), that works because I configured my private copy of GMP/MPFR on
the compile farm with --disable-shared so there is no chance of runtime
mixup.

                --Kaveh
--
Kaveh R. Ghazi                  [EMAIL PROTECTED]

Reply via email to