Hello, The following strange behavior under Mac OS was distilled from attempts to resolve problems with the RcppOctave package, but the problem will be illustrated without use of this package.
Basically, when I try to mix use of the Octave library with Rcpp, there is a memory exception when the Mac dlopen() is used to open Rcpp.so (the error occurs in loadLibrary()). To reproduce, simply drop the two attached files (Makevars and strtest.cpp) into Rcpp/src. Then 'R CMD INSTALL Rcpp' will fail with a memory problem, at least sometimes… I say "sometimes" because this problem did not occur before I reinstalled Mac OS X 10.8 (because the update to Mavericks failed). On the other hand, it did occur before the update when I tried to use an older version of Octave (installed by MacPorts). For this test the latest version of Octave (3.6.4) was installed using homebrew. Note that the trivial source file strtest.cpp defines one function that is not actually called! Just instantiating the Octave class string_vector is enough to trigger the problem. If the line using string_vector is commented out there is no problem. It may also not occur if you have older software installed? After the OS reinstall, and after installing the latest version of the command line tools, there is no llvm-gcc-4.2 and llvm-g++-4.2 like there was previously? The problem is clearly related to how templates are instantiated (or not instantiated) when using clang++ or g++, possibly a version mismatch, or some Mac OS environmental issue that I have not been able to isolate. Static initialization may also be a factor. The last post in this link seems to address a related issue... https://bugs.launchpad.net/pocl/+bug/1005329 This messy problem raises the question: what is in store for R under Mac OS X going forward? Apple is dropping support for gfortran, and even for gcc/g++, so will clang/clang++ be used? What about Fortran? DragonEgg? Thanks, Dominick
Makevars
Description: Binary data
#include <octave/oct.h>
void strtest() {
string_vector argvFoo((octave_idx_type)1);
}
_______________________________________________ R-SIG-Mac mailing list [email protected] https://stat.ethz.ch/mailman/listinfo/r-sig-mac
