Skip to content

Instantly share code, notes, and snippets.

@cpsievert
Forked from marutter/build-R-devel
Last active March 8, 2016 04:20
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save cpsievert/14878e9b0dd143492591 to your computer and use it in GitHub Desktop.
Save cpsievert/14878e9b0dd143492591 to your computer and use it in GitHub Desktop.
A bash script to build r-devel
#!/bin/sh
# This is the location of the source code
cd ~/svn/r-devel/R
# R_PAPERSIZE=letter \
# R_BATCHSAVE="--no-save --no-restore" \
# R_BROWSER=xdg-open \
# PAGER=/usr/bin/pager \
# PERL=/usr/bin/perl \
# R_UNZIPCMD=/usr/bin/unzip \
# R_ZIPCMD=/usr/bin/zip \
# R_PRINTCMD=/usr/bin/lpr \
# LIBnn=lib \
# AWK=/usr/bin/awk \
# CC="ccache gcc" \
# CFLAGS="-ggdb -pipe -std=gnu99 -Wall -pedantic -DTESTING_WRITE_BARRIER" \
# CXX="ccache g++" \
# CXXFLAGS="-ggdb -std=c++0x -pipe -Wall -pedantic" \
# FC="ccache gfortran" \
# FCFLAGS="-ggdb -pipe -Wall -pedantic" \
# F77="ccache gfortran" \
# FFLAGS="-ggdb -pipe -Wall -pedantic" \
# MAKE="make -j4" \
# ./configure \
# --prefix=/usr/local/lib/R-devel \
# --enable-R-shlib \
# --enable-strict-barrier \
# --with-blas \
# --with-lapack \
# --with-readline \
# --without-recommended-packages
R_PAPERSIZE=letter \
R_BATCHSAVE="--no-save --no-restore" \
R_BROWSER=xdg-open \
PAGER=/usr/bin/pager \
PERL=/usr/bin/perl \
R_UNZIPCMD=/usr/bin/unzip \
R_ZIPCMD=/usr/bin/zip \
R_PRINTCMD=/usr/bin/lpr \
LIBnn=lib \
AWK=/usr/bin/awk \
CC="ccache gcc" \
#CFLAGS="-ggdb -pipe -std=gnu99 -Wall -pedantic" \
# http://pj.freefaculty.org/blog/?p=315
CFLAGS="-I$HOME/packages/include" \
# LDFLAGS="-L$HOME/packages/lib”
CXX="ccache g++" \
CXXFLAGS="-ggdb -pipe -Wall -pedantic" \
FC="ccache gfortran" \
F77="ccache gfortran" \
MAKE="make -j4" \
./configure \
--prefix=/usr/local/lib/R-devel \
--enable-R-shlib \
--with-blas \
--with-lapack \
--with-readline \
--without-recommended-packages
#CC="clang -O3" \
#CXX="clang++ -03" \
#make svnonly
make
echo "*** Done -- now run 'sudo make install' in ~/svn/r-devel/R"
@cpsievert
Copy link
Author

For building 3.2.4 on my ocean droplet:

wget -q -O - https://gist.github.com/cpsievert/14878e9b0dd143492591/raw/1f06ea9b55320cd63a19db7489f91d48652e150d/build-R-devel | bash

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment