<br><br><div class="gmail_quote">On Tue, Nov 16, 2010 at 12:36 PM, Dirk Eddelbuettel <span dir="ltr">&lt;<a href="mailto:edd@debian.org">edd@debian.org</a>&gt;</span> wrote:<br><blockquote class="gmail_quote" style="margin: 0pt 0pt 0pt 0.8ex; border-left: 1px solid rgb(204, 204, 204); padding-left: 1ex;">
<br>
Hi Christoph,<br>
<div class="im"><br>
On 16 November 2010 at 15:59, Christoph Bergmeir wrote:<br>
| Hi Rcpp list,<br>
|<br>
| the CRAN maintainers still don&#39;t seem to be too happy about the dependence on GNU make that gets introduced by $(shell) in the Makevars files.<br>
|<br>
| The package I recently submitted to CRAN, RSNNS, uses exactly the same mechanism as proposed in the Rcpp vignette or is implemented e.g. in termstrc and many other Rcpp packages.<br>
|<br>
| Brian Ripley proposed now in an email on <a href="mailto:CRAN@r-project.org">CRAN@r-project.org</a> to just use:<br>
|<br>
| PKG_LIBS = `$(R_HOME)/bin/Rscript -e &quot;Rcpp:::LdFlags()&quot;`<br>
|<br>
| Is this a solution? Or are there other drawbacks?<br>
<br>
</div>It&#39;s a somewhat long story.<br>
<br>
It&#39;s been about two years since I started to maintain and extend the Rcpp<br>
package which its previous maintainer had left dead and rotting in the<br>
digital archives for two years already at that point. </blockquote><div><br>Correction here. That package that was left &quot;dead and rotting&quot; on CRAN<br>was updated by its author (that would be me) in November of 2009 to<br>
include object-mapping features that were later reimplemented in what<br>is now known as the Rcpp package. The syntax used for these features<br>in Rcpp is Rcpp::as and Rcpp:wrap.<br><br>Shortly after I released this work the following comment was added to<br>
the README file for Rcpp (version 0.8.3):<br><br>&quot;As of November 2009, Dominick has re-commenced maintenance of RcppTemplate<br>with new releases on CRAN.  This may provide a good opportunity to import<br>some new ideas into Rcpp as well, time permitting.&quot;<br>
<br>Thus the linkage to previous work is not quite what the &quot;dead and rotting&quot;<br>comment above would have you believe.<br><br></div><blockquote class="gmail_quote" style="margin: 0pt 0pt 0pt 0.8ex; border-left: 1px solid rgb(204, 204, 204); padding-left: 1ex;">
 Sane build processes<br>
have always been one of many core concerns we tried to address, and we have<br>
gained some experience.  I do think we provide them.<br>
<br>
Now, thanks in large part to Doug Bates who suggested it, the situation is<br>
also much better now with &quot;LinkingTo: Rcpp&quot; which most of the Rcpp-using<br>
packages on CRAN have adopted -- as this reduces the need for two<br>
shell-or-backtick expressions down to one.  Moreover, before LinkingTo, the<br>
expression for the proper include directory had to be invoked each time a<br>
source file in a package using Rcpp was being compiled, ie N times for N<br>
source files. And there had been side effects with this which have<br>
frustrating particularly to the maintainers of the Windows build service, ie<br>
Uwe Ligges and to some extend Brian Ripley.<br></blockquote><div><br>The LinkingTo convention is obviously part of the R package development<br>process, and the name is somewhat misleading because what it does is<br>insert necessary include file flags (-I options), not linking flags. <br>
<br>I think there may be plans to extend this functionality, partly to support<br>packages like Rcpp, and this will simplify things.<br><br>On the recursive way that $(shell) escapes are expanded (the N times N<br>problem), there is an easy work-around: read the GNU make docs. It<br>
says that if you use &#39;:=&#39; (colon equals) instead of &#39;=&#39;, then the expansion is<br>only done once.<br><br></div><blockquote class="gmail_quote" style="margin: 0pt 0pt 0pt 0.8ex; border-left: 1px solid rgb(204, 204, 204); padding-left: 1ex;">

<br>
What we recommend now is our best effort at a reliable solution. It works for<br>
all packages employing it, but I should add that I think some of the now 16<br>
packages on CRAN and BioC that employ Rcpp use the scheme suggested by Brian<br>
Ripley.<br>
<br>
Personally, I think I don&#39;t use it in any of my packages. I also believe we<br>
do not recommended it anywhere in the documentation (and if we forget to<br>
prune an older recommendation to use it, let us know and we amend it).<br>
<br>
But we are all grown-ups so you are free to use whatever you prefer.  We<br>
ourselves went back and forth once or twice earlier in the year.  You can<br>
always try, especially with the win-builder service, and see how it<br>
does. Worst case, you get a new upload to fix your build variables.<br>
<br>
But if your package were to break, I might feel less inclined to help if you<br>
don&#39;t employ the solution I recommended to avoid the breakage in the first<br>
place. ;-)<br>
<br>
Finally, in practice, the &quot;SystemRequirements: GNU make&quot; is not all that<br>
onerous for any systems used in the real world which are bound to have GNU<br>
make anyway.<br>
<br>
Oh, and last but not least, we do have some plans to address LinkingTo:<br>
completely at the R level, but Romain, Uwe, Doug, Martin, myself, ... are<br>
also busy with other things so this has not seen real progress.<br>
<br>
So that&#39;s my $0.02.<br>
<div class="im"><br>
| As it seems to me that this problem is not so much a problem of a specific package, as more a general Rcpp problem, I&#39;d like to discuss this topic here..<br>
<br>
</div>Yup.  Hope the mail was somewhat helpful.<br>
<br>
Cheers, Dirk<br>
<font color="#888888"><br>
--<br>
Dirk Eddelbuettel | <a href="mailto:edd@debian.org">edd@debian.org</a> | <a href="http://dirk.eddelbuettel.com" target="_blank">http://dirk.eddelbuettel.com</a><br>
</font><div><div></div><div class="h5">_______________________________________________<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>
</div></div></blockquote></div><br>