<div dir="ltr"><div><div><div>The biocLite windows binary install works (provided the user has Octave in PATH).<br><br></div>The github (ref='develop') install works under Linux and Mac OS X (Mavericks).<br><br></div>
And by increasing the "biodiversity" (number of OS's supported) a hidden bug was<br>uncovered and fixed (after 100 posts!).<br><br></div>Cheers,<br>Dominick<br></div><div class="gmail_extra"><br><br><div class="gmail_quote">
On Fri, Nov 8, 2013 at 4:42 AM, 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">
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 = '<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>
<div class="HOEnZb"><div class="h5"><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 <<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 their<br>
>> > values. The sed command did not work probably because I forgot to double<br>
>> > the<br>
>> > square brackets, which is necessary to correctly pass configure's 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 <<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 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 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 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 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 to<br>
>> >> >>>> check.<br>
>> >> >>>><br>
>> >> >>>> Perhaps the explanation is that failing to call octave_end under<br>
>> >> >>>> Linux<br>
>> >> >>>> (or Windows?) is non-fatal, but this is fatal under Mac OS X? 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 RcppOctave.log<br>
>> >> >>>> (attached)<br>
><br>
><br>
</div></div></blockquote></div><br></div>