由于cpp11编译错误导致R tidyr包安装失败(扩展模式x不包含参数包) [英] R tidyr package installation failed due to cpp11 compilation error (expansion pattern x contains no argument packs)

查看:45
本文介绍了由于cpp11编译错误导致R tidyr包安装失败(扩展模式x不包含参数包)的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有以下与 cp11 相关的错误.cp11编译好像有错误,不知道怎么解决.

I have the following errors related to cp11. It looks like the cp11 compilation has erros which I'm not sure how to solve.

我尝试做的是卸载软件包并重新安装.

What I've tried to do is uninstall the package and reinstall it again.

我使用的是 RHEL 7,gcc 版本是 4.8.5

I'm on RHEL 7, gcc version is 4.8.5

> install.packages("tidyverse")
Installing package into ‘/datascience/R/x86_64-redhat-linux-gnu-library/3.6’
(as ‘lib’ is unspecified)
also installing the dependency ‘tidyr’

trying URL 'https://cran.rstudio.com/src/contrib/tidyr_1.1.1.tar.gz'
Content type 'application/x-gzip' length 879411 bytes (858 KB)
==================================================
downloaded 858 KB

trying URL 'https://cran.rstudio.com/src/contrib/tidyverse_1.3.0.tar.gz'
Content type 'application/x-gzip' length 712837 bytes (696 KB)
==================================================
downloaded 696 KB

* installing *source* package ‘tidyr’ ...
** package ‘tidyr’ successfully unpacked and MD5 sums checked
** using staged installation
** libs
g++ -m64 -std=gnu++11 -I"/usr/include/R" -DNDEBUG  -I"/usr/lib64/R/library/cpp11/include" -I/usr/local/include  -fpic  -O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector-strong --param=ssp-buffer-size=4 -grecord-gcc-switches   -m64 -mtune=generic  -c cpp11.cpp -o cpp11.o
In file included from /usr/lib64/R/library/cpp11/include/cpp11/as.hpp:8:0,
                 from /usr/lib64/R/library/cpp11/include/cpp11.hpp:5,
                 from /usr/lib64/R/library/cpp11/include/cpp11/declarations.hpp:8,
                 from cpp11.cpp:4:
/usr/lib64/R/library/cpp11/include/cpp11/protect.hpp: In lambda function:
/usr/lib64/R/library/cpp11/include/cpp11/protect.hpp:185:52: error: parameter packs not expanded with ‘...’:
       return unwind_protect_sexp([&] { return ptr_(a...); });
                                                    ^
/usr/lib64/R/library/cpp11/include/cpp11/protect.hpp:185:52: note:         ‘a’
/usr/lib64/R/library/cpp11/include/cpp11/protect.hpp:185:53: error: expansion pattern ‘a’ contains no argument packs
       return unwind_protect_sexp([&] { return ptr_(a...); });
                                                     ^
make: *** [cpp11.o] Error 1
ERROR: compilation failed for package ‘tidyr’
* removing ‘/datascience/R/x86_64-redhat-linux-gnu-library/3.6/tidyr’
Warning in install.packages :
  installation of package ‘tidyr’ had non-zero exit status
ERROR: dependency ‘tidyr’ is not available for package ‘tidyverse’
* removing ‘/datascience/R/x86_64-redhat-linux-gnu-library/3.6/tidyverse’
Warning in install.packages :
  installation of package ‘tidyverse’ had non-zero exit status

The downloaded source packages are in
    ‘/tmp/Rtmp7JHlRI/downloaded_packages’

推荐答案

我猜是错误信息

 error: ‘unmove’ is not a member of ‘cpp11’

是由 0.2.0 版本的 cpp11 包的持续更改引起的.这个 Github issue 提到了这个问题.解决我的问题的方法是在 R 中使用以下命令安装旧版本的 cpp11:

is caused by the on-going change in the 0.2.0 version of the cpp11 package. This Github issue mentions this problem. The way that solves my problem is installing an older version of cpp11 using the following command in R:

packageurl <- "https://cloud.r-project.org/src/contrib/cpp11_0.1.0.tar.gz"
install.packages(packageurl, repos=NULL, type="source")

这篇关于由于cpp11编译错误导致R tidyr包安装失败(扩展模式x不包含参数包)的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