R, Statistics

Building R-devel on Mac OS X (mountain lion)


To build R-devel from source on Mac OS X 10.8, following two tools are at least required.

  1. Xcode Development Tools
  2. GNU Fortran Compiler

These can be gotten at the App Store and at urls below.

Unfortunately, the gcc come with Apple’s Xcode doesn’t have a Fortran compiler.   That is why we need to get it separately.   I chose the gfortran, and it looks like a good choice.


The latest development version is R-devel.tar.gz or R-devel.tar.bz2.
Available at

Daily snapshots are files something like R-devel_2013-09-20.tar.bz2.

Available at the anonymous ftp


1. Extract the source tar ball, and cd R-devel.
2. Edit the file conifg.site.
3. I added two lines as below to let the Fortran compiler work.

F77="gfortran -arch x86_64"

Details are written at

4. Configure & make

./configure --without-x
make check
make pdf
make info

Details are written at


As a default for Mac OS X, the R-devel installation will overwrite and destroy the existing stable R.  To avoid this, the prefix must be explicitly specified on installation.

make prefix=/my/development/work/space install

Note that the end of the prefix path should not have a slash (/).
Details are written at

The R executable is found at


Now, I can do R CMD on the latest R-devel to build and check a package.  Before submitting a package to CRAN, R CMD check with an option --as-cran on the latest development version is required.
As written in

R CMD check --as-cran elliplot_1.0.0.tar.gz

This may raise some important warnings, though the package has passed the normal check.


One comment on “Building R-devel on Mac OS X (mountain lion)

  1. Pingback: Making of elliplot package | ЯтомизоnoR

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )


Connecting to %s


This entry was posted on September 26, 2013 by and tagged , , , , , , , .
The stupidest thing...

Statistics, genetics, programming, academics


R, Statistics

%d bloggers like this: