[Rcpp-devel] Bug: compileAttributes incorrectly handles Rcpp::export-ed functions with multiple arguments
Davor Cubranic
cubranic at stat.ubc.ca
Sat Jan 18 05:53:20 CET 2014
On Jan 17, 2014, at 4:18 PM, Dirk Eddelbuettel <edd at debian.org> wrote:
> | What do you mean by this? Like I said, I changed the .cpp file and re-run
> | compileAttributes. What I uploaded is the result afterwards.
>
> The equivalent of
>
> $ cd myPackage; R -e 'Rcpp::compileAttributes(".”)'
That’s what I meant when I said: “I re-run compileAttributes”.
> | I fixed it and rerun compileAttributes. Still the same problem. New version of the package is attached.
>
> See here, based on your previous file.
Dirk, I think we’re talking past each other. Can you please try the following steps exactly:
1. untag the myPackage-0.1-1.tar.gz that I attached in my previous message
2. cd myPackage
3. rm src/RcppExport.c R/RcppExport.c
4. Rscript -e ‘Rcpp::compileAttributes()’
5. check whether duplicate definitions of “rcpp_hello_world” appear in the generated RcppExport files. I get what’s in the attached 0.1-1 tar file: one copy of rcpp_hello_world with no parameters and one with a single parameter “foo”.
Davor
>
> edd at max:/tmp/davor/myPackage$ cat src/rcpp_hello_world.cpp
>
> #include <Rcpp.h>
> using namespace Rcpp;
>
> // [[Rcpp::export]]
> List rcpp_hello_world(NumericVector z) {
>
> CharacterVector x = CharacterVector::create( "foo", "bar" ) ;
> NumericVector y = NumericVector::create( 0.0, 1.0 ) ;
> List z2 = List::create( x, y ) ;
>
> return z2 ;
> }
> edd at max:/tmp/davor/myPackage$ R CMD check .
> * using log directory ‘/tmp/davor/myPackage/..Rcheck’
> * using R version 3.0.2 (2013-09-25)
> * using platform: x86_64-pc-linux-gnu (64-bit)
> * using session charset: UTF-8
> * checking for file ‘./DESCRIPTION’ ... OK
> * checking extension type ... Package
> * this is package ‘myPackage’ 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 for hidden files and directories ... NOTE
> Found the following hidden files and directories:
> ..Rcheck
> These were most likely included in error. See section ‘Package structure’ in the ‘Writing R Extensions’ manual.
> * checking for portable file names ... OK
> * checking for sufficient/correct file permissions ... OK
> * checking whether package ‘myPackage’ can be installed ... WARNING
> Found the following significant warnings:
> Warning: /tmp/davor/myPackage/man/myPackage-package.Rd:31: All text must be in a section
> Warning: /tmp/davor/myPackage/man/myPackage-package.Rd:32: All text must be in a section
> See ‘/tmp/davor/myPackage/..Rcheck/00install.out’ for details.
> * checking installed package size ... OK
> * checking package directory ... OK
> * checking DESCRIPTION meta-information ... WARNING
> Non-standard license specification:
> What Licence is it under ?
> Standardizable: FALSE
> * checking top-level files ... OK
> * checking for left-over files ... OK
> * checking index information ... OK
> * checking package subdirectories ... WARNING
> Found the following directory with the name of a check directory:
> ./..Rcheck
> Most likely, these were included erroneously.
> * 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 loading without being on the library search path ... OK
> * checking 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 ... OK
> * checking Rd files ... WARNING
> prepare_Rd: myPackage-package.Rd:31: All text must be in a section
> prepare_Rd: myPackage-package.Rd:32: All text must be in a section
> prepare_Rd: myPackage-package.Rd:38-40: Dropping empty section \examples
> * checking Rd metadata ... OK
> * checking Rd cross-references ... WARNING
> Unknown package ‘<pkg>’ in Rd xrefs
> * checking for missing documentation entries ... OK
> * checking for code/documentation mismatches ... WARNING
> Codoc mismatches from documentation object 'rcpp_hello_world':
> rcpp_hello_world
> Code: function(z)
> Docs: function()
> Argument names in code not in docs:
> z
>
> * 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 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 6 warnings.
> NOTE: There was 1 note.
> See
> ‘/tmp/davor/myPackage/..Rcheck/00check.log’
> for details.
>
> edd at max:/tmp/davor/myPackage$
>
>
> Hope this help, Dirk
>
> --
> Dirk Eddelbuettel | edd at debian.org | http://dirk.eddelbuettel.com
More information about the Rcpp-devel
mailing list