[R-SIG-Mac] R Package compilation problem with Fortran

Don MacQueen macq at llnl.gov
Fri Jun 10 20:11:05 CEST 2005

My perspective is...

(1) If you build R from sources, and /sw (fink) is present on your 
system at the time you configure R, then R knows (internally, so to 
speak) about /sw, and will later on include it among the places it 
looks for things when you install packages.

(2) The binary version of R for OS X that you downloaded from CRAN 
was built without any dependencies on fink, so it does not 
(internally, so to speak) know about /sw, and does not look there for 
things. This is a good thing, because many, if not most, users of R 
who install the binary will not want to deal with add-on systems like 
fink. The developers/maintainers of R for OS X do not want to impose 
a requirement for fink on R uses, and this is appropriate.

My suggestion is to go to the help pages for the OS X version of R 
(the links are at the bottom of the download page, where it says "You 
may also want to read the R FAQ and R for Mac OS X FAQ or consult the 
developer page of R for Mac OS X."). Follow the instructions there to 
obtain a fortran that installs in /usr/local/bin. For example, on my 

[153]% which g77

If you have g77 there, I am reasonably confident your version of R 
will find it when installing packages.


At 12:11 AM -0400 6/10/05, Brian Beckage wrote:
>I've tried to load a number of packages that require a Fortran
>compiler such as BMA and Hmisc, but I get the following error:
>* Installing *source* package 'Hmisc' ...
>** libs
>g77   -fno-common  -g -O2 -c cidxcn.f -o cidxcn.o
>make: g77: Command not found
>make: *** [cidxcn.o] Error 127
>ERROR: compilation failed for package 'Hmisc'
>But I appear to have a Fortran compiler installed:
>'which g77' yields '/sw/bin/g77'
>>'g77 -v' yields
>Reading specs from /sw/lib/gcc/powerpc-apple-darwin7.5.0/3.4.1/specs
>Configured with: ../gcc-3.4.1/configure --prefix=/sw
>--enable-languages=f77 --infodir=/share/info --libexecdir=/lib
>Thread model: posix
>gcc version 3.4.1
>'echo $PATH' yields:
>So g77 should be in the search path.
>Any suggestions would be greatly appreciated.  I'm running R 2.1.0
>Patched under OSX 10.3.9.
>Brian Beckage
>Department of Botany
>University of Vermont
>Marsh Life Science Building
>Burlington, VT 05405
>Phone:  802 656-0197
>Fax  :  802 656-0440
>email:  Brian.Beckage at uvm.edu
>web  :  www.uvm.edu/~bbeckage
>	[[alternative HTML version deleted]]
>R-SIG-Mac mailing list
>R-SIG-Mac at stat.math.ethz.ch

Don MacQueen
Environmental Protection Department
Lawrence Livermore National Laboratory
Livermore, CA, USA

More information about the R-SIG-Mac mailing list