[Rcpp-devel] R CMD check error for sample package with module
Dirk Eddelbuettel
edd at debian.org
Tue Dec 20 21:13:08 CET 2011
Hi again,
On 20 December 2011 at 14:47, Yasir Suhail wrote:
| Resending, because it didn't get on the list the last time:
Were you by chance not yet subscribed? Themn it does in fact vanish...
| > I know there was a discussion earlier about R CMD check warnings, but I
| > thought that a patch had fixed it. However, I am getting similar warnings
| > and an error terminates R CMD check due to some Rd/latex issues.
| >
| > In R:
| >> library(Rcpp)
| >> Rcpp.package.skeleton("foo",module=T)
| > Creating directories ...
| > Creating DESCRIPTION ...
| > Creating NAMESPACE ...
| > Creating Read-and-delete-me ...
| > Saving functions and data ...
| > Making help files ...
| > Done.
| > Further steps are described in './foo/Read-and-delete-me'.
| >
| > Adding Rcpp settings
| > >> added RcppModules: yada
| > >> added Depends: Rcpp
| > >> added LinkingTo: Rcpp
| > >> added useDynLib directive to NAMESPACE
| > >> added Makevars file with Rcpp settings
| > >> added Makevars.win file with Rcpp settings
| > >> added example header file using Rcpp classes
| > >> added example src file using Rcpp classes
| > >> added example R file calling the C++ example
| > >> added Rd file for rcpp_hello_world
| > >> copied the example module
| >> q()
| > Save workspace image? [y/n/c]: y
| >
| > Then on the command prompt:
| > $ R CMD check foo
| > * using log directory ‘/private/tmp/foo.Rcheck’
| > * using R version 2.14.0 (2011-10-31)
| > * using platform: x86_64-apple-darwin11.0.0 (64-bit)
| > * using session charset: UTF-8
| > * checking for file ‘foo/DESCRIPTION’ ... OK
| > * checking extension type ... Package
| > * this is package ‘foo’ version ‘1.0’
| > * checking package namespace information ... OK
| > * checking package dependencies ... OK
| > * checking if this is a source package ... OK
| > * checking if there is a namespace ... OK
| > * checking for executable files ... OK
| > * checking whether package ‘foo’ can be installed ... WARNING
| > Found the following significant warnings:
| > Warning: /private/tmp/foo/man/foo-package.Rd:31: All text must be in a
| > section
| > Warning: /private/tmp/foo/man/foo-package.Rd:32: All text must be in a
| > section
I noticed those too the other day but haven't had a chance to check.
At a first step, you you just prune or fix these sections. It's just a
warning.
| > See ‘/private/tmp/foo.Rcheck/00install.out’ for details.
| > * checking installed package size ... OK
| > * checking package directory ... OK
| > * checking for portable file names ... OK
| > * checking for sufficient/correct file permissions ... OK
| > * checking DESCRIPTION meta-information ... WARNING
| > Non-standard license specification:
| > What Licence is it under ?
| > Standardizable: FALSE
Information is missing; you can put your license there.
| > * checking top-level files ... OK
| > * checking index information ... OK
| > * checking package subdirectories ... OK
| > * checking R files for non-ASCII characters ... OK
| > * checking R files for syntax errors ... OK
| > * checking whether the package can be loaded ... OK
| > * checking whether the package can be loaded with stated dependencies ... OK
| > * checking whether the package can be unloaded cleanly ... OK
| > * checking whether the namespace can be loaded with stated dependencies ...
| > OK
| > * checking whether the namespace can be unloaded cleanly ... OK
| > * checking for unstated dependencies in R code ... OK
| > * checking S3 generic/method consistency ... OK
| > * checking replacement functions ... OK
| > * checking foreign function calls ... OK
| > * checking R code for possible problems ... NOTE
| > File ‘foo/R/zzz.R’:
| > .onLoad has wrong argument list ‘pkgname, libname’
| > .onLoad calls:
| > require("methods", character = TRUE, quietly = TRUE)
| >
| > Package startup functions should have two arguments with names starting
| > with ‘lib’ and ‘pkg’, respectively.
| > Package startup functions should not change the search path.
| > See section ‘Good practice’ in ?.onAttach.
You'd need to fix that too.
| > * checking Rd files ... WARNING
| > prepare_Rd: foo-package.Rd:31: All text must be in a section
| > prepare_Rd: foo-package.Rd:32: All text must be in a section
| > prepare_Rd: foo-package.Rd:38-40: Dropping empty section \examples
| > * checking Rd metadata ... OK
| > * checking Rd cross-references ... WARNING
| > Unknown package(s) ‘<pkg>’ in Rd xrefs
| > * checking for missing documentation entries ... WARNING
| > Undocumented code objects:
| > ‘World’ ‘bar’ ‘bla’ ‘bla1’ ‘bla2’ ‘hello’
| > All user-level objects in a package should have documentation entries.
| > See the chapter ‘Writing R documentation files’ in the ‘Writing R
| > Extensions’ manual.
It seems you need to do some editing here.
| > * checking for code/documentation mismatches ... OK
| > * checking Rd \usage sections ... OK
| > * checking Rd contents ... OK
| > * checking for unstated dependencies in examples ... OK
| > * checking line endings in C/C++/Fortran sources/headers ... OK
| > * checking line endings in Makefiles ... OK
| > * checking for portable compilation flags in Makevars ... OK
| > * checking for portable use of $(BLAS_LIBS) and $(LAPACK_LIBS) ... OK
| > * checking compiled code ... OK
| > * checking examples ... OK
| > * checking PDF version of manual ... WARNING
| > LaTeX errors when creating PDF version.
| > This typically indicates Rd problems.
| > LaTeX errors found:
| > * checking PDF version of manual without hyperrefs or index ... ERROR
Ok, here you have a __Latex level error__ and you need to check why latex
failed. I just redid what you did, and it works fine on my system (but with
a handful of similar warnings):
edd at max:/tmp/Rcpp-module-pkg$ r -lRcpp -e'Rcpp.package.skeleton("mytest", module=TRUE)'
Attaching package: ‘utils’
The following object(s) are masked from ‘package:Rcpp’:
.DollarNames, prompt
Creating directories ...
Creating DESCRIPTION ...
Creating NAMESPACE ...
Creating Read-and-delete-me ...
Saving functions and data ...
Making help files ...
Done.
Further steps are described in './mytest/Read-and-delete-me'.
Adding Rcpp settings
>> added RcppModules: yada
>> added Depends: Rcpp
>> added LinkingTo: Rcpp
>> added useDynLib directive to NAMESPACE
>> added Makevars file with Rcpp settings
>> added Makevars.win file with Rcpp settings
>> added example header file using Rcpp classes
>> added example src file using Rcpp classes
>> added example R file calling the C++ example
>> added Rd file for rcpp_hello_world
>> copied the example module
edd at max:/tmp/Rcpp-module-pkg$ ls
mytest
edd at max:/tmp/Rcpp-module-pkg$ R CMD build mytest
* checking for file ‘mytest/DESCRIPTION’ ... OK
* preparing ‘mytest’:
* checking DESCRIPTION meta-information ... OK
* cleaning src
* checking for LF line-endings in source and make files
* checking for empty or unneeded directories
* building ‘mytest_1.0.tar.gz’
edd at max:/tmp/Rcpp-module-pkg$ R CMD check mytest_1.0.tar.gz
* using log directory ‘/tmp/Rcpp-module-pkg/mytest.Rcheck’
* using R version 2.14.0 (2011-10-31)
* using platform: x86_64-pc-linux-gnu (64-bit)
* using session charset: UTF-8
* checking for file ‘mytest/DESCRIPTION’ ... OK
* checking extension type ... Package
* this is package ‘mytest’ version ‘1.0’
* checking package namespace information ... OK
* checking package dependencies ... OK
* checking if this is a source package ... OK
* checking if there is a namespace ... OK
* checking for executable files ... OK
* checking whether package ‘mytest’ can be installed ... WARNING
Found the following significant warnings:
Warning: /tmp/Rcpp-module-pkg/mytest.Rcheck/00_pkg_src/mytest/man/mytest-package.Rd:31: All text must be in a section
Warning: /tmp/Rcpp-module-pkg/mytest.Rcheck/00_pkg_src/mytest/man/mytest-package.Rd:32: All text must be in a section
See ‘/tmp/Rcpp-module-pkg/mytest.Rcheck/00install.out’ for details.
* checking installed package size ... OK
* checking package directory ... OK
* checking for portable file names ... OK
* checking for sufficient/correct file permissions ... OK
* checking DESCRIPTION meta-information ... WARNING
Non-standard license specification:
What Licence is it under ?
Standardizable: FALSE
* checking top-level files ... OK
* checking index information ... OK
* checking package subdirectories ... OK
* checking R files for non-ASCII characters ... OK
* checking R files for syntax errors ... OK
* checking whether the package can be loaded ... OK
* checking whether the package can be loaded with stated dependencies ... OK
* checking whether the package can be unloaded cleanly ... OK
* checking whether the namespace can be loaded with stated dependencies ... OK
* checking whether the namespace can be unloaded cleanly ... OK
* checking for unstated dependencies in R code ... OK
* checking S3 generic/method consistency ... OK
* checking replacement functions ... OK
* checking foreign function calls ... OK
* checking R code for possible problems ... NOTE
File ‘mytest/R/zzz.R’:
.onLoad has wrong argument list ‘pkgname, libname’
.onLoad calls:
require("methods", character = TRUE, quietly = TRUE)
Package startup functions should have two arguments with names starting
with ‘lib’ and ‘pkg’, respectively.
Package startup functions should not change the search path.
See section ‘Good practice’ in ?.onAttach.
* checking Rd files ... WARNING
prepare_Rd: mytest-package.Rd:31: All text must be in a section
prepare_Rd: mytest-package.Rd:32: All text must be in a section
prepare_Rd: mytest-package.Rd:38-40: Dropping empty section \examples
* checking Rd metadata ... OK
* checking Rd cross-references ... WARNING
Unknown package(s) ‘<pkg>’ in Rd xrefs
* checking for missing documentation entries ... WARNING
Undocumented code objects:
‘World’ ‘bar’ ‘bla’ ‘bla1’ ‘bla2’ ‘foo’ ‘hello’
All user-level objects in a package should have documentation entries.
See the chapter ‘Writing R documentation files’ in the ‘Writing R Extensions’ manual.
* checking for code/documentation mismatches ... OK
* checking Rd \usage sections ... OK
* checking Rd contents ... OK
* checking for unstated dependencies in examples ... OK
* checking line endings in C/C++/Fortran sources/headers ... OK
* checking line endings in Makefiles ... OK
* checking for portable compilation flags in Makevars ... OK
* checking for portable use of $(BLAS_LIBS) and $(LAPACK_LIBS) ... OK
* checking compiled code ... OK
* checking examples ... OK
* checking PDF version of manual ... OK
WARNING: There were 5 warnings, see
‘/tmp/Rcpp-module-pkg/mytest.Rcheck/00check.log’
for details
edd at max:/tmp/Rcpp-module-pkg$
That was with vanilla Rcpp 0.9.7 as releases, on a standard Ubuntu 11.10
system.
Hope this helps -- if you're lost, send me the latex log off-list and I'll
try to help.
Cheers, Dirk
--
"Outside of a dog, a book is a man's best friend. Inside of a dog, it is too
dark to read." -- Groucho Marx
More information about the Rcpp-devel
mailing list