I am trying to submit my first package to CRAN
and on my machine, I am getting the following warning on running R CMD check
(via RStudio
)
checking compilation flags used ... WARNING
Compilation used the following non-portable flag(s):
‘-Wno-unused-function’ ‘-Wno-unused-variable’
including flag(s) suppressing warnings
R CMD check results
0 errors | 1 warning | 0 notes
R CMD check succeeded
I don't get this warning on building my package on R
win-builder. I do get a NOTE
from the win-builder service, but I think this is due to the fact that this is the first submission and there are spellings that CRAN
does not recognize, i.e.,
* checking CRAN incoming feasibility ... NOTE
New submission
Possibly mis-spelled words in DESCRIPTION:
CVODE (8:167)
CVODES (8:219)
Livermore (8:108)
I am not so worried about the first submission and the mis-spelled words note as I can explain them in the comments (and in cran-comments.md
file). But is there a way to remove the warnings I get on my system (macOS
, R = 3.5.0
). The package builds fine on travis-ci
and appveyor
.
Also, is the package ready for submission with the 1 warning, I know that Hadley's book mentions that we must try to remove ALL errors, warnings and notes before submission.
I just found out about r-hub
, the package builds fine on it
Build ID: sundialr_0.1.0.tar.gz-aa50507b5a2a8b57b091643fa3e7aae2
Platform: Debian Linux, R-devel, GCC
Submitted: 3 minutes 36.3 seconds ago
Build time: 3 minutes 32.1 seconds
The package code can be found here
Any help will be highly appreciated!!
Update May 2019: Recent changes in the Debian packages have made these configuration changes unnecessary for the latest packages.
AFAIK these flags are used by Debian as default for every compilation. And R memorizes the flags that where used. You can adjust that in ~/.R/Makevars
, e.g.:
# Settings from /etc/R/Makeconf with "non-portable flag(s):"
# ‘-Wdate-time’ ‘-Werror=format-security’ ‘-Wformat’ replaced by -Wall -pedantic
# and without -fdebug-prefix-map=...
CFLAGS = -g -O2 -Wall -pedantic -fstack-protector-strong -D_FORTIFY_SOURCE=2 $(LTO)
CXXFLAGS = -g -O2 -Wall -pedantic -fstack-protector-strong -D_FORTIFY_SOURCE=2 $(LTO)
CXX98FLAGS = -g -O2 -Wall -pedantic -fstack-protector-strong -D_FORTIFY_SOURCE=2
CXX11FLAGS = -g -O2 -Wall -pedantic -fstack-protector-strong -D_FORTIFY_SOURCE=2
CXX14FLAGS = -g -O2 -Wall -pedantic -fstack-protector-strong -D_FORTIFY_SOURCE=2
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With