<div dir="ltr"><div><div><div><div><div><div><div><div><div><div><div><div>Hello,<br><br></div>  I have a package under development that uses Rcpp modules to expose<br></div>some C++ classes. I hadn't touched the package for some months (close<br></div>to a year). At that time the package compiled and installed without problem<br></div>and worked well. I could access the classes as expected. Recently, having<br></div>updated Rcpp and R in the meantime, I reinstalled the package with <br></div>the following result:<br><br></div>    1. If building and loading from within the package directory, all works fine.<br></div>    2. When installing the package, either from github, locally, or otherwise,<br></div>        the modules are *not* visible.<br><br></div>The package passes devtools:check() and compiles fine. <br><br></div>For instance, for one of those classes, <span style="font-family:monospace,monospace">LshParameterSetter</span>, I do<font size="2"><span style="font-family:monospace,monospace"></span></font><font size="2"><span style="font-family:monospace,monospace"></span></font><blockquote><font size="2"><span style="font-family:monospace,monospace"></span></font><br><font size="2"><span style="font-family:monospace,monospace">RCPP_EXPOSED_CLASS(LshParameterSetter) </span></font><br><font size="2"><span style="font-family:monospace,monospace"></span></font><br><font size="2"><span style="font-family:monospace,monospace">RCPP_MODULE(mod_params) {</span></font><br><font size="2"><span style="font-family:monospace,monospace">    class_<LshParameterSetter>("LshParameterSetter")</span></font><br><font size="2"><span style="font-family:monospace,monospace"></span></font><br><font size="2"><span style="font-family:monospace,monospace">    .constructor<int,int>()</span></font><br><font size="2"><span style="font-family:monospace,monospace"></span></font><br><font size="2"><span style="font-family:monospace,monospace">    .method("withDefaults", &LshParameterSetter::withDefaults,</span></font><br><font size="2"><span style="font-family:monospace,monospace">            "Fill with defaults")</span></font><br><font size="2"><span style="font-family:monospace,monospace">    .method("distance", &LshParameterSetter::distance,</span></font><br><font size="2"><span style="font-family:monospace,monospace">            "Set distance metric")</span></font><br><font size="2"><span style="font-family:monospace,monospace">    .method("numHashFunctions", &LshParameterSetter::numHashFunctions,</span></font><br><font size="2"><span style="font-family:monospace,monospace">            "Set numbers of hash functions and tables")</span></font><br><font size="2"><span style="font-family:monospace,monospace">    .method("numHashTables",   &LshParameterSetter::numHashTables,</span></font><br><font size="2"><span style="font-family:monospace,monospace">            "Set numbers of hash functions and tables")</span></font><br><font size="2"><span style="font-family:monospace,monospace">    .method("storage",   &LshParameterSetter::storage,</span></font><br><font size="2"><span style="font-family:monospace,monospace">            "Set LSH Hash Table Storage type")</span></font><br><font size="2"><span style="font-family:monospace,monospace">    .method("family",   &LshParameterSetter::family,</span></font><br><font size="2"><span style="font-family:monospace,monospace">            "Set LSH Family")</span></font><br><font size="2"><span style="font-family:monospace,monospace">    .method("rotations",   &LshParameterSetter::rotations,</span></font><br><font size="2"><span style="font-family:monospace,monospace">            "Number of rotations")</span></font><br><font size="2"><span style="font-family:monospace,monospace">    .method("asList",        &LshParameterSetter::asList,</span></font><br><font size="2"><span style="font-family:monospace,monospace">            "List of parameter values by name")</span></font><br><font size="2"><span style="font-family:monospace,monospace">   ;</span></font><br><font size="2"><span style="font-family:monospace,monospace">}</span></font><br><font size="2"><span style="font-family:monospace,monospace"></span></font></blockquote>and similarly for the other classes. This module is loaded in the R code</div><div>with <br></div><div>                     <span style="font-family:monospace,monospace">Rcpp::loadModule("mod_params", TRUE)</span><br></div><div>and similarly for the other modules.<br></div><div><br></div><div>The installed package has the .rdb, .rdx, and .so file, so it's hard to see</div><div>if something has been lost in the installation.  There's no indication what</div><div>is wrong, but after loading the installed package, a class like <span style="font-family:monospace,monospace">LshParameterSetter</span></div><div><div><div><div><div><div><div><div><div><div><div><div><div><div><div><div><div><div>is not defined. (Loading from within the package source directory it is, showing</div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div><span style="font-family:monospace,monospace">> LshParameterSetter<br>C++ class 'LshParameterSetter' <0x7fde72fb1940><br>Constructors:<br>    LshParameterSetter(int, int)<br><br></span></div><div><span style="font-family:monospace,monospace">Fields: ...</span><br></div></blockquote><div>as it should be.) I've done this with simple skeletons and not had a</div><div>similar problem. But I don't see a qualitative difference between these</div><div>cases.<br></div><div><br></div><div>The full package code is at  <a href="https://github.com/genovese/falconnr">https://github.com/genovese/falconnr</a></div><div>and the session info is below. <br></div><div><br></div><div>I'd appreciate any pointers on this, as the problem is unclear to me,</div><div>especially since it worked without problem last year. I'm happy to</div><div>provide any useful information that I might have omitted here.<br></div><div><br></div><div>Thanks for your help, Chris<br></div><div><br></div><div>> sessionInfo()<br>R version 3.3.2 (2016-10-31)<br>Platform: x86_64-apple-darwin13.4.0 (64-bit)<br>Running under: macOS Sierra 10.12.6<br><br>locale:<br>[1] en_US.UTF-8/en_US.UTF-8/en_US.UTF-8/C/en_US.UTF-8/en_US.UTF-8<br><br>attached base packages:<br>[1] grid      stats     graphics  grDevices utils     datasets  methods   base     <br><br>other attached packages:<br>[1] falconnr_0.0.0.9001 MASS_7.3-45         lattice_0.20-34    <br><br>loaded via a namespace (and not attached):<br>[1] Rcpp_0.12.13     codetools_0.2-15<br><br></div></div></div></div></div></div></div></div></div></div></div></div></div></div></div></div></div></div></div>