[Rcpp-devel] package using Rcpp aborting with: terminate called after throwing an instance of 'Rcpp::not_compatible' inside class__newInstance()

Dirk Eddelbuettel edd at debian.org
Sat Nov 21 23:01:40 CET 2015


On 21 November 2015 at 15:47, Dirk Eddelbuettel wrote:
| 
| Simon, Carlos, Prateek,
| 
| It's an issue between R and guitar. Rcpp is an bystander.  
| 
| Upon cloning and running R CMD INSTALL we see it end on
| 
| *** installing help indices
| ** building package indices
| ** testing if installed package can be loaded
| Found more than one class "Rcpp_Reference" in cache; using the first, from namespace 'guitar'
| Found more than one class "Rcpp_Reference" in cache; using the first, from namespace 'guitar'
| Found more than one class "Rcpp_Repository" in cache; using the first, from namespace 'guitar'
| Found more than one class "Rcpp_Repository" in cache; using the first, from namespace 'guitar'
| Found more than one class "Rcpp_Index" in cache; using the first, from namespace 'guitar'
| Found more than one class "Rcpp_Index" in cache; using the first, from namespace 'guitar'
| Found more than one class "Rcpp_OID" in cache; using the first, from namespace 'guitar'
| Found more than one class "Rcpp_OID" in cache; using the first, from namespace 'guitar'
| Found more than one class "Rcpp_ODBObject" in cache; using the first, from namespace 'guitar'
| Found more than one class "Rcpp_ODBObject" in cache; using the first, from namespace 'guitar'
| Found more than one class "Rcpp_ODB" in cache; using the first, from namespace 'guitar'
| Found more than one class "Rcpp_ODB" in cache; using the first, from namespace 'guitar'
| Found more than one class "Rcpp_Commit" in cache; using the first, from namespace 'guitar'
| Found more than one class "Rcpp_Commit" in cache; using the first, from namespace 'guitar'
| Found more than one class "Rcpp_Tree" in cache; using the first, from namespace 'guitar'
| Found more than one class "Rcpp_Tree" in cache; using the first, from namespace 'guitar'
| Found more than one class "Rcpp_TreeEntry" in cache; using the first, from namespace 'guitar'
| Found more than one class "Rcpp_TreeEntry" in cache; using the first, from namespace 'guitar'
| Found more than one class "Rcpp_Blob" in cache; using the first, from namespace 'guitar'
| Found more than one class "Rcpp_Blob" in cache; using the first, from namespace 'guitar'
| Found more than one class "Rcpp_Tag" in cache; using the first, from namespace 'guitar'
| Found more than one class "Rcpp_Tag" in cache; using the first, from namespace 'guitar'
| * DONE (guitar)
| edd at max:~/git/guitar(master)$ 
| 
| We had the same thing in the Rcpp examples and did this:
| 
| 2015-08-26  Dirk Eddelbuettel  <edd at debian.org>
| 
|         * inst/unitTests/testRcppClass/src/rcpp_module.cpp: Renamed Module
|         'World' to 'RcppClassWorld' to avoid multiple modules with same name
|         (pull request #351, fixed issue #350)
| 
|         * inst/unitTests/testRcppClass/man/Rcpp_class_examples.Rd: Ditto
|         * inst/unitTests/testRcppClass/R/load.R: Ditto
|         * inst/unitTests/testRcppClass/NAMESPACE: Ditto
|         * inst/unitTests/runit.Module.client.package.R: Re-enable test
| 
|         * inst/unitTests/testRcppModule/src/rcpp_module.cpp: Renamed Module
|         'World' to 'RcppModuleWorld' to avoid multiple modules with same name
| 
|         * inst/unitTests/cpp/modref.cpp: Rename 'World' to 'ModRefWorld'
|         * inst/unitTests/runit.modref.R (test.modRef): Ditto
| 
|         * inst/unitTests/cpp/Module.cpp: Rename 'World' to 'ModuleWorld'
|         * inst/unitTests/runit.Module.R (test.Module): Ditto
| 
| 2015-08-25  Kurt Hornik  <Kurt.Hornik at wu.ac.at>
| 
|         * R/loadModule.R: For now=TRUE, always set .botched to FALSE which
|         corresponds to the case of the methods package being in the search path
|         * inst/include/Rcpp/Reference.h: Call call with the internal Namespace
| 
| 
| Something was changed (by MMae as I recall) in that period that affects the
| name lookup and you simply cannot more than one reference to the same name.
| I have not yet looked into guitar -- it may just be that its build is weird
| and symbols appear multiple times.
| 
| But "someone" needs to disentangle this.

It used some guerilla code that "knew better than we did" for loading; all
that stuff changed way back when in 2012 (?) or so -- during Rcpp 0.9.*.

This was simply stale code.  With a simple change, it now passes R CMD check,
for a suitable definition of 'passes'.

I'll send you a pull request in a minute or two.

Dirk

-- 
http://dirk.eddelbuettel.com | @eddelbuettel | edd at debian.org


More information about the Rcpp-devel mailing list