PredictiveEcology / BiomeBGCR

Package for running Biome-BGC models in R
2 stars 0 forks source link

R CMD check WARNINGS #5

Open achubaty opened 3 years ago

achubaty commented 3 years ago

devtools::check() shows the following WARNINGs, which need to be fixed:

> checking DESCRIPTION meta-information ... WARNING
  Non-standard license specification:
    NA
  Standardizable: FALSE

> checking compilation flags in Makevars ... WARNING
  Non-portable flags in variable 'PKG_CFLAGS':
    -Wall -fPIC
  Non-portable flags in variable 'PKG_CXXFLAGS':
    -Wall -fPIC

> checking for GNU extensions in Makefiles ... WARNING
  Found the following file(s) containing GNU extensions:
    src/Makevars
  Portable Makefiles do not use GNU extensions such as +=, :=, $(shell),
  $(wildcard), ifeq ... endif, .NOTPARALLEL See section ‘Writing portable
  packages’ in the ‘Writing R Extensions’ manual.

> checking compiled code ... WARNING
  File ‘BiomeBGCR/libs/BiomeBGCR.so’:
    Found ‘exit’, possibly from ‘exit’ (C)
      Object: ‘Biome-BGC/src/pointbgc/pointbgc.o’

  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.

  See ‘Writing portable packages’ in the ‘Writing R Extensions’ manual.
achubaty commented 3 years ago

The first warning is due to not having approriate LICENSE defined (we will confirm this with the original code authors later).

@jflavoie33 I'll need your help to deal with the other 3 warnings.

See Writing R Extensions manual.

jflavoie33 commented 3 years ago

Fixed all warnings as per commit 0ad09ecd516c284b197c3433d7b7bee87b4d7335 except the following :

checking DESCRIPTION meta-information ... WARNING Non-standard license specification: NA Standardizable: FALSE

checking compiled code ... WARNING File ‘BiomeBGCR/libs/BiomeBGCR.so’: Found ‘abort’, possibly from ‘abort’ (C) Objects: ‘rcpp_bgc_api.o’, ‘RcppExports.o’

Will try to fix the abort() related warning again as soon as other ideas pop.

jflavoie33 commented 3 years ago

All warnings except the license-related one are now fixed in commit a67a00bfa053fa3e0286f9b1d370eeee985d2574.

There is still a note about input file sizes though.

Edit : The warning related to the abort() call is still present on linux, but not on Windows checks.

achubaty commented 9 months ago

new warning running checks on R 4.3.2:

W  checking compiled code ...
   File ‘BiomeBGCR/libs/BiomeBGCR.so’:
     Found ‘sprintf’, possibly from ‘sprintf’ (C)
       Object: ‘Biome-BGC/src/bgclib/prephenology.o’

   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 nor [v]sprintf.

   See ‘Writing portable packages’ in the ‘Writing R Extensions’ manual.