Help: Linker failure

Paul Richard Thomas paul.richard.thomas@gmail.com
Sun Jul 10 08:40:00 GMT 2011


Dear Daniel,

The two libraries that you are missing are libmpfr -
multiple-precision floating-point computations and libmpc - arithmetic
of complex numbers with arbitrarily high precision.  Both are used by
language front-ends.

I should imagine that something got screwed up with PATH or
LD_LIBRARY_PATH since you had successfully built gcc previously.  If
you still have problems, configure with
--with-gmp=pathname
--with-mpfr=pathname
--with-mpc=pathname

I have added the --with-gmmp because I am a tad surprised that you did
not get complaints about that being missing as well.

Cheers

Paul

On Sun, Jul 10, 2011 at 10:08 AM, Daniel Carrera <dcarrera@gmail.com> wrote:
> Hello,
>
>
> As of last night I had an incomplete patch that compiled and passed the test
> suite. I was compiling with:
>
> ../configure --enable-languages=c,fortran --disable-bootstrap
>
> Last night I decided to compile again with the compile flags from Tobias'
> post:
>
> ../configure --enable-gold --with-plugin-ld=/usr/bin/gold
> --enable-languages=c,fortran,c++
>
> This morning I woke to find that the linker had failed. It cannot find
> libmpc or libmpfr. I have no idea what those libraries do but I can see them
> in /usr/local/lib. This is the error I get from the linker:
>
> /usr/bin/ld: error: cannot find -lmpc
> /usr/bin/ld: error: cannot find -lmpfr
> /usr/bin/ld: libbackend.a(builtins.o): in function
> do_mpc_ckconv:builtins.c(.text+0x10e4): error: undefined reference to
> 'mpfr_number_p'
> /usr/bin/ld: libbackend.a(builtins.o): in function
> do_mpc_ckconv:builtins.c(.text+0x10f3): error: undefined reference to
> 'mpfr_number_p'
> /usr/bin/ld: libbackend.a(builtins.o): in function
> do_mpc_ckconv:builtins.c(.text+0x10fc): error: undefined reference to
> 'mpfr_overflow_p'
> ... many more lines ...
>
>
> I guess the first thing to try is to compile again without gold. But I was
> hoping that someone here might have an idea. Btw, I have gold installed from
> the Ubuntu archives:
>
> % gold --version
> GNU gold (GNU Binutils for Ubuntu 2.20.1-system.20100303) 1.9
> Copyright 2008 Free Software Foundation, Inc.
> This program is free software; you may redistribute it under the terms of
> the GNU General Public License version 3 or (at your option) a later
> version. This program has absolutely no warranty.
>
>
> For now, I think I'll recompile without gold and hope that works.
>
> Cheers,
> Daniel.
> --
> I'm not overweight, I'm undertall.
>



-- 
The knack of flying is learning how to throw yourself at the ground and miss.
       --Hitchhikers Guide to the Galaxy



More information about the Fortran mailing list