<div dir="ltr"><div><div><div><div><div>Dear All,<br><br></div>This question might be a repeat of an earlier question, but I will be grateful if you can suggest any alternate solution to my problem. <br><br>------------<br>

</div>My system: Mac OS X 10.9 (Mavericks)<br></div>Rcpp Version: 0.11.1<br></div>R Version: 3.0.3<br>----------------<br><br>I installed Rcpp from binary using the install.package() function.<br>When I try to install a test package created by <br>

Rcpp.package.skeleton('testModule', module=T)<br></div>I obtain the following error:<br><div><br>*** installing help indices<br>** building package indices<br>** testing if installed package can be loaded<br>sh: line 1:  7195 Abort trap: 6           '/Library/Frameworks/R.framework/Resources/bin/R' --no-save --slave 2>&1 < '/var/folders/pn/d49rpkj95v5_9g5q5bsz0k400000gn/T//RtmpwW5RU4/file1bff7d88ce2'<br>

Warning: class "C++Object" is defined (with package slot ‘Rcpp’) but no metadata object found to revise subclass information---not exported?  Making a copy in package ‘testModule’<br>R(7195,0x7fff77cc8310) malloc: *** error for object 0x7fff77dd5330: pointer being freed was not allocated<br>

*** set a breakpoint in malloc_error_break to debug<br>ERROR: loading failed<br><br><br></div><div>However, the error is gone when I install Rcpp from source. So far so good for me. <br>However, I have distributed my package through Bioconducor.org. Bioconducor is unable to build the package in Mac OS X 10.9 (Mavericks) (similarly other users of my package). They report the following error :<br>

<pre style="font-size:smaller;padding:2px">flowMatch.cpp:74:2: error: reference to 'function' is ambiguous
        function( "computeMEC" , &computeMEC  , "Match clusters across a pair of sample by mixed edge cover algorithm." ) ;
</pre>(the detail error can be found here <pre style="font-size:smaller;padding:2px">from <a href="http://www.bioconductor.org/checkResults/release/bioc-LATEST/flowMatch/morelia-buildsrc.html">http://www.bioconductor.org/checkResults/release/bioc-LATEST/flowMatch/morelia-buildsrc.html</a><br>

</pre>)<br>I don't know what Rcpp version they are using. It looks like they are not building Rcpp from source.  Is there any alternative suggestion to avoid this situation? (It may to be possible to instruct every users of the package to install Rcpp from source).<br>

</div><div>The error is apparently coming from function declaration inside RCPP_MODULE<br>function("hello" , &hello  , "documentation for hello ");<br></div><div>I disabled this line and the error is gone with Rcpp installed from Binary for the package created using install.package().<br>

</div><div><br><br>Notes 1: I do not see this error with Rcpp 0.10.5 installed from source in Mac OS X 10.9 (Mavericks)<br>Notes 2: I do not see this error with Rcpp 0.10.5 installed from binary in<font> <span>Mac OS X Snow Leopard (10.6.8).<br>

</span></font></div><div><font><span>Notes3: Bioconductor (I don't know their Rcpp version) successfully built my package on </span></font><font><span><span style="font-size:smaller">Linux (Ubuntu 12.04.4 LTS) / x86_64, </span></span></font><span style="font-size:smaller">Windows Server 2008 R2 Enterprise SP1 (64-bit) / x64 and </span><span style="font-size:smaller">Mac OS X Snow Leopard (10.6.8) / x86_64</span> . <br>

</div><div>But their system was not able to build my package on <span style="font-size:smaller">Mac OS X Mavericks (10.9.2) / x86_64<br></span><pre style="font-size:smaller;padding:2px"><span style="font-family:arial,helvetica,sans-serif"><font>The primary error they reported is</font></span><br>

<br>flowMatch.cpp:74:2: error: reference to 'function' is ambiguous
        function( "computeMEC" , &computeMEC  , "Match clusters across a pair of sample by mixed edge cover algorithm." ) ;
<br></pre><pre style="font-size:smaller;padding:2px"><span style="font-family:arial,helvetica,sans-serif"><font>If you are interested, the detail error can be found:</font></span><br>from <a href="http://www.bioconductor.org/checkResults/release/bioc-LATEST/flowMatch/morelia-buildsrc.html">http://www.bioconductor.org/checkResults/release/bioc-LATEST/flowMatch/morelia-buildsrc.html</a><br>

</pre><br></div><div>Any suggestion to avoid this error in third party installation is much appreciated.<br><br></div><div>Regards,<br></div><div><br></div><div>Ariful Azad<br></div><div>Post Doctoral Researcher<br></div>

<div>Lawrence Berkeley National Laboratory<br><br></div></div>