12

我正在使用 Windows 并且刚刚更新到R 4.0.3(使用RStudioto 1.3.959)并R检查了我使用的一个包,Rcpp并且RcppArmadillo我得到了以下注意事项:

> checking compiled code ... NOTE
  Note: information on .o files for i386 is not available
  Note: information on .o files for x64 is not available
  File 'C:/Users/NIR_Workstation/Documents/GitHub/prospectr.Rcheck/prospectr/libs/i386/prospectr.dll':
    Found 'abort', possibly from 'abort' (C), 'runtime' (Fortran)
    Found 'exit', possibly from 'exit' (C), 'stop' (Fortran)
    Found 'printf', possibly from 'printf' (C)
  File 'C:/Users/NIR_Workstation/Documents/GitHub/prospectr.Rcheck/prospectr/libs/x64/prospectr.dll':
    Found 'abort', possibly from 'abort' (C), 'runtime' (Fortran)
    Found 'exit', possibly from 'exit' (C), 'stop' (Fortran)
    Found 'printf', possibly from 'printf' (C)

当我在R 4.0.2. 我试图找出我的包裹里发生了什么,但没有成功。

我也试过这个(用R 4.0.3):

Rcpp::Rcpp.package.skeleton("aTest", example_code = TRUE)

rcmdcheck::rcmdcheck(error_on = "warning", check_dir = "check")

我得到了与我的包的一个输出相同类型的 NOTE。同样,R 4.0.2此 NOTE 不输出。

关于这个注意的任何想法?或者至少对我可以尝试找出发生了什么事情的任何建议?

提前致谢。


更新的问题

我想在更新我的问题之前进行额外的测试。

他们来了:

R 4.0.3我在其他几台 Windows 机器上进行了全新安装rtoolsRStudio以及devtools运行以下示例所需的包(没有预编译的对象)。我设法使用 reprex()来重现我为另一个模板包创建的注释Rcpp.package.skeleton()

