Hello again Rcpp Experts, I would appreciate any insight or guidance you may offer on the errors (noted in red, below) when trying to build a package composed under Windows on the Mac. My package uses Rcpp and RcppArmadillo with no added self-defined template constructions. The Macs on which I've attempted build have the latest versions of R, Rcpp and RcppArmadillo and are able to run C++ code with these classes using inline.
The "dlopen" error message is similar to a previous post and suggests some sort of template definition problem. I do not define any templated classes, however. Thank your for help and suggestions. Terrance On Tue, Oct 18, 2011 at 9:43 AM, terrance savitsky <tds...@gmail.com> wrote: > Dear Rcpp experts, I'm finding difficulty to build a package (created on > Win) that uses Rcpp and RcppArmadillo on the Mac. I've attempted the build > on multiple machines to rule out local issues. I find a June 27 post on > the Rcpp list ( > http://lists.r-forge.r-project.org/pipermail/rcpp-devel/2011-June/002548.html) > that experiences very similar "dlopen" issues as I show below, though the > cause is attributed to proper construction of C++ templates. In my case, I > do not create any templated classes; only use those in Rcpp and > RcppArmadillo. In this regard, please note the upstream syntax errors when > attempting to include libRcpp.a. > > This post is a continuation of my previous, though I decided to change the > title and re-post as I thought it would be more useful for future searches > if composed this way. > > Here are the error messages: > > > /Library/Frameworks/R.framework/Versions/2.13/Resources/library/Rcpp/lib/x86_64/libRcpp.a: > line 1: syntax error near unexpected token `newline' > > /Library/Frameworks/R.framework/Versions/2.13/Resources/library/Rcpp/lib/x86_64/libRcpp.a: > line 1: `!<arch>' > > g++-4.2 -arch x86_64 -dynamiclib -Wl,-headerpad_max_install_names > -undefined dynamic_lookup -single_module -multiply_defined suppress > -L/usr/local/lib -o growcurves.so DPre.o lgm.o mmC.o mmCchol.o mmCmiar.o > mmCmvplusDP.o mmCplusDP.o mmI.o mmIgroup.o mmIgroupDP.o mmIplusDP.o mmmult.o > -L/Library/Frameworks/R.framework/Resources/lib/x86_64 -lRlapack > -L/Library/Frameworks/R.framework/Resources/lib/x86_64 -lRblas -lgfortran > -F/Library/Frameworks/R.framework/.. -framework R -Wl,-framework > -Wl,CoreFoundation > > /Library/Frameworks/R.framework/Versions/2.13/Resources/library/Rcpp/lib/x86_64/libRcpp.a: > line 1: syntax error near unexpected token `newline' > > /Library/Frameworks/R.framework/Versions/2.13/Resources/library/Rcpp/lib/x86_64/libRcpp.a: > line 1: `!<arch>' > > installing to > /Library/Frameworks/R.framework/Versions/2.13/Resources/library/growcurves/libs/x86_64 > > ** R > > ** data > > ** inst > > ** preparing package for lazy loading > > ** help > > *** installing help indices > > ** building package indices ... > > ** testing if installed package can be loaded > > Error in dyn.load(file, DLLpath = DLLpath, ...) : > > unable to load shared object > '/Library/Frameworks/R.framework/Versions/2.13/Resources/library/growcurves/libs/x86_64/growcurves.so': > > > dlopen(/Library/Frameworks/R.framework/Versions/2.13/Resources/library/growcurves/libs/x86_64/growcurves.so, > 6): Symbol not found: __ZTIN4Rcpp12not_a_matrixE > > Referenced from: > /Library/Frameworks/R.framework/Versions/2.13/Resources/library/growcurves/libs/x86_64/growcurves.so > > Expected in: flat namespace > > in > /Library/Frameworks/R.framework/Versions/2.13/Resources/library/growcurves/libs/x86_64/growcurves.so > > Error: loading failed > > Execution halted > > ERROR: loading failed > > * removing > '/Library/Frameworks/R.framework/Versions/2.13/Resources/library/growcurves' > > -- > Thank you for your help and expertise, Terrance Savitsky > -- Thank you, Terrance Savitsky
_______________________________________________ Rcpp-devel mailing list Rcpp-devel@lists.r-forge.r-project.org https://lists.r-forge.r-project.org/cgi-bin/mailman/listinfo/rcpp-devel