[Rcpp-devel] Error checking package that uses Rcpp

Dirk Eddelbuettel edd at debian.org
Tue May 10 04:10:05 CEST 2011

On 9 May 2011 at 18:44, Andrew Redd wrote:
| Rcpp Developers,
| I'm not quite sure what to make of this with my package it won't pass check at
| the moment because I get the error 
|     * checking whether the name space can be loaded with stated dependencies
|     ... WARNING
|     Error: .onLoad failed in loadNamespace() for 'gpuBayes', details:
|       call: Module(module, mustStart = TRUE)
|       error: could not find function "getClass"
|     Execution halted

Quick shot from the hip:  Rcpp now has a new helper function you can use in
R/zzz.R, see e.g. the full example in the unitTests:

   NAMESPACE <- environment()

   .onLoad <- function(libname, pkgname){

Maybe peeking at that (working) example, its NAMESPACE and DESCRIPTION file
etc will be a clue?

| I noticed that the package  RcppModels on R-forge also generates this error.

(That one is pretty old though.)
| A possibly related problem that I am facing is when I try to load the module I
| get 
|     > Module("GPU_BAYES",mustStart=T)
|     Error in Module("GPU_BAYES", mustStart = T) : 
|       Failed to initialize module pointer: Error in FUN
|     ("_rcpp_module_boot_GPU_BAYES"[[1L]], ...): no such symbol
|     _rcpp_module_boot_GPU_BAYES in package .GlobalEnv
| I will try and get a working example that reproduces the error, but while I do
| that I hope someone knows what the error might be.

Good idea!  Try reducing the problem or building up from a working example.


Gauss once played himself in a zero-sum game and won $50.
                      -- #11 at http://www.gaussfacts.com

More information about the Rcpp-devel mailing list