[Rcpp-devel] Building a Package created with Rcpp/RcppArmadillo on the Mac

terrance savitsky tds151 at gmail.com
Tue Oct 18 21:43:06 CEST 2011


Hi Steve,

Thanks for your reply.

1.  Yes, simple scripts run via inline without issue. ( Rcpp and
RcppArmadillo (latest versions) build and install without issue).  So I am
confused by the syntax errors when including libRcpp.a when attempting to
build my package.

2. > sessionInfo()

R version 2.13.2 (2011-09-30)

Platform: x86_64-apple-darwin9.8.0/x86_64 (64-bit)



locale:

[1] en_US.UTF-8/en_US.UTF-8/C/C/en_US.UTF-8/en_US.UTF-8



attached base packages:

[1] stats     graphics  grDevices utils     datasets  methods   base



other attached packages:

[1] RcppArmadillo_0.2.29 Rcpp_0.9.7

On Tue, Oct 18, 2011 at 11:39 AM, Steve Lianoglou <
mailinglist.honeypot at gmail.com> wrote:

> What is the output of sessionInfo()? In particular it will be helpful
> to know what versions of Rcpp and RcppArmadillo you have installed on
> the mac you are trying to compile on.
>
> Also, do "simple" things work? Can you run a trivial `inline` example,
> for instance?
>
> -steve
>
> On Tue, Oct 18, 2011 at 12:43 PM, terrance savitsky <tds151 at 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
> >
> > _______________________________________________
> > Rcpp-devel mailing list
> > Rcpp-devel at lists.r-forge.r-project.org
> > https://lists.r-forge.r-project.org/cgi-bin/mailman/listinfo/rcpp-devel
> >
>
>
>
> --
> Steve Lianoglou
> Graduate Student: Computational Systems Biology
>  | Memorial Sloan-Kettering Cancer Center
>  | Weill Medical College of Cornell University
> Contact Info: http://cbio.mskcc.org/~lianos/contact
>



-- 
Thank you, Terrance Savitsky
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.r-forge.r-project.org/pipermail/rcpp-devel/attachments/20111018/1124cc20/attachment.htm>


More information about the Rcpp-devel mailing list