mdir <- "./my_dir"
dir.create(mdir)
setwd("./my_dir")
Rcpp::Rcpp.package.skeleton("anotherTest", example_code = TRUE)
#> Creating directories ...
#> Creating DESCRIPTION ...
#> Creating NAMESPACE ...
#> Creating Read-and-delete-me ...
#> Saving functions and data ...
#> Making help files ...
#> Done.
#> Further steps are described in './anotherTest/Read-and-delete-me'.
#> 
#> Adding Rcpp settings
#>  >> added Imports: Rcpp
#>  >> added LinkingTo: Rcpp
#>  >> added useDynLib directive to NAMESPACE
#>  >> added importFrom(Rcpp, evalCpp) directive to NAMESPACE
#>  >> added example src file using Rcpp attributes
#>  >> added Rd file for rcpp_hello_world
#>  >> compiled Rcpp attributes
devtools::check("./anotherTest")
#> -- Building ----------------------------------------------------- anotherTest --
#> Setting env vars:
#> * CFLAGS    : -Wall -pedantic
#> * CXXFLAGS  : -Wall -pedantic
#> * CXX11FLAGS: -Wall -pedantic
#> --------------------------------------------------------------------------------
#>          checking for file 'C:\Users\raml\AppData\Local\Temp\RtmpqMz20b\reprex4cd8438440a2\my_dir\anotherTest/DESCRIPTION' ...  v  checking for file 'C:\Users\raml\AppData\Local\Temp\RtmpqMz20b\reprex4cd8438440a2\my_dir\anotherTest/DESCRIPTION' (612ms)
#>       -  preparing 'anotherTest':
#>      checking DESCRIPTION meta-information ...     checking DESCRIPTION meta-information ...   v  checking DESCRIPTION meta-information
#> -  cleaning src
#>       -  checking for LF line-endings in source and make files and shell scripts
#>       -  checking for empty or unneeded directories
#>       -  building 'anotherTest_1.0.tar.gz'
#>      
#> -- Checking ----------------------------------------------------- anotherTest --
#> Setting env vars:
#> * _R_CHECK_CRAN_INCOMING_REMOTE_: FALSE
#> * _R_CHECK_CRAN_INCOMING_       : FALSE
#> * _R_CHECK_FORCE_SUGGESTS_      : FALSE
#> * NOT_CRAN                      : true
#> -- R CMD check -----------------------------------------------------------------
#>       -  using log directory 'C:/Users/raml/AppData/Local/Temp/RtmpCM99SH/anotherTest.Rcheck' (453ms)
#> -  using R version 4.0.3 (2020-10-10)
#> -  using platform: x86_64-w64-mingw32 (64-bit)
#>   -  using session charset: ISO8859-1
#>       -  using options '--no-manual --as-cran'
#>      checking for file 'anotherTest/DESCRIPTION' ...     checking for file 'anotherTest/DESCRIPTION' ...   v  checking for file 'anotherTest/DESCRIPTION'
#> -  checking extension type ... Package
#> -  this is package 'anotherTest' version '1.0'
#>      checking package namespace information ...     checking package namespace information ...   v  checking package namespace information
#>    checking package dependencies ...     checking package dependencies ...   v  checking package dependencies (1.4s)
#>    checking if this is a source package ...  v  checking if this is a source package
#>   v  checking if there is a namespace
#>          checking for executable files ...     checking for executable files ...   v  checking for executable files (9.7s)
#>      checking for hidden files and directories ...  v  checking for hidden files and directories
#>      checking for portable file names ...     checking for portable file names ...   v  checking for portable file names
#>   v  checking serialization versions
#>      checking whether package 'anotherTest' can be installed ...     checking whether package 'anotherTest' can be installed ...   v  checking whether package 'anotherTest' can be installed (29.5s)
#>    checking installed package size ...     checking installed package size ...   v  checking installed package size
#>       v  checking package directory
#>      checking for future file timestamps ...     checking for future file timestamps ...   v  checking for future file timestamps
#>    checking DESCRIPTION meta-information ...     checking DESCRIPTION meta-information ...   v  checking DESCRIPTION meta-information (689ms)
#> v  checking top-level files
#>   v  checking for left-over files
#> v  checking index information
#>    checking package subdirectories ...     checking package subdirectories ...   v  checking package subdirectories
#>    checking R files for non-ASCII characters ...     checking R files for non-ASCII characters ...   v  checking R files for non-ASCII characters
#>    checking R files for syntax errors ...     checking R files for syntax errors ...   v  checking R files for syntax errors
#> -  loading checks for arch 'i386'
#>    checking whether the package can be loaded ...     checking whether the package can be loaded ...      ** checking whether the package can be loaded ... OK
#>    checking whether the package can be loaded with stated dependencies ...     checking whether the package can be loaded with stated dependencies ...      ** checking whether the package can be loaded with stated dependencies ... OK
#>      checking whether the package can be unloaded cleanly ...     checking whether the package can be unloaded cleanly ...      ** checking whether the package can be unloaded cleanly ... OK
#>    checking whether the namespace can be loaded with stated dependencies ...     checking whether the namespace can be loaded with stated dependencies ...      ** checking whether the namespace can be loaded with stated dependencies ... OK
#>    checking whether the namespace can be unloaded cleanly ...     checking whether the namespace can be unloaded cleanly ...      ** checking whether the namespace can be unloaded cleanly ... OK
#>      checking loading without being on the library search path ...     checking loading without being on the library search path ...      ** checking loading without being on the library search path ... OK
#> -  loading checks for arch 'x64'
#>    checking whether the package can be loaded ...     checking whether the package can be loaded ...      ** checking whether the package can be loaded ... OK
#>    checking whether the package can be loaded with stated dependencies ...     checking whether the package can be loaded with stated dependencies ...      ** checking whether the package can be loaded with stated dependencies ... OK
#>    checking whether the package can be unloaded cleanly ...     checking whether the package can be unloaded cleanly ...      ** checking whether the package can be unloaded cleanly ... OK
#>    checking whether the namespace can be loaded with stated dependencies ...     checking whether the namespace can be loaded with stated dependencies ...      ** checking whether the namespace can be loaded with stated dependencies ... OK
#>    checking whether the namespace can be unloaded cleanly ...     checking whether the namespace can be unloaded cleanly ...      ** checking whether the namespace can be unloaded cleanly ... OK
#>    checking loading without being on the library search path ...     checking loading without being on the library search path ...      ** checking loading without being on the library search path ... OK
#>    checking dependencies in R code ...     checking dependencies in R code ...   v  checking dependencies in R code (475ms)
#>    checking S3 generic/method consistency ...     checking S3 generic/method consistency ...   v  checking S3 generic/method consistency (959ms)
#>    checking replacement functions ...     checking replacement functions ...   v  checking replacement functions (568ms)
#>    checking foreign function calls ...     checking foreign function calls ...   v  checking foreign function calls (575ms)
#>    checking R code for possible problems ...     checking R code for possible problems ...   v  checking R code for possible problems (4s)
#>    checking Rd files ...     checking Rd files ...   v  checking Rd files (375ms)
#>    checking Rd metadata ...     checking Rd metadata ...   v  checking Rd metadata
#>    checking Rd line widths ...     checking Rd line widths ...   v  checking Rd line widths
#>    checking Rd cross-references ...     checking Rd cross-references ...   v  checking Rd cross-references (364ms)
#>    checking for missing documentation entries ...     checking for missing documentation entries ...   v  checking for missing documentation entries (562ms)
#>    checking for code/documentation mismatches ...     checking for code/documentation mismatches ...   v  checking for code/documentation mismatches (1.8s)
#>    checking Rd \usage sections ...     checking Rd \usage sections ...   v  checking Rd \usage sections (1.3s)
#>    checking Rd contents ...     checking Rd contents ...   v  checking Rd contents
#>    checking for unstated dependencies in examples ...     checking for unstated dependencies in examples ...   v  checking for unstated dependencies in examples
#>    checking line endings in C/C++/Fortran sources/headers ...  v  checking line endings in C/C++/Fortran sources/headers
#>          checking pragmas in C/C++ headers and code ...     checking pragmas in C/C++ headers and code ...   v  checking pragmas in C/C++ headers and code
#> v  checking compilation flags used
#>    checking compiled code ...     checking compiled code ...   N  checking compiled code (27.9s)
#>    Note: information on .o files for i386 is not available
#>    Note: information on .o files for x64 is not available
#>    File 'C:/Users/raml/AppData/Local/Temp/RtmpCM99SH/anotherTest.Rcheck/anotherTest/libs/i386/anotherTest.dll':
#>      Found 'abort', possibly from 'abort' (C), 'runtime' (Fortran)
#>      Found 'exit', possibly from 'exit' (C), 'stop' (Fortran)
#>      Found 'printf', possibly from 'printf' (C)
#>    File 'C:/Users/raml/AppData/Local/Temp/RtmpCM99SH/anotherTest.Rcheck/anotherTest/libs/x64/anotherTest.dll':
#>      Found 'abort', possibly from 'abort' (C), 'runtime' (Fortran)
#>      Found 'exit', possibly from 'exit' (C), 'stop' (Fortran)
#>      Found 'printf', possibly from 'printf' (C)
#>      
#>    Compiled code should not call entry points which might terminate R nor
#>    write to stdout/stderr instead of to the console, nor use Fortran I/O
#>    nor system RNGs. The detected symbols are linked into the code but
#>    might come from libraries and not actually be called.
#>    
#>    See 'Writing portable packages' in the 'Writing R Extensions' manual.
#>    checking examples ...  -  checking examples (360ms)
#>      running examples for arch 'i386' ...     running examples for arch 'i386' ...      ** running examples for arch 'i386' ... OK
#>      running examples for arch      running examples for arch 'x64' ...     running examples for arch 'x64' ...      ** running examples for arch 'x64' ... OK
#>       v  checking for non-standard things in the check directory
#> v  checking for detritus in the temp directory
#>      
#>    See
#>      'C:/Users/raml/AppData/Local/Temp/RtmpCM99SH/anotherTest.Rcheck/00check.log'
#>    for details.
#>    
#>      
#> 
#> -- R CMD check results ------------------------------------ anotherTest 1.0 ----
#> Duration: 1m 31.9s
#> 
#> > checking compiled code ... NOTE
#>   Note: information on .o files for i386 is not available
#>   Note: information on .o files for x64 is not available
#>   File 'C:/Users/raml/AppData/Local/Temp/RtmpCM99SH/anotherTest.Rcheck/anotherTest/libs/i386/anotherTest.dll':
#>     Found 'abort', possibly from 'abort' (C), 'runtime' (Fortran)
#>     Found 'exit', possibly from 'exit' (C), 'stop' (Fortran)
#>     Found 'printf', possibly from 'printf' (C)
#>   File 'C:/Users/raml/AppData/Local/Temp/RtmpCM99SH/anotherTest.Rcheck/anotherTest/libs/x64/anotherTest.dll':
#>     Found 'abort', possibly from 'abort' (C), 'runtime' (Fortran)
#>     Found 'exit', possibly from 'exit' (C), 'stop' (Fortran)
#>     Found 'printf', possibly from 'printf' (C)
#>   
#>   Compiled code should not call entry points which might terminate R nor
#>   write to stdout/stderr instead of to the console, nor use Fortran I/O
#>   nor system RNGs. The detected symbols are linked into the code but
#>   might come from libraries and not actually be called.
#>   
#>   See 'Writing portable packages' in the 'Writing R Extensions' manual.
#> 
#> 0 errors v | 0 warnings v | 1 note x

