[Rcpp-devel] Compiler seg fault with Rcpp 0.9.7

Steve Lianoglou mailinglist.honeypot at gmail.com
Wed Oct 5 21:44:18 CEST 2011


Hi,

On Wed, Oct 5, 2011 at 3:22 PM, Douglas Bates <bates at stat.wisc.edu> wrote:
> On Wed, Oct 5, 2011 at 2:15 PM, Ian Fellows <ian.fellows at stat.ucla.edu> wrote:
>> Sorry, I should have been more explicit. I can install rcpp okay. The error occurs when installing a package that I'm developing. The installs fine with 0.9.4, but not with 0.9.7. Interestingly it is the compiler that blows up...
>
> And not unrelated is the fact that you are compiling on a Mac OS X
> platform.  Notice that Apple is still stuck at gcc 4.2.1 which is
> known to be buggy.
>
> As I understand it, the Free Software Foundation switched the license
> on gcc to GPL 3 or later for the 4.2.2 version of gcc and Apple
> decided not to adopt it.  (One imagines that discussions between
> Richard Stallman and Steve Jobs, if there were any, would have been
> interesting to observe.)  I'm not sure what the best way out is and,
> fortunately, I'm not working on a Mac.

Ahh ... is *that* why we're stuck on 4.2.1 for ever? I didn't realize
that. Shoot, and all this time I was holding out for an upgrade ...
perhaps when clang matures more it will save the day.

>
> I have heard that recent versions of the Xcode tools include clang and
> clang++.  I have also heard that those versions are buggy and out of
> date.
>
> Bottom line: use bootcamp and install Linux :-)

Or (1) you can try to manage a gcc/R combo through macports. I reckon
this can get tricky, and the package you build won't be able to run on
"normal" mac/R, but ... you wouldn't have that either if you did the
bootcamp route either.

Or (2) you can try to work around this issue. Ian, are you
instantiating a new Rcpp::Xptr and trying to register your own custom
finalizer in one go? Is that why this is in your error stack trace "
... Rcpp::XPtr<Class, standard_delete_finalizer<Class> > ..."?

Perhaps you can use the "normal" R (C) functions to wrap an external
pointer and register its finailizer, eg:

SEXP xp = R_MakeExternalPtr(your_ptr, R_NilValue, R_NilValue);
R_RegisterCFinalizer(xp, your_custom_finalizer);

Would that work as a bandaid for now?

-steve

-- 
Steve Lianoglou
Graduate Student: Computational Systems Biology
 | Memorial Sloan-Kettering Cancer Center
 | Weill Medical College of Cornell University
Contact Info: http://cbio.mskcc.org/~lianos/contact


More information about the Rcpp-devel mailing list