Building R-devel on Mac OS X (mountain lion)
Want to share your content on R-bloggers? click here if you have a blog, or here if you don't.
Requirement
To build R-devel
from source on Mac OS X 10.8, following two tools are at least required.
- Xcode Development Tools
- GNU Fortran Compiler
These can be gotten at the App Store and at urls below.
- http://r.research.att.com/tools/
- http://cran.r-project.org/bin/macosx/tools/
( http://cran.ism.ac.jp/bin/macosx/tools/ )
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.
Source
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
Build
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" FC=$F77
Details are written at
4. Configure & make
./configure --without-x make make check make pdf make info
Details are written at
- http://cran.r-project.org/doc/manuals/r-devel/R-admin.html#Installing-R-under-Unix_002dalikes
- http://cran.r-project.org/doc/manuals/r-devel/R-admin.html#Making-the-manuals
- http://cran.r-project.org/doc/manuals/r-devel/R-admin.html#OS-X
Install
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
/my/development/work/space/R.framework/Resources/R
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.
R-bloggers.com offers daily e-mail updates about R news and tutorials about learning R and many other topics. Click here if you're looking to post or find an R/data-science job.
Want to share your content on R-bloggers? click here if you have a blog, or here if you don't.