[Rcpp-devel] Building a Package created with Rcpp/RcppArmadillo on the Mac
terrance savitsky
tds151 at gmail.com
Tue Oct 18 18:43:40 CEST 2011
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
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.r-forge.r-project.org/pipermail/rcpp-devel/attachments/20111018/912462ba/attachment.htm>
More information about the Rcpp-devel
mailing list