[英]CRAN submission - R CMD Check warning - compilation flags used
我正在尝试将我的第一个包提交给CRAN
,在我的机器上,我在运行R CMD check
时收到以下警告(通过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
我在R
win-builder上构建我的软件包时没有收到此警告。 我从win-builder服务获得了一个NOTE
,但我认为这是因为这是第一次提交并且有CRAN
无法识别的拼写,即
* checking CRAN incoming feasibility ... NOTE
New submission
Possibly mis-spelled words in DESCRIPTION:
CVODE (8:167)
CVODES (8:219)
Livermore (8:108)
我并不担心第一次提交和错误拼写的单词,因为我可以在评论中解释它们(以及在cran-comments.md
文件中)。 但有没有办法删除我在我的系统上的警告( macOS
, R = 3.5.0
)。 该软件包在travis-ci
和appveyor
上构建得很好。
此外,包装是否已准备好提交1警告,我知道Hadley的书中提到我们必须在提交之前尝试删除所有错误,警告和注释。
我刚刚发现了关于r-hub
的问题
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
包裹代码可以在这里找到
任何帮助将受到高度赞赏!
更新2019年5月 : 最近发生的变化在Debian软件包做这些配置更改不需要最新的软件包。
AFAIK这些标志被Debian用作每个编译的默认值。 并且R记住使用的标志。 您可以在~/.R/Makevars
,例如:
# 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
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.