[Rcppoctave-user] Apple Blues

Renaud Gaujoux renaud at mancala.cbio.uct.ac.za
Fri Nov 1 08:19:17 CET 2013


---------- Forwarded message ----------
From: Dominick Samperi <djsamperi at gmail.com>
Date: 1 November 2013 07:14
Subject: Re: Apple Blues
To: Renaud Gaujoux <renaud at mancala.cbio.uct.ac.za>


I can finally close this issue, after:

1. Updating to Mac OS X 10.9 (Mavericks)
2. Installing Xcode and command line tools (again).
3. Deleting ALL old brew builds: rm -rf /usr/local/Cellar
4. Install octave using brew (includes recent patches for Mavericks)
5. Downloading the latest development Octave source using hg
    to fetch a correct octave/examples/embedded.cc

As you probably know, the last line of embedded.cc (attached)
is very important. Without it there is still a memory error!



On Thu, Oct 31, 2013 at 9:44 PM, Dominick Samperi <djsamperi at gmail.com>wrote:

> It turns out that the Octave problem has nothing to do with R or Rcpp.
> This is a clash between Octave and MacOS, and there is also a problem
> under Fedora Linux (or the Octave documentation is not up-to-date).
>
> Process the attached file like so (under MacOS):
> mkoctfile --link-stand-alone embedded.cc -o embedded
>
> Note that most of the code in this file has been commented out,
> leaving only the string_vector declaration at the top.
>
> This is what happens when I run embedded:
> /Users/dsamperi/c++bug $ ./embedded
> embedded(64345) malloc: *** error for object 0x7fff7e114570: pointer being
> freed was not allocated
>  *** set a breakpoint in malloc_error_break to debug
> Abort trap: 6
>
> If I uncomment the code and create embedded under Fedora Linux
> I get an error saying gcd is not invoked properly. But this example
> is copied directly from the documentation, so I guess it has not
> been checked/updated for some time…
>
> Dominick
>
>
> On Thu, Oct 31, 2013 at 3:37 AM, Renaud Gaujoux <
> renaud at mancala.cbio.uct.ac.za> wrote:
>
>>
>> On 30 October 2013 20:10, Dominick Samperi <djsamperi at gmail.com> wrote:
>>
>>> We are pretty much back to where we were some weeks ago. Remember
>>> the trivial change that I made to Rcpp that caused it to fail with the
>>> pointer error, by adding a function that was not even called?
>>>
>>>
>>>
>> Did you try this in a plain package, without any Rcpp stuff?
>>
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.r-forge.r-project.org/pipermail/rcppoctave-user/attachments/20131101/5c0408e2/attachment.html>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: embedded.cc
Type: application/octet-stream
Size: 741 bytes
Desc: not available
URL: <http://lists.r-forge.r-project.org/pipermail/rcppoctave-user/attachments/20131101/5c0408e2/attachment.obj>


More information about the Rcppoctave-user mailing list