reprex 包于 2020-10-18 创建(v0.3.0)

devtools::session_info()
#> - Session info ---------------------------------------------------------------
#>  setting  value                       
#>  version  R version 4.0.3 (2020-10-10)
#>  os       Windows 7 x64 SP 1          
#>  system   x86_64, mingw32             
#>  ui       RTerm                       
#>  language (EN)                        
#>  collate  German_Switzerland.1252     
#>  ctype    German_Switzerland.1252     
#>  tz       Europe/Berlin               
#>  date     2020-10-18                  
#> 
#> - Packages -------------------------------------------------------------------
#>  package     * version date       lib source        
#>  assertthat    0.2.1   2019-03-21 [1] CRAN (R 4.0.3)
#>  backports     1.1.10  2020-09-15 [1] CRAN (R 4.0.3)
#>  callr         3.5.1   2020-10-13 [1] CRAN (R 4.0.3)
#>  cli           2.1.0   2020-10-12 [1] CRAN (R 4.0.3)
#>  crayon        1.3.4   2017-09-16 [1] CRAN (R 4.0.3)
#>  desc          1.2.0   2018-05-01 [1] CRAN (R 4.0.3)
#>  devtools      2.3.2   2020-09-18 [1] CRAN (R 4.0.3)
#>  digest        0.6.26  2020-10-17 [1] CRAN (R 4.0.3)
#>  ellipsis      0.3.1   2020-05-15 [1] CRAN (R 4.0.3)
#>  evaluate      0.14    2019-05-28 [1] CRAN (R 4.0.3)
#>  fansi         0.4.1   2020-01-08 [1] CRAN (R 4.0.3)
#>  fs            1.5.0   2020-07-31 [1] CRAN (R 4.0.3)
#>  glue          1.4.2   2020-08-27 [1] CRAN (R 4.0.3)
#>  highr         0.8     2019-03-20 [1] CRAN (R 4.0.3)
#>  htmltools     0.5.0   2020-06-16 [1] CRAN (R 4.0.3)
#>  knitr         1.30    2020-09-22 [1] CRAN (R 4.0.3)
#>  magrittr      1.5     2014-11-22 [1] CRAN (R 4.0.3)
#>  memoise       1.1.0   2017-04-21 [1] CRAN (R 4.0.3)
#>  pkgbuild      1.1.0   2020-07-13 [1] CRAN (R 4.0.3)
#>  pkgload       1.1.0   2020-05-29 [1] CRAN (R 4.0.3)
#>  prettyunits   1.1.1   2020-01-24 [1] CRAN (R 4.0.3)
#>  processx      3.4.4   2020-09-03 [1] CRAN (R 4.0.3)
#>  ps            1.4.0   2020-10-07 [1] CRAN (R 4.0.3)
#>  R6            2.4.1   2019-11-12 [1] CRAN (R 4.0.3)
#>  rcmdcheck     1.3.3   2019-05-07 [1] CRAN (R 4.0.3)
#>  Rcpp          1.0.5   2020-07-06 [1] CRAN (R 4.0.3)
#>  remotes       2.2.0   2020-07-21 [1] CRAN (R 4.0.3)
#>  rlang         0.4.8   2020-10-08 [1] CRAN (R 4.0.3)
#>  rmarkdown     2.4     2020-09-30 [1] CRAN (R 4.0.3)
#>  rprojroot     1.3-2   2018-01-03 [1] CRAN (R 4.0.3)
#>  rstudioapi    0.11    2020-02-07 [1] CRAN (R 4.0.3)
#>  sessioninfo   1.1.1   2018-11-05 [1] CRAN (R 4.0.3)
#>  stringi       1.5.3   2020-09-09 [1] CRAN (R 4.0.3)
#>  stringr       1.4.0   2019-02-10 [1] CRAN (R 4.0.3)
#>  testthat      2.3.2   2020-03-02 [1] CRAN (R 4.0.3)
#>  usethis       1.6.3   2020-09-17 [1] CRAN (R 4.0.3)
#>  withr         2.3.0   2020-09-22 [1] CRAN (R 4.0.3)
#>  xfun          0.18    2020-09-29 [1] CRAN (R 4.0.3)
#>  xopen         1.0.0   2018-09-17 [1] CRAN (R 4.0.3)
#>  yaml          2.2.1   2020-02-01 [1] CRAN (R 4.0.3)
#> 
#> [1] C:/Program Files/R/R-4.0.3/library

