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. Thanks in advance for any help, Gelu 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' # R CMD INSTALL akima_0.3-4.tar.gz * Installing *source* package 'akima' ... ** libs g77 -mieee-fp -O3 -fomit-frame-pointer -pipe -mcpu=pentiumpro -march=i586 -fno-fast-math -fno-strength-reduce -O3 -fomit-frame-pointer -pipe -mcpu=pentiumpro -march=i586 -fno-fast-math -fno-strength-reduce -c akima.new.f -o akima.new.o g77 -mieee-fp -O3 -fomit-frame-pointer -pipe -mcpu=pentiumpro -march=i586 -fno-fast-math -fno-strength-reduce -O3 -fomit-frame-pointer -pipe -mcpu=pentiumpro -march=i586 -fno-fast-math -fno-strength-reduce -c idbvip.f -o idbvip.o g77 -mieee-fp -O3 -fomit-frame-pointer -pipe -mcpu=pentiumpro -march=i586 -fno-fast-math -fno-strength-reduce -O3 -fomit-frame-pointer -pipe -mcpu=pentiumpro -march=i586 -fno-fast-math -fno-strength-reduce -c idcldp.f -o idcldp.o g77 -mieee-fp -O3 -fomit-frame-pointer -pipe -mcpu=pentiumpro -march=i586 -fno-fast-math -fno-strength-reduce -O3 -fomit-frame-pointer -pipe -mcpu=pentiumpro -march=i586 -fno-fast-math -fno-strength-reduce -c idgrid.f -o idgrid.o g77 -mieee-fp -O3 -fomit-frame-pointer -pipe -mcpu=pentiumpro -march=i586 -fno-fast-math -fno-strength-reduce -O3 -fomit-frame-pointer -pipe -mcpu=pentiumpro -march=i586 -fno-fast-math -fno-strength-reduce -c idlctn.f -o idlctn.o g77 -mieee-fp -O3 -fomit-frame-pointer -pipe -mcpu=pentiumpro -march=i586 -fno-fast-math -fno-strength-reduce -O3 -fomit-frame-pointer -pipe -mcpu=pentiumpro -march=i586 -fno-fast-math -fno-strength-reduce -c idpdrv.f -o idpdrv.o g77 -mieee-fp -O3 -fomit-frame-pointer -pipe -mcpu=pentiumpro -march=i586 -fno-fast-math -fno-strength-reduce -O3 -fomit-frame-pointer -pipe -mcpu=pentiumpro -march=i586 -fno-fast-math -fno-strength-reduce -c idptip.f -o idptip.o g77 -mieee-fp -O3 -fomit-frame-pointer -pipe -mcpu=pentiumpro -march=i586 -fno-fast-math -fno-strength-reduce -O3 -fomit-frame-pointer -pipe -mcpu=pentiumpro -march=i586 -fno-fast-math -fno-strength-reduce -c idptli.f -o idptli.o g77 -mieee-fp -O3 -fomit-frame-pointer -pipe -mcpu=pentiumpro -march=i586 -fno-fast-math -fno-strength-reduce -O3 -fomit-frame-pointer -pipe -mcpu=pentiumpro -march=i586 -fno-fast-math -fno-strength-reduce -c idsfft.f -o idsfft.o g77 -mieee-fp -O3 -fomit-frame-pointer -pipe -mcpu=pentiumpro -march=i586 -fno-fast-math -fno-strength-reduce -O3 -fomit-frame-pointer -pipe -mcpu=pentiumpro -march=i586 -fno-fast-math -fno-strength-reduce -c idtang.f -o idtang.o g77 -mieee-fp -O3 -fomit-frame-pointer -pipe -mcpu=pentiumpro -march=i586 -fno-fast-math -fno-strength-reduce -O3 -fomit-frame-pointer -pipe -mcpu=pentiumpro -march=i586 -fno-fast-math -fno-strength-reduce -c idxchg.f -o idxchg.o g77 -mieee-fp -O3 -fomit-frame-pointer -pipe -mcpu=pentiumpro -march=i586 -fno-fast-math -fno-strength-reduce -O3 -fomit-frame-pointer -pipe -mcpu=pentiumpro -march=i586 -fno-fast-math -fno-strength-reduce -c tripack.f -o tripack.o g77 -mieee-fp -O3 -fomit-frame-pointer -pipe -mcpu=pentiumpro -march=i586 -fno-fast-math -fno-strength-reduce -O3 -fomit-frame-pointer -pipe -mcpu=pentiumpro -march=i586 -fno-fast-math -fno-strength-reduce -c ttidbs.f -o ttidbs.o gcc -shared -L/usr/local/lib -o akima.so akima.new.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: *** [akima.so] Error 1 ERROR: compilation failed for package 'akima'
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 akima.so akima.new.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: *** [akima.so] Error 1 > ERROR: compilation failed for package 'akima'-- Brian D. Ripley, ripley at stats.ox.ac.uk Professor of Applied Statistics, http://www.stats.ox.ac.uk/~ripley/ University of Oxford, Tel: +44 1865 272861 (self) 1 South Parks Road, +44 1865 272866 (PA) Oxford OX1 3TG, UK Fax: +44 1865 272595
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 rpm! Thanks, Gelu ----Original Message Follows---- From: ripley at stats.ox.ac.uk To: Angel Lopez-Urrutia <lopezurrutia at hotmail.com> CC: r-help at stat.math.ethz.ch 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 akima.so akima.new.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: *** [akima.so] Error 1 > ERROR: compilation failed for package 'akima' -- Brian D. Ripley, ripley at stats.ox.ac.uk Professor of Applied Statistics, http://www.stats.ox.ac.uk/~ripley/ University of Oxford, Tel: +44 1865 272861 (self) 1 South Parks Road, +44 1865 272866 (PA) Oxford OX1 3TG, UK Fax: +44 1865 272595