Building from Source on MacOS X 10.3
Submitted by dylan on Thu, 2006-11-16 06:15.
R and R.app
- Download latest sources from CRAN
- Compile R, install any required deps with fink or DarwinPorts
If you are using DarwinPorts you will needs to set these environmental variables when building:
export LIBPREFIX="/opt/local"
# automake seach path
export CPATH="$LIBPREFIX/include"
# configure search path
export CPPFLAGS="-I$LIBPREFIX/include"
export LDFLAGS="-L$LIBPREFIX/lib"
Also, use the following configure script incantation:
./configure --with-blas='-framework vecLib'
- Download the from CRAN
- Compile R.app with xcodebuild. I found it simplest to open Xcode, and then open the R.xcode project file within the archive. Click on build, and it should work. On my system an included file (libintl.h) was not being found by Xcode. I found that this file had been previously installed by fink in /sw/include/ . I modified the file in the R.app source tree which had included libintl.h, such that the #include directive looked like: #include "/sw/include/libintl.h"
- Clicking the 'build' icon this time resulted in a shiny new R.app, in the 'build' directory.
spgrass6 and dependencies
- Get and install latest GRASS6-cvs
- From within R: install.packages('rgdal', configure.args='--with-gdal-config=/usr/local/grasslib/bin//gdal-config', dependencies=TRUE, type="source")
- Not quite working yet:
WARNING: ignoring environment value of R_HOME
* Installing *source* package 'rgdal' ...
gdal-config: /usr/local/grasslib/bin//gdal-config
GDAL version cvs-2006.02.28 found ...
For building this version, at least GDAL version 1.3.1 is required.
PostgreSQL support: Rdbi and RdbiPgSQL (bioconductor sources)
- complile and install current postgresql source: used './configure --without-readline' to bypass some initial trouble
- Install the RdbiPgSQL package from source. I added the following to ~/.profile to ensure that R.app would find the pg libs to link against:
export PG_LIB_DIR=/usr/local/pgsql/lib/
export PG_INCLUDE_DIR=/usr/local/pgsql/include/
- On Linux, start R as the super user and then install the PG* packages with:
install.packages(c('Rdbi','RdbiPgSQL'), repos="http://bioconductor.org/packages/1.9/bioc/", dependencies=TRUE)
- Once compiled, here are some notes by Markus Neteler on how to interface the two.
Installing packages from source
# installing the 'rgl' package...
install.packages('rgl', dependencies=TRUE, type='source')
|