Re: [R] Fortran linking problems

About this list Date view Thread view Subject view Author view Attachment view

From: Angel Lopez-Urrutia (
Date: Mon 20 Jan 2003 - 22:25:38 EST

Message-id: <>

Thanks to all,
Once I installed readline-dev (and reinstalled Blas/lapack) it worked!
I don't know it why this wasn't shown as a dependency when I installed the R

----Original Message Follows----
To: Angel Lopez-Urrutia <>
Subject: Re: [R] Fortran linking problems
Date: Mon, 20 Jan 2003 07:56:20 +0000 (GMT)

Did you build R yourself, or install an rpm? It looks like your
installation is missing libreadline, and it was there when R was built.
I'm surprised then that R would run, but maybe it is somewhere that the
standard LD_LIBRARY_PATH does not find.

You need readline and perhaps readline-devel (if it exists)
installed, and they should have been dependencies of the R rpm (if that
is what you used).

I believe that -lreadline is not needed (and this is solved in R-devel),
so you could just edit R_HOME/etc/Makeconf and remove -lreadline (and
-lnurses) from FLIBS.

On Mon, 20 Jan 2003, Angel Lopez-Urrutia wrote:

> In a box running Mandrake 9 with R 1.6.2 I get problems when trying to
> install packages Matrix and Akima.
> It seems my gcc compiler and fortran do not talk to each other.

> The errors are:
> * Installing *source* package 'Matrix' ...
> checking for gcc... gcc
> checking for C compiler default output... a.out
> checking whether the C compiler works... yes
> checking whether we are cross compiling... no
> checking for suffix of executables...
> checking for suffix of object files... o
> checking whether we are using the GNU C compiler... yes
> checking whether gcc accepts -g... yes
> checking for gcc option to accept ANSI C... none needed
> checking whether we are using the GNU Fortran 77 compiler... yes
> checking whether g77 accepts -g... yes
> checking how to get verbose linking output from g77... -v
> checking for Fortran 77 libraries... -L/usr/local/lib
> -L/usr/lib/gcc-lib/i586-mandrake-linux-gnu/3.2
> -L/usr/lib/gcc-lib/i586-mandrake-linux-gnu/3.2/../../.. -lreadline -ldl
> -lncurses -lfrtbegin -lg2c -lm -lgcc_s
> checking for dummy main to link with Fortran 77 libraries... unknown
> configure: error: linking to Fortran libraries from C fails
> ERROR: configuration failed for package 'Matrix'

In cases like that, look in config.log. The error message is terse,
because it is repeating a test done when R was installed.


> gcc -shared -L/usr/local/lib -o idbvip.o idcldp.o
> idgrid.o idlctn.o idpdrv.o idptip.o idptli.o idsfft.o idtang.o idxchg.o
> tripack.o ttidbs.o -L/usr/local/lib
> -L/usr/lib/gcc-lib/i586-mandrake-linux-gnu/3.2
> -L/usr/lib/gcc-lib/i586-mandrake-linux-gnu/3.2/../../.. -lreadline -ldl
> -lncurses -lfrtbegin -lg2c -lm -lgcc_s -L/usr/lib/R/bin -lR
> /usr/bin/ld: cannot find -lreadline
> collect2: ld returned 1 exit status
> make: *** [] Error 1
> ERROR: compilation failed for package 'akima'

Brian D. Ripley,        
Professor of Applied Statistics,
University of Oxford,             Tel:  +44 1865 272861 (self)
1 South Parks Road,                     +44 1865 272866 (PA)
Oxford OX1 3TG, UK                Fax:  +44 1865 272595

______________________________________________ mailing list

About this list Date view Thread view Subject view Author view Attachment view

This archive was generated by hypermail 2.1.3 : Tue 01 Jul 2003 - 09:11:19 EST