简体   繁体   English

有关 x64 的 .o 文件的信息不可用:使用 Rcpp 检查 R 包的注意事项

[英]information on .o files for x64 is not available: NOTE on R package checks using Rcpp

I am using windows and just updated to R 4.0.3 (with RStudio to 1.3.959 ) and ran the R check for one of my packages which uses Rcpp and RcppArmadillo and I got the following NOTE:我正在使用 Windows 并且刚刚更新到R 4.0.3 (使用RStudio1.3.959 )并运行R检查我使用RcppRcppArmadillo软件包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)

This NOTE is not output when I run the checks under R 4.0.2 .当我在R 4.0.2下运行检查时,不会输出此注意事项。 I tried to find out what was going in my package on without any success.我试图找出我的包裹里发生了什么,但没有成功。

I have tried this as well (with R 4.0.3 ):我也试过这个(使用R 4.0.3 ):

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

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

and I get the same type of NOTE as the one output for my package.我得到了与我的包的一个输出相同类型的 NOTE。 Again for R 4.0.2 this NOTE is not output.同样对于R 4.0.2此注释不会输出。

Any idea about this NOTE?对这个注意事项有任何想法吗? or at least any suggestions about things I could try to find out what is going on?或者至少对我可以尝试找出发生了什么的事情有任何建议?

Thanks in advance.提前致谢。


Updated question :更新的问题

I wanted to conduct additional tests before updating my question.我想在更新我的问题之前进行额外的测试。

Here they are:他们来了:

I made a fresh install of R 4.0.3 in a couple of other windows machines along with rtools , RStudio and the devtools package which are required to run the example below (no pre-compiled objects hanging around).我在其他几台 Windows 机器上全新安装了R 4.0.3以及运行下面的示例所需的rtoolsRStudiodevtools包(没有预编译的对象)。 I managed to uses reprex() to reproduce the NOTE I got for another template package created with Rcpp.package.skeleton() :我设法使用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

Created on 2020-10-18 by the reprex package (v0.3.0)reprex 包(v0.3.0) 于 2020 年 10 月 18 日创建

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

In addition to the above tests, I ran the same code with:除了上述测试之外,我还运行了相同的代码:

  • R 4.0.3 with rtools35 R 4.0.3rtools35

  • R 4.0.2 with rtools40 R 4.0.2rtools40

  • R 4.0.3 in linux ( x86_64-pc-linux-gnu (64-bit) ) linux 中的R 4.0.3 ( x86_64-pc-linux-gnu (64-bit) )

For these three tests the checks passed cleanly.对于这三个测试,检查完全通过。

In summary, the problem only emerges with R 4.0.3 with rtools40 .总之,这个问题只出现在带有rtools40 R 4.0.3 Is it right to assume the issue comes from rtools40 ?假设问题来自rtools40是否正确? If so, what are the implications for CRAN checks/submissions?如果是,对 CRAN 检查/提交有何影响?

Thanks谢谢

I have had the same questions for the past few months.在过去的几个月里,我一直有同样的问题。 I noticed the same issue (false positive calls of abort etc) with R-devel for Windows some months ago.几个月前,我在 Windows 的 R-devel 中注意到了同样的问题(中止的误报等)。

The issue is not specific to Rcpp.该问题并非特定于 Rcpp。 I can reproduce the NOTE for packages that contain only Fortran, or only C, or only C++.我可以为仅包含 Fortran、仅包含 C 或仅包含 C++ 的包重现注释。 I run R CMD at the Windows command prompt with Rtools40 and R 4.0.3 in the PATH.我在 Windows 命令提示符下使用 Rtools40 和 R 4.0.3 在 PATH 中运行 R CMD。 The NOTE is currently appearing in the Bioconductor 3.12 checks for hundreds of packages, seemingly for any package that contains any Fortran, C or C++ source code. NOTE 目前出现在 Bioconductor 3.12 检查数百个包中,似乎是包含任何 Fortran、C 或 C++ 源代码的任何包。 As you have noted, the NOTE appears only with Windows, R 4.0.3 or higher and Rtools40.正如您所指出的,NOTE 仅在 Windows、R 4.0.3 或更高版本和 Rtools40 中出现。 The NOTE does not appear for the same packages under Linux or Mac or for older versions of R.对于 Linux 或 Mac 下的相同软件包或旧版本的 R,不会出现 NOTE 。

I submitted a package to CRAN two days ago and CRAN did not identify the NOTE as a problem, even though I see the NOTE when I run R CMD check on the same package.两天前我向 CRAN 提交了一个包,但 CRAN 没有将 NOTE 识别为问题,即使我在同一个包上运行 R CMD 检查时看到了 NOTE。 So I don't think it will cause you problems with a CRAN submission.所以我不认为它会导致你提交 CRAN 的问题。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM