Warnings in package building

Good day everyone,

I am building my pacakge with rstantools, and everything is ok but, when I do a full check I got this warning:

> checking compilation flags used ... WARNING
Compilation used the following non-portable flag(s):
    '-Wno-deprecated-declarations' '-Wno-ignored-attributes'
  including flag(s) suppressing warnings

I don’t know how to fix this warning, I am using R4.0.0 rstantools2.0.0 and rstan2.19.3


1 Like

Those don’t really matter (since they won’t happen on CRAN) but you could delete the -Wno-* things from the CXX14FLAGS in ~/.R/Makevars .

1 Like

Thanks! It works

Hi @bgoodri , I need to bother you again, when I check my package I have this note:

checking compiled code … NOTE
Note: information on .o files for x64 is not available
File ‘C:/Users/asael/Documents/bayesforecast.Rcheck/bayesforecast/libs/x64/bayesforecast.dll’:
Found ‘abort’, possibly from ‘abort’ ©, ‘runtime’ (Fortran)
Found ‘exit’, possibly from ‘exit’ ©, ‘stop’ (Fortran)
Found ‘printf’, possibly from ‘printf’ ©
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.

The package is build using rstantools, but can this note be ignored?

Thank you!

These notes sound like they would prevent you from putting your package on CRAN. If you are not planning to do that, then it’s possibly ok, but you may cause issues to the user session (I don’t know if that’s really the case, but I would play it safe).

Have you tried to reach those code paths and see what happens?

Really? Well the idea is to putting it on cran!

I dont know what they are! I just use rstantools functions for package building

Are you using any custom fortran code in your package? My answer assumed you did, but if you don’t perhaps it’s some spurious note that you can’t possibly fix anyway.

Yeah I didnt use it. Then lets see what happens!

Thanks for your reply