<div>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 (<a href="http://lists.r-forge.r-project.org/pipermail/rcpp-devel/2011-June/002548.html">http://lists.r-forge.r-project.org/pipermail/rcpp-devel/2011-June/002548.html</a>) 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.</div>
<div><br></div><div>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.</div><div><br></div><font class="Apple-style-span" face="arial, sans-serif"><p class="MsoNormal" style="color: rgb(34, 34, 34); ">
<span style="font-size:10.5pt;font-family:"Calibri","sans-serif";
mso-fareast-font-family:"Times New Roman";color:black"> Here are the error messages:</span></p><p class="MsoNormal" style="color: rgb(34, 34, 34); "><span style="font-size:10.5pt;font-family:"Calibri","sans-serif";
mso-fareast-font-family:"Times New Roman";color:black"><br></span></p>
<p class="MsoNormal"><span style="font-size: 10.5pt; font-family: Calibri, sans-serif; "><font class="Apple-style-span" color="#cc0000">/Library/Frameworks/R.framework/Versions/2.13/Resources/library/Rcpp/lib/x86_64/libRcpp.a:
line 1: syntax error near unexpected token `newline'</font></span></p>
<p class="MsoNormal"><span style="font-size: 10.5pt; font-family: Calibri, sans-serif; "><font class="Apple-style-span" color="#cc0000">/Library/Frameworks/R.framework/Versions/2.13/Resources/library/Rcpp/lib/x86_64/libRcpp.a:
line 1: `!<arch>'</font></span></p>
<p class="MsoNormal" style="color: rgb(34, 34, 34); "><span style="font-size:10.5pt;font-family:"Calibri","sans-serif";
mso-fareast-font-family:"Times New Roman";color:black">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</span></p>
<p class="MsoNormal" style="color: rgb(34, 34, 34); "><span style="font-size:10.5pt;font-family:"Calibri","sans-serif";
mso-fareast-font-family:"Times New Roman";color:black">/Library/Frameworks/R.framework/Versions/2.13/Resources/library/Rcpp/lib/x86_64/libRcpp.a:
line 1: syntax error near unexpected token `newline'</span></p>
<p class="MsoNormal" style="color: rgb(34, 34, 34); "><span style="font-size:10.5pt;font-family:"Calibri","sans-serif";
mso-fareast-font-family:"Times New Roman";color:black">/Library/Frameworks/R.framework/Versions/2.13/Resources/library/Rcpp/lib/x86_64/libRcpp.a:
line 1: `!<arch>'</span></p>
<p class="MsoNormal" style="color: rgb(34, 34, 34); "><span style="font-size:10.5pt;font-family:"Calibri","sans-serif";
mso-fareast-font-family:"Times New Roman";color:black">installing to
/Library/Frameworks/R.framework/Versions/2.13/Resources/library/growcurves/libs/x86_64</span></p>
<p class="MsoNormal" style="color: rgb(34, 34, 34); "><span style="font-size:10.5pt;font-family:"Calibri","sans-serif";
mso-fareast-font-family:"Times New Roman";color:black">** R</span></p>
<p class="MsoNormal" style="color: rgb(34, 34, 34); "><span style="font-size:10.5pt;font-family:"Calibri","sans-serif";
mso-fareast-font-family:"Times New Roman";color:black">** data</span></p>
<p class="MsoNormal" style="color: rgb(34, 34, 34); "><span style="font-size:10.5pt;font-family:"Calibri","sans-serif";
mso-fareast-font-family:"Times New Roman";color:black">** inst</span></p>
<p class="MsoNormal" style="color: rgb(34, 34, 34); "><span style="font-size:10.5pt;font-family:"Calibri","sans-serif";
mso-fareast-font-family:"Times New Roman";color:black">** preparing package for
lazy loading</span></p>
<p class="MsoNormal" style="color: rgb(34, 34, 34); "><span style="font-size:10.5pt;font-family:"Calibri","sans-serif";
mso-fareast-font-family:"Times New Roman";color:black">** help</span></p>
<p class="MsoNormal" style="color: rgb(34, 34, 34); "><span style="font-size:10.5pt;font-family:"Calibri","sans-serif";
mso-fareast-font-family:"Times New Roman";color:black">*** installing help
indices</span></p>
<p class="MsoNormal" style="color: rgb(34, 34, 34); "><span style="font-size:10.5pt;font-family:"Calibri","sans-serif";
mso-fareast-font-family:"Times New Roman";color:black">** building package
indices ...</span></p>
<p class="MsoNormal" style="color: rgb(34, 34, 34); "><span style="font-size:10.5pt;font-family:"Calibri","sans-serif";
mso-fareast-font-family:"Times New Roman";color:black">** testing if installed
package can be loaded</span></p>
<p class="MsoNormal" style="color: rgb(34, 34, 34); "><span style="font-size:10.5pt;font-family:"Calibri","sans-serif";
mso-fareast-font-family:"Times New Roman";color:black">Error in dyn.load(file,
DLLpath = DLLpath, ...) : </span></p>
<p class="MsoNormal"><span style="font-size: 10.5pt; font-family: Calibri, sans-serif; "><font class="Apple-style-span" color="#cc0000"> unable to load
shared object
'/Library/Frameworks/R.framework/Versions/2.13/Resources/library/growcurves/libs/x86_64/growcurves.so':</font></span></p>
<p class="MsoNormal"><span style="font-size: 10.5pt; font-family: Calibri, sans-serif; "><font class="Apple-style-span" color="#cc0000">
dlopen(/Library/Frameworks/R.framework/Versions/2.13/Resources/library/growcurves/libs/x86_64/growcurves.so,
6): Symbol not found: __ZTIN4Rcpp12not_a_matrixE</font></span></p>
<p class="MsoNormal" style="color: rgb(34, 34, 34); "><span style="font-size:10.5pt;font-family:"Calibri","sans-serif";
mso-fareast-font-family:"Times New Roman";color:black"> Referenced from:
/Library/Frameworks/R.framework/Versions/2.13/Resources/library/growcurves/libs/x86_64/growcurves.so</span></p>
<p class="MsoNormal" style="color: rgb(34, 34, 34); "><span style="font-size:10.5pt;font-family:"Calibri","sans-serif";
mso-fareast-font-family:"Times New Roman";color:black"> Expected in: flat
namespace</span></p>
<p class="MsoNormal" style="color: rgb(34, 34, 34); "><span style="font-size:10.5pt;font-family:"Calibri","sans-serif";
mso-fareast-font-family:"Times New Roman";color:black"> in
/Library/Frameworks/R.framework/Versions/2.13/Resources/library/growcurves/libs/x86_64/growcurves.so</span></p>
<p class="MsoNormal" style="color: rgb(34, 34, 34); "><span style="font-size:10.5pt;font-family:"Calibri","sans-serif";
mso-fareast-font-family:"Times New Roman";color:black">Error: loading failed</span></p>
<p class="MsoNormal" style="color: rgb(34, 34, 34); "><span style="font-size:10.5pt;font-family:"Calibri","sans-serif";
mso-fareast-font-family:"Times New Roman";color:black">Execution halted</span></p>
<p class="MsoNormal" style="color: rgb(34, 34, 34); "><span style="font-size:10.5pt;font-family:"Calibri","sans-serif";
mso-fareast-font-family:"Times New Roman";color:black">ERROR: loading failed</span></p>
<p class="MsoNormal" style="color: rgb(34, 34, 34); "><span style="font-size:10.5pt;font-family:"Calibri","sans-serif";
mso-fareast-font-family:"Times New Roman";color:black">* removing
'/Library/Frameworks/R.framework/Versions/2.13/Resources/library/growcurves'</span></p></font><div><br></div>-- <br>Thank you for your help and expertise, Terrance Savitsky<br>