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

September 26, 2013

(This article was first published on ЯтомизоnoR » R, and kindly contributed to R-bloggers)


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

To leave a comment for the author, please follow the link and comment on their blog: ЯтомизоnoR » R. offers daily e-mail updates about R news and tutorials on topics such as: Data science, Big Data, R jobs, visualization (ggplot2, Boxplots, maps, animation), programming (RStudio, Sweave, LaTeX, SQL, Eclipse, git, hadoop, Web Scraping) statistics (regression, PCA, time series, trading) and more...

If you got this far, why not subscribe for updates from the site? Choose your flavor: e-mail, twitter, RSS, or facebook...

Comments are closed.


Never miss an update!
Subscribe to R-bloggers to receive
e-mails with the latest R posts.
(You will not see this message again.)

Click here to close (This popup will not appear again)