The errors I get differ from yours (are your R and Xcode up to date?) but
the problem is a fundamentally flawed Rcpp/src/Makefile.
Here the lines I had to change (OS 10.5.5, R 2.8.0, Xcode 3.1.1):
PKGLIB = Rcpp$(SHLIB_EXT)
$(PKGLIB): $(PKGOBJ)
$(SHLIB_LINK) -o $(PKGLIB) $(PKGOBJ)
$(USERLIB): $(USEROBJ)
$(DYLIB_LINK) -o $(USERLIB) $(USEROBJ) $(LIBR)
@cp Rcpp.h $(USERDIR)
But, I would not start from here, rather write a src/Makevars following
the actual R documentation. The package may compile on Debian Linux, but
it compiles on none of my systems, not even the Linux ones.
On Thu, 20 Nov 2008, David Reiss wrote:
Hi,
I am very eager to use Rcpp on my Mac. However, the package doesn't compile,
as reported at CRAN ("MacOS X binary: not available as excluded from build,
see
excludes<https://svn.r-project.org/R-dev-web/trunk/QA/Simon/packages/excludes>.")
I thought I'd check if any R/OSX experts here have gotten it to work, or
have any ideas on how to compile it on OSX, before I tried contacting the
package maintainer. Here are the compilation errors I get when I try (on my
2nd-gen Mac Pro running Tiger; similar results on a Leopard box). Thanks for
any assistance.
% R CMD INSTALL Rcpp_0.6.0.tar.gz
* Installing *source* package 'Rcpp' ...
** libs
** arch - i386
g++ -arch i386 -isysroot /Developer/SDKs/MacOSX10.4u.sdk
-mmacosx-version-min=10.4
-I/Library/Frameworks/R.framework/Resources/include
-I/Library/Frameworks/R.framework/Resources/include/i386 -msse3 -fPIC
-I. `/Library/Frameworks/R.framework/Resources/bin/R CMD config --cppflags`
-Wall -O2 -c Rcpp.cpp -o Rcpp.o
g++ -arch i386 -isysroot /Developer/SDKs/MacOSX10.4u.sdk
-mmacosx-version-min=10.4 -shared -o ../inst/lib/libRcpp.dylib Rcpp.o
i686-apple-darwin8-g++-4.0.1: unrecognized option '-shared'
/usr/bin/ld: Undefined symbols:
_main
_INTEGER
_LOGICAL
_REAL
_R_CHAR
_R_ClassSymbol
_R_DimSymbol
_R_LevelsSymbol
_R_NamesSymbol
_R_NilValue
_R_alloc
_Rf_allocMatrix
_Rf_allocVector
_Rf_eval
_Rf_getAttrib
_Rf_isFactor
_Rf_isInteger
_Rf_isLogical
_Rf_isMatrix
_Rf_isNewList
_Rf_isNumeric
_Rf_isReal
_Rf_isString
_Rf_isVector
_Rf_lang2
_Rf_length
_Rf_mkChar
_Rf_protect
_Rf_setAttrib
_Rf_unprotect
_SETCADR
_SET_STRING_ELT
_SET_VECTOR_ELT
_STRING_ELT
_VECTOR_ELT
collect2: ld returned 1 exit status
make: *** [../inst/lib/libRcpp.dylib] Error 1
ERROR: compilation failed for package 'Rcpp'
** Removing '/Users/dreiss/.R/packages/Rcpp'
[[alternative HTML version deleted]]
_______________________________________________
R-SIG-Mac mailing list
[email protected]
https://stat.ethz.ch/mailman/listinfo/r-sig-mac
--
Brian D. Ripley, [EMAIL PROTECTED]
Professor of Applied Statistics, http://www.stats.ox.ac.uk/~ripley/
University of Oxford, Tel: +44 1865 272861 (self)
1 South Parks Road, +44 1865 272866 (PA)
Oxford OX1 3TG, UK Fax: +44 1865 272595
_______________________________________________
R-SIG-Mac mailing list
[email protected]
https://stat.ethz.ch/mailman/listinfo/r-sig-mac