试图摆脱关于“checkbashisms”、包大小和 GNU SystemRequirements 的 devtools::check() 警告和注释?

问题描述

我正在 macOS 上开发我的第一个依赖 rstan 的 R 包。到目前为止,我在 RStudio 上收到了来自 devtools::check()一个警告和两个注释。

> checking top-level files ... WARNING
  A complete check needs the 'checkbashisms' script.
  See section ‘Configure and cleanup’ in the ‘Writing R Extensions’
  manual.

> checking installed package size ... NOTE
    installed size is  6.2Mb
    sub-directories of 1Mb or more:
      libs   5.9Mb

> checking for GNU extensions in Makefiles ... NOTE
  GNU make is a SystemRequirements.

0 errors ✓ | 1 warning x | 2 notes x

我不是一个资深的开发者。我查看了所有我能找到的在线讨论,但没有解决问题。

对于 'checkbashisms'[1] 我从 here 下载了 v2.0.0.2 并将其复制到包文件夹和 /usr/local/bin/ 路径; [2] 将以下内容添加到包文件夹中的 configureconfigure.win 文件中。

#! /bin/sh
if [ -f /usr/bin/checkbashisms ]; then
    checkbashisms --force
fi

到目前为止,[1][2] 不起作用。我也转向了这个 post,但我不确定如何关注 added the checkbashisms perl script to $PATH,made it executable (important),尤其是在 macOS 上。

对于SystemRequirements,我转向了这个post。到目前为止,还没有解决

附言 configureconfigure.win 文件

# Generated by rstantools.  Do not edit by hand.

#! /bin/sh
"${R_HOME}/bin/Rscript" -e "rstantools::rstan_config()"
if [ -f /usr/bin/checkbashisms ]; then
    checkbashisms --force
fi

MakevarsMakevars.winsrc 文件夹中

# Generated by rstantools.  Do not edit by hand.

STANHEADERS_SRC = $(shell "$(R_HOME)/bin$(R_ARCH_BIN)/Rscript" -e "message()" -e "cat(system.file('include','src',package = 'StanHeaders',mustWork = TRUE))" -e "message()" | grep "StanHeaders")

PKG_CPPFLAGS = -I"../inst/include" -I"$(STANHEADERS_SRC)" -DBOOST_disABLE_ASSERTS -DEIGEN_NO_DEBUG -DBOOST_MATH_OVERFLOW_ERROR_POLICY=errno_on_error
PKG_CXXFLAGS = $(shell "$(R_HOME)/bin$(R_ARCH_BIN)/Rscript" -e "RcppParallel::CxxFlags()") $(shell "$(R_HOME)/bin$(R_ARCH_BIN)/Rscript" -e "StanHeaders:::CxxFlags()")
PKG_LIBS = $(shell "$(R_HOME)/bin$(R_ARCH_BIN)/Rscript" -e "RcppParallel::RcppParallelLibs()") $(shell "$(R_HOME)/bin$(R_ARCH_BIN)/Rscript" -e "StanHeaders:::LdFlags()")

CXX_STD = CXX14

DESCRIPTION 文件

**here,some package info is omitted

Encoding: UTF-8
LazyData: true
Roxygen: list(markdown = TRUE)
RoxygenNote: 7.1.1
Biarch: true
Depends: 
    R (>= 3.4.0)
Imports: 
    methods,Rcpp (>= 0.12.0),RcppParallel (>= 5.0.1),rstan (>= 2.18.1),rstantools (>= 2.1.1)
LinkingTo: 
    BH (>= 1.66.0),RcppEigen (>= 0.3.3.3.0),StanHeaders (>= 2.18.0)
SystemRequirements: GNU make

感谢您的友好评论

解决方法

暂无找到可以解决该程序问题的有效方法,小编努力寻找整理中!

如果你已经找到好的解决方法,欢迎将解决方案带上本链接一起发送给小编。

小编邮箱:dio#foxmail.com (将#修改为@)