David,

you may want to tell the maintainer (hopefully CCed here ;)). That package is horribly non-portable (for no real reason) so it's not just a matter of setting some flags to get it to work. (Re the message you quoted - It's not really excluded, it simply doesn't work).

Just to get you started, *remove* src/Makefile and create the following src/Makevars:

all: $(SHLIB) userLibrary

USERLIB=libRcpp$(DYLIB_EXT)
USERDIR=../inst/lib

userLibrary: $(USERLIB)
[EMAIL PROTECTED] test ! -e $(USERDIR)$(R_ARCH); then mkdir -p $(USERDIR)$ (R_ARCH); fi
        cp $(USERLIB) $(USERDIR)$(R_ARCH)
        cp Rcpp.h $(USERDIR)

$(USERLIB): Rcpp.o
        $(SHLIB_CXXLD) -o $(USERLIB) $^ $(SHLIB_CXXLDFLAGS) $(ALL_LIBS)

.PHONY:         all clean userLibrary

clean:
                rm -f $(OBJECTS) $(SHLIB) $(USERLIB)


Cheers,
Simon


On Nov 20, 2008, at 16:57 , 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



_______________________________________________
R-SIG-Mac mailing list
[email protected]
https://stat.ethz.ch/mailman/listinfo/r-sig-mac

Reply via email to