Hi Steve,<div><br></div><div>Thanks for your reply. </div><div><br></div><div>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. <br>
<div><br></div><div>2. <span class="Apple-style-span" style="font-family: Calibri, sans-serif; font-size: 14px; ">> sessionInfo()</span>
<p class="MsoNormal"><span style="font-size:10.5pt;font-family:"Calibri","sans-serif";
mso-fareast-font-family:"Times New Roman";color:black">R version 2.13.2
(2011-09-30)</span></p>
<p class="MsoNormal"><span style="font-size:10.5pt;font-family:"Calibri","sans-serif";
mso-fareast-font-family:"Times New Roman";color:black">Platform:
x86_64-apple-darwin9.8.0/x86_64 (64-bit)</span></p>
<p class="MsoNormal"><span style="font-size:10.5pt;font-family:"Calibri","sans-serif";
mso-fareast-font-family:"Times New Roman";color:black"> </span></p>
<p class="MsoNormal"><span style="font-size:10.5pt;font-family:"Calibri","sans-serif";
mso-fareast-font-family:"Times New Roman";color:black">locale:</span></p>
<p class="MsoNormal"><span style="font-size:10.5pt;font-family:"Calibri","sans-serif";
mso-fareast-font-family:"Times New Roman";color:black">[1]
en_US.UTF-8/en_US.UTF-8/C/C/en_US.UTF-8/en_US.UTF-8</span></p>
<p class="MsoNormal"><span style="font-size:10.5pt;font-family:"Calibri","sans-serif";
mso-fareast-font-family:"Times New Roman";color:black"> </span></p>
<p class="MsoNormal"><span style="font-size:10.5pt;font-family:"Calibri","sans-serif";
mso-fareast-font-family:"Times New Roman";color:black">attached base packages:</span></p>
<p class="MsoNormal"><span style="font-size:10.5pt;font-family:"Calibri","sans-serif";
mso-fareast-font-family:"Times New Roman";color:black">[1] stats
graphics grDevices utils datasets methods base
</span></p>
<p class="MsoNormal"><span style="font-size:10.5pt;font-family:"Calibri","sans-serif";
mso-fareast-font-family:"Times New Roman";color:black"> </span></p>
<p class="MsoNormal"><span style="font-size:10.5pt;font-family:"Calibri","sans-serif";
mso-fareast-font-family:"Times New Roman";color:black">other attached packages:</span></p>
<p class="MsoNormal"><span style="font-size:10.5pt;font-family:"Calibri","sans-serif";
mso-fareast-font-family:"Times New Roman";color:black">[1] RcppArmadillo_0.2.29
Rcpp_0.9.7 </span></p><br><div class="gmail_quote">On Tue, Oct 18, 2011 at 11:39 AM, Steve Lianoglou <span dir="ltr"><<a href="mailto:mailinglist.honeypot@gmail.com">mailinglist.honeypot@gmail.com</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;">What is the output of sessionInfo()? In particular it will be helpful<br>
to know what versions of Rcpp and RcppArmadillo you have installed on<br>
the mac you are trying to compile on.<br>
<br>
Also, do "simple" things work? Can you run a trivial `inline` example,<br>
for instance?<br>
<br>
-steve<br>
<div><div></div><div class="h5"><br>
On Tue, Oct 18, 2011 at 12:43 PM, terrance savitsky <<a href="mailto:tds151@gmail.com">tds151@gmail.com</a>> wrote:<br>
> Dear Rcpp experts, I'm finding difficulty to build a package (created on<br>
> Win) that uses Rcpp and RcppArmadillo on the Mac. I've attempted the build<br>
> on multiple machines to rule out local issues. I find a June 27 post on<br>
> the Rcpp list<br>
> (<a href="http://lists.r-forge.r-project.org/pipermail/rcpp-devel/2011-June/002548.html" target="_blank">http://lists.r-forge.r-project.org/pipermail/rcpp-devel/2011-June/002548.html</a>)<br>
> that experiences very similar "dlopen" issues as I show below, though the<br>
> cause is attributed to proper construction of C++ templates. In my case, I<br>
> do not create any templated classes; only use those in Rcpp and<br>
> RcppArmadillo. In this regard, please note the upstream syntax errors when<br>
> attempting to include libRcpp.a.<br>
> This post is a continuation of my previous, though I decided to change the<br>
> title and re-post as I thought it would be more useful for future searches<br>
> if composed this way.<br>
><br>
> Here are the error messages:<br>
><br>
> /Library/Frameworks/R.framework/Versions/2.13/Resources/library/Rcpp/lib/x86_64/libRcpp.a:<br>
> line 1: syntax error near unexpected token `newline'<br>
><br>
> /Library/Frameworks/R.framework/Versions/2.13/Resources/library/Rcpp/lib/x86_64/libRcpp.a:<br>
> line 1: `!<arch>'<br>
><br>
> g++-4.2 -arch x86_64 -dynamiclib -Wl,-headerpad_max_install_names -undefined<br>
> dynamic_lookup -single_module -multiply_defined suppress -L/usr/local/lib -o<br>
> growcurves.so DPre.o lgm.o mmC.o mmCchol.o mmCmiar.o mmCmvplusDP.o<br>
> mmCplusDP.o mmI.o mmIgroup.o mmIgroupDP.o mmIplusDP.o mmmult.o<br>
> -L/Library/Frameworks/R.framework/Resources/lib/x86_64 -lRlapack<br>
> -L/Library/Frameworks/R.framework/Resources/lib/x86_64 -lRblas -lgfortran<br>
> -F/Library/Frameworks/R.framework/.. -framework R -Wl,-framework<br>
> -Wl,CoreFoundation<br>
><br>
> /Library/Frameworks/R.framework/Versions/2.13/Resources/library/Rcpp/lib/x86_64/libRcpp.a:<br>
> line 1: syntax error near unexpected token `newline'<br>
><br>
> /Library/Frameworks/R.framework/Versions/2.13/Resources/library/Rcpp/lib/x86_64/libRcpp.a:<br>
> line 1: `!<arch>'<br>
><br>
> installing to<br>
> /Library/Frameworks/R.framework/Versions/2.13/Resources/library/growcurves/libs/x86_64<br>
><br>
> ** R<br>
><br>
> ** data<br>
><br>
> ** inst<br>
><br>
> ** preparing package for lazy loading<br>
><br>
> ** help<br>
><br>
> *** installing help indices<br>
><br>
> ** building package indices ...<br>
><br>
> ** testing if installed package can be loaded<br>
><br>
> Error in dyn.load(file, DLLpath = DLLpath, ...) :<br>
><br>
> unable to load shared object<br>
> '/Library/Frameworks/R.framework/Versions/2.13/Resources/library/growcurves/libs/x86_64/growcurves.so':<br>
><br>
><br>
> dlopen(/Library/Frameworks/R.framework/Versions/2.13/Resources/library/growcurves/libs/x86_64/growcurves.so,<br>
> 6): Symbol not found: __ZTIN4Rcpp12not_a_matrixE<br>
><br>
> Referenced from:<br>
> /Library/Frameworks/R.framework/Versions/2.13/Resources/library/growcurves/libs/x86_64/growcurves.so<br>
><br>
> Expected in: flat namespace<br>
><br>
> in<br>
> /Library/Frameworks/R.framework/Versions/2.13/Resources/library/growcurves/libs/x86_64/growcurves.so<br>
><br>
> Error: loading failed<br>
><br>
> Execution halted<br>
><br>
> ERROR: loading failed<br>
><br>
> * removing<br>
> '/Library/Frameworks/R.framework/Versions/2.13/Resources/library/growcurves'<br>
><br>
> --<br>
> Thank you for your help and expertise, Terrance Savitsky<br>
><br>
</div></div>> _______________________________________________<br>
> Rcpp-devel mailing list<br>
> <a href="mailto:Rcpp-devel@lists.r-forge.r-project.org">Rcpp-devel@lists.r-forge.r-project.org</a><br>
> <a href="https://lists.r-forge.r-project.org/cgi-bin/mailman/listinfo/rcpp-devel" target="_blank">https://lists.r-forge.r-project.org/cgi-bin/mailman/listinfo/rcpp-devel</a><br>
><br>
<font color="#888888"><br>
<br>
<br>
--<br>
Steve Lianoglou<br>
Graduate Student: Computational Systems Biology<br>
| Memorial Sloan-Kettering Cancer Center<br>
| Weill Medical College of Cornell University<br>
Contact Info: <a href="http://cbio.mskcc.org/~lianos/contact" target="_blank">http://cbio.mskcc.org/~lianos/contact</a><br>
</font></blockquote></div><br><br clear="all"><div><br></div>-- <br>Thank you, Terrance Savitsky<br>
</div></div>