除了上述测试之外,我还运行了相同的代码:

  • R 4.0.3rtools35

  • R 4.0.2rtools40

  • R 4.0.3在 Linux ( x86_64-pc-linux-gnu (64-bit))

对于这三个测试,检查干净地通过了。

总之,问题只出现R 4.0.3with rtools40。假设问题来自于是否正确rtools40?如果是这样,对 CRAN 检查/提交有什么影响?

谢谢

4

1 回答 1

14

在过去的几个月里,我也有同样的问题。几个月前,我注意到 R-devel for Windows 存在同样的问题(误报中止等)。

该问题并非特定于 Rcpp。我可以为仅包含 Fortran、仅包含 C 或仅包含 C++ 的包复制注释。我在 Windows 命令提示符下使用 PATH 中的 Rtools40 和 R 4.0.3 运行 R CMD。注意目前出现在 Bioconductor 3.12 检查数百个包中,似乎是针对包含任何 Fortran、C 或 C++ 源代码的任何包。正如您所指出的,注释仅在 Windows、R 4.0.3 或更高版本和 Rtools40 中出现。对于 Linux 或 Mac 下的相同包或旧版本的 R,该注释不会出现。

两天前我向 CRAN 提交了一个包,但 CRAN 没有将 NOTE 识别为问题,即使我在同一包上运行 R CMD check 时看到了 NOTE。所以我认为这不会给你的 CRAN 提交带来问题。

于 2020-10-18T22:42:15.207 回答