Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

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:

> 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. 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):

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. Again for R 4.0.2 this NOTE is not output.

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). I managed to uses reprex() to reproduce the NOTE I got for another template package created with 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)

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.2 with rtools40

  • R 4.0.3 in linux (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. Is it right to assume the issue comes from rtools40? If so, what are the implications for CRAN checks/submissions?

Thanks

like image 824
Leonardo Ramirez-Lopez Avatar asked Oct 17 '20 12:10

Leonardo Ramirez-Lopez


1 Answers

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.

The issue is not specific to Rcpp. I can reproduce the NOTE for packages that contain only Fortran, or only C, or only C++. I run R CMD at the Windows command prompt with Rtools40 and R 4.0.3 in the PATH. 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. As you have noted, the NOTE appears only with Windows, R 4.0.3 or higher and Rtools40. The NOTE does not appear for the same packages under Linux or Mac or for older versions of R.

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. So I don't think it will cause you problems with a CRAN submission.

Update 30 March 2022

The issue was still present in R 4.1.3 and Rtools40v2, but is now gone in R 4.2.0alpha for Windows and Rtools42.

like image 55
Gordon Smyth Avatar answered Oct 17 '22 14:10

Gordon Smyth