Skip to content

Commit 22fb5ab

Browse files
committed
Rcpp-FAQ updates regarding OS X
1 parent 63f4ff4 commit 22fb5ab

File tree

3 files changed

+38
-12
lines changed

3 files changed

+38
-12
lines changed

ChangeLog

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,8 @@
1+
2014-08-03 Dirk Eddelbuettel <edd@debian.org>
2+
3+
* vignettes/Rcpp-FAQ.Rnw: Updated with respect to OS X installations
4+
requiring Fortran (to e.g. build against RcppArmadillo)
5+
16
2014-07-29 Kevin Ushey <kevinushey@gmail.com>
27

38
* inst/include/Rcpp/vector/no_init.h: Add no_init for matrices

inst/NEWS.Rd

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,10 @@
2525
\item In \code{ifelse()}, the returned \code{NA} type was corrected for
2626
\code{operator[]}
2727
}
28+
\item Changes in Rcpp Documentation:
29+
\itemize{
30+
\item The \code{Rcpp-FAQ} vignette was updated with respect to OS X issues.
31+
}
2832
}
2933
}
3034

vignettes/Rcpp-FAQ.Rnw

Lines changed: 29 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -108,31 +108,37 @@ On almost all platforms, the GNU Compiler Collection (or \texttt{gcc}, which
108108
is also the name of its \proglang{C} language compiler) has to be used along
109109
with the corresponding \texttt{g++} compiler for the \proglang{C++} language.
110110
A minimal suitable version is a final 4.2.* release; earlier 4.2.* were
111-
lacking some \proglang{C++} features (and even 4.2.1, still used on OS X, has
112-
issues).
111+
lacking some \proglang{C++} features (and even 4.2.1, still used on OS X as the
112+
last gcc release), has issues).
113113

114-
Generally speaking, and as of early
115-
2011, the default compilers on all the common platforms are suitable.
114+
Generally speaking, the default compilers on all the common platforms are suitable.
116115

117116
Specific per-platform notes:
118117
\begin{description}
119118
\item[Windows] users need the \texttt{Rtools} package from the site maintained by
120119
Duncan Murdoch which contains all the required tools in a single package;
121120
complete instructions specific to Windows are in the `R Administration'
122-
manual \citep[Appendix D]{R:Administration}.
121+
manual \citep[Appendix D]{R:Administration}. As of August 2014, it still
122+
installs the \texttt{gcc/g++} 4.6.* compiler which limits the ability to use
123+
modern C++ standards so only \code{s-std=c++0x} is supported. R 3.1.0 and
124+
above detect this and set appropriate flags.
123125
\item[OS X] users, as noted in the `R Administration' manual \citep[Appendix
124126
C.4]{R:Administration}, need to install the Apple Developer Tools
125127
(\textsl{e.g.}, \texttt{Xcode}) (as well as \texttt{gfortran} if \proglang{R} or
126-
Fortran-using packages are to be built); also see \faq{q:OSX} below.
128+
Fortran-using packages are to be built); also see \faq{q:OSX} and
129+
\faq{q:OSXArma} below. Depending on whether on OS X release before or after
130+
Mavericks is used, different additional installation may be needed. Consult
131+
the \code{r-sig-mac} list (and its archives) for (current) details.
127132
\item[Linux] user need to install the standard developement packages. Some
128133
distributions provide helper packages which pull in all the required
129134
packages; the \texttt{r-base-dev} package on Debian and Ubuntu is an example.
130135
\end{description}
131136

132137
The \texttt{clang} and \texttt{clang++} compilers from the LLVM project can
133138
also be used as they are inter-operable with \texttt{gcc} et al. The
134-
\texttt{clang++} compiler is particularly interesting as it emits much more
135-
comprehensible error messages than \texttt{g++}.
139+
\texttt{clang++} compiler is interesting as it emits much more
140+
comprehensible error messages than \texttt{g++} (though \texttt{g++} 4.8 and 4.9
141+
have caught up).
136142

137143
The Intel \texttt{icc} family has also been used successfully as its output
138144
files can also be combined with those from \texttt{gcc}.
@@ -156,7 +162,6 @@ Additional packages that we have found useful are
156162
a package but it too is entirely optional.
157163
\end{description}
158164

159-
160165
\section{Compiling and Linking}
161166

162167
\subsection{How do I use \pkg{Rcpp} in my package ?}
@@ -404,11 +409,13 @@ only llvm is provide in Xcode---while the R build provided by CRAN still has
404409
hardwired settings for the gcc/g++ combination.
405410

406411
Until that is resolved, users either need to create softlinks (say, in,
407-
\code{/usr/local/bin}) or override the \code{CC} and \code{CXX} variables via
408-
a file \code{~/.R/Makevars} or its system-equivalent in R's \code{etc/}
409-
directory. See the \code{r-sig-mac} mailing for further details.
412+
\code{/usr/local/bin}) or override the \code{CC} and \code{CXX} variables via a
413+
file \code{~/.R/Makevars} or its system-equivalent in R's \code{etc/}
414+
directory. Also see \faq{q:OSXArma} below. In general, consult the
415+
\code{r-sig-mac} mailing list for further details.
410416

411417
Compilation from source is recommended.
418+
412419
%At the time of writing this paragraph (in the spring of 2011), \pkg{Rcpp}
413420
%(just like CRAN) supports all OS X releases greater or equal to 10.5.
414421
%However, building \pkg{Rcpp} from source (or building packages using
@@ -472,6 +479,16 @@ But for most packages using \pkg{Rcpp}, only two things are required:
472479
The name of the symbol does really matter; once one symbol is important all
473480
should be available.
474481

482+
\subsection{I am having problems building RcppArmadillo on OS X, any help ?}
483+
\label{q:OSXArma}
484+
485+
For recent OS X versions Mavericks and beyond, you need to install the additional
486+
\href{http://r.research.att.com/libs/gfortran-4.8.2-darwin13.tar.bz2}{gfortran 4.8.2 for Darwin 13}
487+
package from \href{http://r.research.att.com/libs/}{the
488+
\texttt{r.research.att.com} site} maintained by Simon.
489+
See \href{http://www.thecoatlessprofessor.com/programming/rcpp-rcpparmadillo-and-os-x-mavericks-lgfortran-and-lquadmath-error}{this
490+
post for details}.
491+
475492

476493
\section{Examples}
477494

0 commit comments

Comments
 (0)