<div dir="ltr"><br><br><div class="gmail_quote">---------- Forwarded message ----------<br>From: <b class="gmail_sendername">Dominick Samperi</b> <span dir="ltr"><<a href="mailto:djsamperi@gmail.com">djsamperi@gmail.com</a>></span><br>
Date: 1 November 2013 07:14<br>Subject: Re: Apple Blues<br>To: Renaud Gaujoux <<a href="mailto:renaud@mancala.cbio.uct.ac.za">renaud@mancala.cbio.uct.ac.za</a>><br><br><br><div dir="ltr">I can finally close this issue, after:<div>
<br><div>1. Updating to Mac OS X 10.9 (Mavericks)</div><div>2. Installing Xcode and command line tools (again).</div><div>3. Deleting ALL old brew builds: rm -rf /usr/local/Cellar</div>
<div>4. Install octave using brew (includes recent patches for Mavericks)</div><div>5. Downloading the latest development Octave source using hg</div><div> to fetch a correct octave/examples/embedded.cc</div><div><br>
</div>
<div>As you probably know, the last line of embedded.cc (attached)</div><div>is very important. Without it there is still a memory error!</div><div><br></div></div></div><div class="HOEnZb"><div class="h5"><div class="gmail_extra">
<br><br><div class="gmail_quote">
On Thu, Oct 31, 2013 at 9:44 PM, Dominick Samperi <span dir="ltr"><<a href="mailto:djsamperi@gmail.com" target="_blank">djsamperi@gmail.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<div dir="ltr">It turns out that the Octave problem has nothing to do with R or Rcpp.<div>This is a clash between Octave and MacOS, and there is also a problem</div><div>under Fedora Linux (or the Octave documentation is not up-to-date).</div>
<div><br></div><div>Process the attached file like so (under MacOS):</div><div>mkoctfile --link-stand-alone embedded.cc -o embedded</div><div><br></div><div>Note that most of the code in this file has been commented out,</div>
<div>leaving only the string_vector declaration at the top.</div><div><br></div><div>This is what happens when I run embedded:</div><div><div>/Users/dsamperi/c++bug $ ./embedded</div><div>embedded(64345) malloc: *** error for object 0x7fff7e114570: pointer being freed was not allocated</div>
<div>
<div>*** set a breakpoint in malloc_error_break to debug</div></div><div>Abort trap: 6</div></div><div><br></div><div>If I uncomment the code and create embedded under Fedora Linux</div><div>I get an error saying gcd is not invoked properly. But this example</div>
<div>is copied directly from the documentation, so I guess it has not</div><div>been checked/updated for some time…</div><span><font color="#888888"><div><br></div><div>Dominick</div></font></span></div><div>
<div><div class="gmail_extra"><br><br><div class="gmail_quote">On Thu, Oct 31, 2013 at 3:37 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"><div dir="ltr"><br><div class="gmail_extra"><div class="gmail_quote"><div>On 30 October 2013 20:10, Dominick Samperi <span dir="ltr"><<a href="mailto:djsamperi@gmail.com" target="_blank">djsamperi@gmail.com</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr">We are pretty much back to where we were some weeks ago. Remember<div>the trivial change that I made to Rcpp that caused it to fail with the</div>
<div>pointer error, by adding a function that was not even called?</div>
<div><br></div><br></div></blockquote><div><br></div></div><div>Did you try this in a plain package, without any Rcpp stuff? <br></div></div></div></div>
</blockquote></div><br></div>
</div></div></blockquote></div><br></div>
</div></div></div><br></div>