[R] R linux install: FORTRAN compiling error

Prof Brian Ripley ripley at stats.ox.ac.uk
Thu Jun 3 07:59:31 CEST 2010


On Wed, 2 Jun 2010, Matt Shotwell wrote:

> This is not an issue with R, but with gfortran. See the following:
>
> http://gcc.gnu.org/wiki/GFortran#news (under heading "gfortran 4.5")
>
> http://gcc.gnu.org/ml/fortran/2010-04/msg00061.html
>
> Also, I suspect you are using a precompiled gcc/gfortran, and it assumes
> you have libmpc.so.2 <http://www.muliprecision.org> installed. If you
> compile all of gcc, you won't see this problem. However, this is
> probably not the simplest solution. I'd try the solution in the second
> link above. Else, if `gcc --version` <= 4.4, get the compiled gfortran
> at that version.

And as the output indicates it is 4.1.2.  So this is an ancient Linux 
(perhaps RHEL?), and you really need the gfortran (and libgfortran) 
from the distribution.

Mixing an unreleased bleeding-edage gfortran with a gcc from early 
2007 is not going to work well, most likely not at all.

>
> P.S. `grep -R mpc.h R-2.11.1/*` indicates R does not depend on libmpc
>
>
> Matt Shotwell
> Graduate Student
> Division of Biostatistics and Epidemiology
> Medical University of South Carolina
>
>
> On Wed, 2010-06-02 at 17:07 -0400, vaneet wrote:
>> Hello,
>>
>> I have basic familiarity with Unix but by most standards a novice.  I am
>> trying to install R on a linux machine and am following the instructions in
>> the R install and admin guide in terms of what is required to compile the R
>> source code.  I downloaded R version 2.11.1 and extracted the files into my
>> home directory.  I realize I need a FORTRAN compiler to help with this
>> process and have tried installing a few but still cannot past the
>> configuration step of installing R:
>>
>> ./configure --with-readline=no
>>
>> Once I run this command after installing GFortran I get the following error:
>> ...
>> checking whether we can compute C Make dependencies... yes, using gcc
>> -std=gnu99 -MM
>> checking whether gcc -std=gnu99 supports -c -o FILE.lo... yes
>> checking how to get verbose linking output from gfortran... configure:
>> WARNING: compilation failed
>>
>> checking for Fortran 77 libraries of gfortran...
>> checking how to get verbose linking output from gcc -std=gnu99... -v
>> checking for C libraries of gcc -std=gnu99...  -L/usr/local/lib64
>> -L/usr/lib/gcc/x86_64-redhat-linux/4.1.2
>> -L/usr/lib/gcc/x86_64-redhat-linux/4.1.2/../../../../lib64 -L/lib/../lib64
>> -L/usr/lib/../lib64 -lgcc_s
>> checking for dummy main to link with Fortran 77 libraries... none
>> checking for Fortran 77 name-mangling scheme... configure: error: in
>> `/home/lotayv01/R-2.11.1':
>> configure: error: cannot compile a simple Fortran program
>> See `config.log' for more details.
>>
>> For more details I can show you the section in the config.log file
>>
>> ...
>> /data/home/lotayv01/usr/local/gfortran/bin/../libexec/gcc/i686-pc-linux-gnu/4.6.0/f951:
>> error while loading shared libraries: libmpc.so.2: cannot open shared object
>> file: No such file or directory
>> configure:22471: $? = 1
>> configure: failed program was:
>> |       program main
>> |
>> |       end
>> configure:22548: WARNING: compilation failed
>> configure:22554: result:
>> configure:22556: checking for Fortran 77 libraries of gfortran
>> configure:22579: gfortran -o conftest -L/usr/local/lib64 conftest.f
>> /data/home/lotayv01/usr/local/gfortran/bin/../libexec/gcc/i686-pc-linux-gnu/4.6.0/f951:
>> error while loading shared libraries: libmpc.so.2: cannot open shared object
>> file: No such file or directory
>> ...
>>
>> When I check the version of Gfortran at the console command line I get this:
>> GNU Fortran (GCC) 4.6.0 20100407 (experimental) [trunk revision 158083]
>> Copyright (C) 2010 Free Software Foundation, Inc.
>>
>> Even before this I tried the g95 fortran compiler and the same thing
>> happened, how can I fix this problem, any help on this matter would be
>> greatly appreciated.
>>
>> Thanks
>
> ______________________________________________
> R-help at r-project.org mailing list
> https://stat.ethz.ch/mailman/listinfo/r-help
> PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
> and provide commented, minimal, self-contained, reproducible code.
>

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



More information about the R-help mailing list