<div dir="ltr"><div>I've attached the output of R CMD check --as-cran.<br></div><div>No errors, just a few NOTE's. (Suggested package</div><div>RUnit must be installed.)</div><div><br></div><div>There has been a lot of discussion about "NOTE"</div>
<div>on r-revel, and it is not clear to me if this is considered</div><div>to be an error or just a warning. I don't know if CRAN</div><div>will accept a package with NOTE's...</div><div><br></div></div><div class="gmail_extra">
<br><br><div class="gmail_quote">On Fri, Nov 8, 2013 at 5:53 PM, Renaud Gaujoux <span dir="ltr"><<a href="mailto:renaud@mancala.cbio.uct.ac.za" target="_blank">renaud@mancala.cbio.uct.ac.za</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
Ah, I forgot something:<br>
* running a full R CMD check --as-cran on Mac?<br>
:D<br>
<div class="HOEnZb"><div class="h5"><br>
On 8 November 2013 18:33, Renaud Gaujoux <<a href="mailto:renaud@mancala.cbio.uct.ac.za">renaud@mancala.cbio.uct.ac.za</a>> wrote:<br>
> Nice. Many thanks!<br>
><br>
> ... and along the way we, or at least I, learnt that the hooks<br>
> .onUnload and .onDetach are actually not called when R quits and that<br>
> required cleanup procedures must be registered via reg.finalizer to be<br>
> sure they are called.<br>
><br>
> What is left:<br>
> * check if a Mac binary package works fine on machine different than<br>
> the one it was built on.<br>
> * get CRAN building machines geared with Octave so that binary<br>
> packages are available from CRAN. I will follow up with the CRAN<br>
> maintainer on this.<br>
><br>
> Bests,<br>
> Renaud<br>
><br>
><br>
><br>
> On 8 November 2013 16:23, Dominick Samperi <<a href="mailto:djsamperi@gmail.com">djsamperi@gmail.com</a>> wrote:<br>
>> The biocLite windows binary install works (provided the user has Octave in<br>
>> PATH).<br>
>><br>
>> The github (ref='develop') install works under Linux and Mac OS X<br>
>> (Mavericks).<br>
>><br>
>> And by increasing the "biodiversity" (number of OS's supported) a hidden bug<br>
>> was<br>
>> uncovered and fixed (after 100 posts!).<br>
>><br>
>> Cheers,<br>
>> Dominick<br>
>><br>
>><br>
>> On Fri, Nov 8, 2013 at 4:42 AM, Renaud Gaujoux<br>
>> <<a href="mailto:renaud@mancala.cbio.uct.ac.za">renaud@mancala.cbio.uct.ac.za</a>> wrote:<br>
>>><br>
>>> True :D<br>
>>> I thought of trying to get a neat sequence of flags without quote but<br>
>>> clearly did not work.<br>
>>> I updated the gh and myCRAN versions: they now contain your solution<br>
>>> for -Wl and also use mkoctfile rather than octave-config to retrieve<br>
>>> the include and linker flags.<br>
>>><br>
>>> If possible, can anybody please try the windows binary from myCRAN:<br>
>>><br>
>>> source('<a href="http://www.bioconductor.org/biocLite.R" target="_blank">http://www.bioconductor.org/biocLite.R</a>')<br>
>>> biocLite('RcppOctave', siteRepos =<br>
>>> '<a href="http://web.cbio.uct.ac.za/~renaud/CRAN" target="_blank">http://web.cbio.uct.ac.za/~renaud/CRAN</a>')<br>
>>><br>
>>> Thank you.<br>
>>><br>
>>> Bests,<br>
>>> Renaud<br>
>>><br>
>>> On 7 November 2013 17:13, Dominick Samperi <<a href="mailto:djsamperi@gmail.com">djsamperi@gmail.com</a>> wrote:<br>
>>> > This solution yields:<br>
>>> ><br>
>>> > -Wl,-F/Library/Frameworks/R.framework/..,-framework R ...<br>
>>> ><br>
>>> > and the linker doesn't know that the last "R" belongs to the<br>
>>> > -framework option.<br>
>>> ><br>
>>> > To fix, simply add the 'g' qualifier to the sed command in<br>
>>> > <a href="http://configure.ac" target="_blank">configure.ac</a>:<br>
>>> ><br>
>>> > R_LDFLAGS=`echo "-Wl,$R_LDFLAGS" | sed 's/ /,/g'`<br>
>>> ><br>
>>> ><br>
>>> > My original solution works because the -Wl,"whatever"<br>
>>> > option causes mkoctfile to insert the string "whatever"<br>
>>> > into the linker command line without parsing. If instead<br>
>>> > mkoctfile used a form of exec(3) that expects tokenized<br>
>>> > options, the sed solution would be necessary.<br>
>>> ><br>
>>> ><br>
>>> ><br>
>>> > On Thu, Nov 7, 2013 at 7:20 AM, Renaud Gaujoux<br>
>>> > <<a href="mailto:renaud@mancala.cbio.uct.ac.za">renaud@mancala.cbio.uct.ac.za</a>> wrote:<br>
>>> >><br>
>>> >> I changed <a href="http://configure.ac" target="_blank">configure.ac</a> into:<br>
>>> >> R_LDFLAGS=`echo "-Wl,$R_LDFLAGS" | sed 's/ /,/'`<br>
>>> >><br>
>>> >> as I read/saw that multiple options must be comma separated.<br>
>>> >> This will break if the path to the R framework contains spaces though.<br>
>>> >> Can you please try again:<br>
>>> >><br>
>>> >> install_github('RcppOctave', 'renozao', ref = 'develop')<br>
>>> >><br>
>>> >> Thanks.<br>
>>> >><br>
>>> >> Bests,<br>
>>> >> Renaud<br>
>>> >><br>
>>> >> On 6 November 2013 22:37, Renaud Gaujoux<br>
>>> >> <<a href="mailto:renaud@mancala.cbio.uct.ac.za">renaud@mancala.cbio.uct.ac.za</a>><br>
>>> >> wrote:<br>
>>> >> > Nice. It is indeed a better solution than changing the flags and<br>
>>> >> > their<br>
>>> >> > values. The sed command did not work probably because I forgot to<br>
>>> >> > double<br>
>>> >> > the<br>
>>> >> > square brackets, which is necessary to correctly pass configure's<br>
>>> >> > first<br>
>>> >> > string evaluation.<br>
>>> >> > I will incorporate the change tomorrow.<br>
>>> >> > Thanks!<br>
>>> >> ><br>
>>> >> > Bests,<br>
>>> >> > Renaud<br>
>>> >> ><br>
>>> >> > On Wednesday, November 6, 2013, Dominick Samperi wrote:<br>
>>> >> >><br>
>>> >> >> The reason we have been hacking away at '-F' vs '-L' instead of<br>
>>> >> >> letting 'R CMD config' figure things out is that mkoctfile does not<br>
>>> >> >> know about R frameworks ('-F' is invalid). But mkoctfile does have<br>
>>> >> >> the -Wl,whatever option, which simply passes whatever down to<br>
>>> >> >> the linker.<br>
>>> >> >><br>
>>> >> >> I have attached a modified <a href="http://configure.ac" target="_blank">configure.ac</a> that uses this option<br>
>>> >> >> instead of using sed to hack the output of R CMD config --ldflags.<br>
>>> >> >><br>
>>> >> >><br>
>>> >> >><br>
>>> >> >> On Wed, Nov 6, 2013 at 10:25 AM, Dominick Samperi<br>
>>> >> >> <<a href="mailto:djsamperi@gmail.com">djsamperi@gmail.com</a>><br>
>>> >> >> wrote:<br>
>>> >> >><br>
>>> >> >> Hello Renaud,<br>
>>> >> >><br>
>>> >> >> So, this R technical issue (reg.finalizer) was the crux of the<br>
>>> >> >> problem<br>
>>> >> >> all<br>
>>> >> >> along. Good work!<br>
>>> >> >><br>
>>> >> >> The '..' is still there and the build still fails without my hacked<br>
>>> >> >> Makefile.in, but<br>
>>> >> >> with this change everything works (no more install memory errors).<br>
>>> >> >><br>
>>> >> >> The '..' in the output of R CMD config --ldflags is there for a<br>
>>> >> >> purpose,<br>
>>> >> >> because<br>
>>> >> >> the R framework is under /Library/Frameworks, and not under<br>
>>> >> >> /Library/Frameworks/R.framework. This is analogous to<br>
>>> >> >> -L/usr/lib/mylibs -lfoo, where /usr/lib/mylibs may contain a<br>
>>> >> >> collection<br>
>>> >> >> of libraries (instead of frameworks), not just libfoo.so.<br>
>>> >> >> (A Mac OS framework is analogous to an R package.)<br>
>>> >> >><br>
>>> >> >> Make sure '..' is not in the path supplied to '-L' and everything<br>
>>> >> >> should<br>
>>> >> >> work.<br>
>>> >> >><br>
>>> >> >> Cheers,<br>
>>> >> >> Dominick<br>
>>> >> >><br>
>>> >> >><br>
>>> >> >> On Wed, Nov 6, 2013 at 8:19 AM, Renaud Gaujoux<br>
>>> >> >> <<a href="mailto:renaud@mancala.cbio.uct.ac.za">renaud@mancala.cbio.uct.ac.za</a>> wrote:<br>
>>> >> >><br>
>>> >> >> Hi,<br>
>>> >> >><br>
>>> >> >> I made some changes available in the develop version, which should<br>
>>> >> >> hopefully solve both issues:<br>
>>> >> >> * octave_end is now called on exit (via reg.finalizer: see my post<br>
>>> >> >> on r-devel<br>
>>> >> >> <a href="https://stat.ethz.ch/pipermail/r-devel/2013-November/067912.html" target="_blank">https://stat.ethz.ch/pipermail/r-devel/2013-November/067912.html</a>)<br>
>>> >> >> * the extra dots are removed by the sed in <a href="http://configure.ac" target="_blank">configure.ac</a>, but I<br>
>>> >> >> think<br>
>>> >> >> we still need to figure out why these dots are there...<br>
>>> >> >><br>
>>> >> >> To test:<br>
>>> >> >><br>
>>> >> >> devtools::install_github('RcppOctave', 'renozao', ref = 'develop')<br>
>>> >> >><br>
>>> >> >> Thanks.<br>
>>> >> >><br>
>>> >> >> Bests,<br>
>>> >> >> Renaud<br>
>>> >> >><br>
>>> >> >> On 6 November 2013 11:15, Renaud Gaujoux<br>
>>> >> >> <<a href="mailto:renaud@mancala.cbio.uct.ac.za">renaud@mancala.cbio.uct.ac.za</a>><br>
>>> >> >> wrote:<br>
>>> >> >> > Couple of questions to understand what is going on:<br>
>>> >> >> ><br>
>>> >> >> > * why does R CMD config --ldflags returns these extra '..' if<br>
>>> >> >> > they<br>
>>> >> >> > are<br>
>>> >> >> > incorrect?<br>
>>> >> >> > * why does the compilation work if the path is incorrect to R<br>
>>> >> >> > library<br>
>>> >> >> > is<br>
>>> >> >> > incorrect?<br>
>>> >> >> > * why removing the dots should solve the malloc error?<br>
>>> >> >> ><br>
>>> >> >> ><br>
>>> >> >> ><br>
>>> >> >> > On 5 November 2013 16:38, Dominick Samperi <<a href="mailto:djsamperi@gmail.com">djsamperi@gmail.com</a>><br>
>>> >> >> > wrote:<br>
>>> >> >> >><br>
>>> >> >> >> R CMD config --ldflags<br>
>>> >> >> >> yields<br>
>>> >> >> >> -F/Library/Frameworks/R.framework/.. -framework R<br>
>>> >> >> >><br>
>>> >> >> >> This needs to be hacked for mkoctfile to:<br>
>>> >> >> >> -L/Library/Frameworks/R.framework/Libraries -lR<br>
>>> >> >> >> (no '..')<br>
>>> >> >> >><br>
>>> >> >> >> Applying this to the github source fixes it for<br>
>>> >> >> >> Mac OS X Mavericks provided the --no-test-load<br>
>>> >> >> >> and octave_end tricks are used.<br>
>>> >> >> >><br>
>>> >> >> >><br>
>>> >> >> >> On Tue, Nov 5, 2013 at 9:04 AM, Renaud Gaujoux<br>
>>> >> >> >> <<a href="mailto:renaud@mancala.cbio.uct.ac.za">renaud@mancala.cbio.uct.ac.za</a>> wrote:<br>
>>> >> >> >>><br>
>>> >> >> >>> Not sure where the extra '..' would come from.<br>
>>> >> >> >>> Are you installing the latest version from github?<br>
>>> >> >> >>><br>
>>> >> >> >>> devtools::install_github('RcppOctave', 'renozao')<br>
>>> >> >> >>><br>
>>> >> >> >>><br>
>>> >> >> >>><br>
>>> >> >> >>> On 2 November 2013 07:00, Dominick Samperi <<a href="mailto:djsamperi@gmail.com">djsamperi@gmail.com</a>><br>
>>> >> >> >>> wrote:<br>
>>> >> >> >>>><br>
>>> >> >> >>>> It appears that octave_end is not called at all under Mac OS X.<br>
>>> >> >> >>>> But<br>
>>> >> >> >>>> it<br>
>>> >> >> >>>> is also not called under Linux! I inserted Rprintf statements<br>
>>> >> >> >>>> to<br>
>>> >> >> >>>> check.<br>
>>> >> >> >>>><br>
>>> >> >> >>>> Perhaps the explanation is that failing to call octave_end<br>
>>> >> >> >>>> under<br>
>>> >> >> >>>> Linux<br>
>>> >> >> >>>> (or Windows?) is non-fatal, but this is fatal under Mac OS X?<br>
>>> >> >> >>>> If<br>
>>> >> >> >>>> this<br>
>>> >> >> >>>> is so the Mac OS X behavior is less dangerous...<br>
>>> >> >> >>>><br>
>>> >> >> >>>> If I do not use --no-test-load, I get the result in<br>
>>> >> >> >>>> RcppOctave.log<br>
>>> >> >> >>>> (attached)<br>
>>> ><br>
>>> ><br>
>><br>
>><br>
</div></div></blockquote></div><br></div>