Hello I have a Package called Pack with an Rcpp module Foo, which is a C++ class implemented using Rcpp module. When R CMD CHECKing the package, I repeatedly get the error: Error: .onLoad failed in loadNamespace() for 'GUTS', details: call: value[[3L]](cond) error: failed to load module mod_guts from package GUTS Execution halted A namespace must be able to be loaded with just the base namespace loaded: otherwise if the namespace gets loaded by a saved object, the session will be unable to start. However, the package loads and works fine after installing, so I am confused about this error. What am I doing wrong, and how to circumvent? Thanks *S*
[Rcpp-devel] namespace error
7 messages · Dirk Eddelbuettel, Laurent Gatto, soeren.vogel at uzh.ch +1 more
On 2 June 2011 at 18:37, soeren.vogel at uzh.ch wrote:
| Hello | | I have a Package called Pack with an Rcpp module Foo, which is a C++ class implemented using Rcpp module. When R CMD CHECKing the package, I repeatedly get the error: | | Error: .onLoad failed in loadNamespace() for 'GUTS', details: | call: value[[3L]](cond) | error: failed to load module mod_guts from package GUTS | Execution halted | A namespace must be able to be loaded with just the base namespace | loaded: otherwise if the namespace gets loaded by a saved object, the | session will be unable to start. | | However, the package loads and works fine after installing, so I am confused about this error. What am I doing wrong, and how to circumvent? Please see the last five or ten days of the list archive. This was discussed in at least two previous threads. Dirk
Gauss once played himself in a zero-sum game and won $50.
-- #11 at http://www.gaussfacts.com
On 02.06.2011, at 18:50, Dirk Eddelbuettel wrote:
On 2 June 2011 at 18:37, soeren.vogel at uzh.ch wrote: When R CMD CHECKing the package, I repeatedly get the error: | | Error: .onLoad failed in loadNamespace() for 'GUTS', details: | call: value[[3L]](cond) | error: failed to load module mod_guts from package GUTS | Execution halted | A namespace must be able to be loaded with just the base namespace | loaded: otherwise if the namespace gets loaded by a saved object, the | session will be unable to start. | | However, the package loads and works fine after installing, so I am confused about this error. What am I doing wrong, and how to circumvent? Please see the last five or ten days of the list archive. This was discussed in at least two previous threads.
According to these discussions there is no way to circumvent this error, right? *S*
Dear Soeren,
On 2 June 2011 20:39, <soeren.vogel at uzh.ch> wrote:
On 02.06.2011, at 18:50, Dirk Eddelbuettel wrote:
On 2 June 2011 at 18:37, soeren.vogel at uzh.ch wrote: When R CMD CHECKing the package, I repeatedly get the error: | | Error: .onLoad failed in loadNamespace() for 'GUTS', details: | ? call: value[[3L]](cond) | ? error: failed to load module mod_guts from package GUTS | Execution halted | A namespace must be able to be loaded with just the base namespace | loaded: otherwise if the namespace gets loaded by a saved object, the | session will be unable to start. | | However, the package loads and works fine after installing, so I am confused about this error. What am I doing wrong, and how to circumvent? Please see the last five or ten days of the list archive. ?This was discussed in at least two previous threads.
According to these discussions there is no way to circumvent this error, right? *S*
You have good chances to get rid of it using the latest svn version of Rccp: svn checkout svn://svn.r-forge.r-project.org/svnroot/rcpp cd rcpp/pkg R CMD INSTALL Rcpp Hope this helps, Laurent _______________________________________________
Rcpp-devel mailing list Rcpp-devel at lists.r-forge.r-project.org https://lists.r-forge.r-project.org/cgi-bin/mailman/listinfo/rcpp-devel
1 day later
On 02.06.2011, at 22:51, Laurent Gatto wrote:
On 2 June 2011 20:39, <soeren.vogel at uzh.ch> wrote:
On 02.06.2011, at 18:50, Dirk Eddelbuettel wrote:
On 2 June 2011 at 18:37, soeren.vogel at uzh.ch wrote: When R CMD CHECKing the package, I repeatedly get the error: | | Error: .onLoad failed in loadNamespace() for 'GUTS', details: | call: value[[3L]](cond) | error: failed to load module mod_guts from package GUTS | Execution halted | A namespace must be able to be loaded with just the base namespace | loaded: otherwise if the namespace gets loaded by a saved object, the | session will be unable to start.
You have good chances to get rid of it using the latest svn version of Rccp:
Thanks for the advice. Unfortunately, it doesn't work. I've downloaded and installed the latest version, made an Rcpp.package.skeleton("Foo", module=TRUE), and run R CMD CHECK Foo, resulting on a slightly different but still persistent warning:
** checking whether the name space can be loaded with stated dependencies ... WARNING
Error: .onLoad failed in loadNamespace() for 'Foo', details:
call: value[[3L]](cond)
error: failed to load module yada from package Foo
could not find function "getClass"
Execution halted
A namespace must be able to be loaded with just the base namespace
loaded: otherwise if the namespace gets loaded by a saved object, the
session will be unable to start.
Probably some imports need to be declared in the NAMESPACE file.
However, the package works and I think a solution is not urgent.
*S*
1 day later
Le 04/06/11 14:53, soeren.vogel at uzh.ch a ?crit :
On 02.06.2011, at 22:51, Laurent Gatto wrote:
On 2 June 2011 20:39,<soeren.vogel at uzh.ch> wrote:
On 02.06.2011, at 18:50, Dirk Eddelbuettel wrote:
On 2 June 2011 at 18:37, soeren.vogel at uzh.ch wrote: When R CMD CHECKing the package, I repeatedly get the error: | | Error: .onLoad failed in loadNamespace() for 'GUTS', details: | call: value[[3L]](cond) | error: failed to load module mod_guts from package GUTS | Execution halted | A namespace must be able to be loaded with just the base namespace | loaded: otherwise if the namespace gets loaded by a saved object, the | session will be unable to start.
You have good chances to get rid of it using the latest svn version of Rccp:
Thanks for the advice. Unfortunately, it doesn't work. I've downloaded and installed the latest version, made an Rcpp.package.skeleton("Foo", module=TRUE), and run R CMD CHECK Foo, resulting on a slightly different but still persistent warning:
** checking whether the name space can be loaded with stated dependencies ... WARNING
Error: .onLoad failed in loadNamespace() for 'Foo', details:
call: value[[3L]](cond)
error: failed to load module yada from package Foo
could not find function "getClass"
Execution halted
A namespace must be able to be loaded with just the base namespace
loaded: otherwise if the namespace gets loaded by a saved object, the
session will be unable to start.
Probably some imports need to be declared in the NAMESPACE file.
However, the package works and I think a solution is not urgent.
*S*
Do you get this warning if you add this line in the NAMESPACE file of the generated package: import(methods) Romain
Romain Francois Professional R Enthusiast +33(0) 6 28 91 30 30 http://romainfrancois.blog.free.fr http://romain-francois.com |- http://bit.ly/kaSV6U : Stand up set at Up The Creek |- http://bit.ly/hdKhCy : Rcpp article in JSS `- http://bit.ly/elZJRJ : Montpellier Comedie Club - Avril 2011
On 06.06.2011, at 14:03, Romain Francois wrote: Le 04/06/11 14:53, soeren.vogel at uzh.ch a ?crit :
On 02.06.2011, at 22:51, Laurent Gatto wrote:
On 2 June 2011 20:39,<soeren.vogel at uzh.ch> wrote:
On 02.06.2011, at 18:50, Dirk Eddelbuettel wrote:
On 2 June 2011 at 18:37, soeren.vogel at uzh.ch wrote: When R CMD CHECKing the package, I repeatedly get the error: | | Error: .onLoad failed in loadNamespace() for 'GUTS', details: | call: value[[3L]](cond) | error: failed to load module mod_guts from package GUTS | Execution halted | A namespace must be able to be loaded with just the base namespace | loaded: otherwise if the namespace gets loaded by a saved object, the | session will be unable to start.
You have good chances to get rid of it using the latest svn version of Rccp:
Thanks for the advice. Unfortunately, it doesn't work. I've downloaded and installed the latest version, made an Rcpp.package.skeleton("Foo", module=TRUE), and run R CMD CHECK Foo, resulting on a slightly different but still persistent warning:
** checking whether the name space can be loaded with stated dependencies ... WARNING
Error: .onLoad failed in loadNamespace() for 'Foo', details:
call: value[[3L]](cond)
error: failed to load module yada from package Foo
could not find function "getClass"
Execution halted
A namespace must be able to be loaded with just the base namespace
loaded: otherwise if the namespace gets loaded by a saved object, the
session will be unable to start.
Probably some imports need to be declared in the NAMESPACE file.
However, the package works and I think a solution is not urgent.
*S*
Do you get this warning if you add this line in the NAMESPACE file of the generated package: import(methods)
In R:
R: library("Rcpp")
R: Rcpp.package.skeleton("Foo", module=TRUE)
Then edit file NAMESPACE to
useDynLib(Foo)
exportPattern("^[[:alpha:]]+")
import(Rcpp)
import(methods)
Then back on Terminal:
R CMD CHECK Foo ... reveals:
Error: .onLoad failed in loadNamespace() for 'Foo', details:
call: value[[3L]](cond)
error: failed to load module yada from package Foo
could not find function "getClass"
Execution halted
R: sessionInfo()
R version 2.13.0 (2011-04-13)
Platform: i386-apple-darwin9.8.0/i386 (32-bit)
locale:
[1] en_US.UTF-8/en_US.UTF-8/C/C/en_US.UTF-8/en_US.UTF-8
attached base packages:
[1] stats graphics grDevices utils datasets methods base
other attached packages:
[1] Rcpp_0.9.4.2
loaded via a namespace (and not attached):
[1] tools_2.13.0