[Rcppoctave-user] Apple Blues

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


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


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/64d209b8/attachment.html>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: embedded.cc
Type: application/octet-stream
Size: 908 bytes
Desc: not available
URL: <http://lists.r-forge.r-project.org/pipermail/rcppoctave-user/attachments/20131101/64d209b8/attachment.obj>


More information about the Rcppoctave-user mailing list