我正在尝试为我的R软件包复制CRAN消毒剂失败,该软件包依赖于rocker / r-devel-ubsan-clang docker镜像上的Rcpp。
当我尝试安装Rcpp时,出现关于no type named 'R_ContinueUnwind'
的错误。这是我做错了吗,还是与Rcpp和Rdevel不兼容?
如果是后者,是否有办法获得类似的docker镜像,该镜像将地址清理器用于R的非开发版本?
这是我一直尝试运行并输出的命令:
docker run --cap-add SYS_PTRACE --rm -it rocker/r-devel-ubsan-clang /bin/bash
root@e9f11aceb087:/# Rscriptdevel -e "install.packages('Rcpp')"
Installing package into ‘/usr/local/lib/R/site-library’
(as ‘lib’ is unspecified)
trying URL 'http://cran.rstudio.com/src/contrib/Rcpp_0.12.18.tar.gz'
Content type 'application/x-gzip' length 3809164 bytes (3.6 MB)
==================================================
downloaded 3.6 MB
* installing *source* package ‘Rcpp’ ...
** package ‘Rcpp’ successfully unpacked and MD5 sums checked
** libs
clang++-4.0 -stdlib=libc++ -fsanitize=address,undefined -fno-sanitize=float-divide-by-zero -fno-omit-frame-pointer -fsanitize-address-use-after-scope -I/usr/local/lib/R/include -DNDEBUG -I../inst/include/ -I/usr/local/include -fpic -g -O3 -Wall -pedantic -mtune=native -c Date.cpp -o Date.o
In file included from Date.cpp:31:
In file included from ../inst/include/Rcpp.h:27:
In file included from ../inst/include/RcppCommon.h:128:
../inst/include/Rcpp/exceptions.h:150:7: error: no type named 'R_ContinueUnwind' in the global namespace
::R_ContinueUnwind(token);
~~^
1 error generated.
/usr/local/lib/R/etc/Makeconf:166: recipe for target 'Date.o' failed
make: *** [Date.o] Error 1
ERROR: compilation failed for package ‘Rcpp’
* removing ‘/usr/local/lib/R/site-library/Rcpp’
The downloaded source packages are in
‘/tmp/RtmpqVuvlD/downloaded_packages’
Warning message:
In install.packages("Rcpp") :
installation of package ‘Rcpp’ had non-zero exit status
编辑
这是
docker image list
的结果,并且来自容器Rdevel --version
中 docker image list rocker/r-devel-ubsan-clang
REPOSITORY TAG IMAGE ID CREATED SIZE
rocker/r-devel-ubsan-clang latest c769161f77fb 10 months ago 4.47GB
和
Rdevel --version
Rdevel --version
R Under development (unstable) (2017-09-16 r73288) -- "Unsuffered Consequences"
Copyright (C) 2017 The R Foundation for Statistical Computing
Platform: x86_64-pc-linux-gnu (64-bit)
R is free software and comes with ABSOLUTELY NO WARRANTY.
You are welcome to redistribute it under the terms of the
GNU General Public License versions 2 or 3.
For more information about these matters see
http://www.gnu.org/licenses/.
我通过使用
docker pull
获得了该图像,现在我正尝试从头开始构建它,这是因为该图像已使用了10个月。 最佳答案
该仓库的维护者在这里。我们可能也可以在回购单中讨论该问题。一段时间以来,我还没有尝试用clang
自己编译R-devel(因为我是通过gcc
在家里构建r-devel的),所以不确定为什么该符号会丢失。
Winston提出了整个概念,他创建了一整套调试Docker容器in this repo。
否则,(出色的)R hub builder也具有消毒剂版本。剩下的一个问题是CRAN不太会改变其设置(除了发布简短描述之外),因此,尚不清楚设置是否实际上与其设置相同。
编辑:实际上grep
'ing为您的符号表明它是contingent on R version 3.5.0 or later:
#if (defined(R_VERSION) && R_VERSION >= R_Version(3, 5, 0))
::R_ContinueUnwind(token);
#endif
如果可以的话,您可以仔细检查您的容器设置吗?那么我们在这里可能会有R版本和R-devel版本之间的不匹配-应该很容易修复。
关于r - 在Rocker/R-Devel-Ubsan-Clang中安装Rcpp,我们在Stack Overflow上找到一个类似的问题:https://stackoverflow.com/questions/51638351/