安装“RcppArmadillo"时出错R中的包 [英] Error while installing "RcppArmadillo" package in R

查看:85
本文介绍了安装“RcppArmadillo"时出错R中的包的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我使用的是 macOS High Sierra 版本 10.13.4.在安装RcppArmadillo"包时,我收到以下两条警告消息:

I am using macOS High Sierra version 10.13.4. While installing "RcppArmadillo"package, I get the following two WARNING messages :

   checking whether /usr/local/clang6/bin/clang++ -Wall accepts -g... (cached) yes
   checking whether g++ version is sufficient... almost
   configure: WARNING: Compiler self-identifies as being compliant with GNUC extensions but is not g++.
   checking for macOS... found
   checking for macOS Apple compiler... not found
   checking for clang compiler... found
   checking for OpenMP compatible version of clang... found and suitable
   checking LAPACK_LIBS... R-supplied partial LAPACK found
   configure: WARNING: Some complex-valued LAPACK functions may not be available

当我在终端上输入gcc --version"时,我得到

When I type "gcc --version" on my terminal, I get

 Configured with: --prefix=/Applications/Xcode.app/Contents/Developer/usr --with-gxx-include-dir=/usr/include/c++/4.2.1
 Apple LLVM version 9.1.0 (clang-902.0.39.2)
 Target: x86_64-apple-darwin17.5.0
 Thread model: posix
 InstalledDir: /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin

我在 R 中的 Makevars 文件看起来像:

And my Makevars file in R looks like:

FLIBS=-L/usr/local/gfortran/lib/gcc/x86_64-apple-darwin16/6.3.0 -L/usr/local/gfortran/lib -lgfortran -lquadmath -lm
F77 = /usr/local/bin/gfortran
FC = $F77
CXX =  /usr/local/clang6/bin/clang++  -Wall
LDFLAGS=-L/usr/local/clang6/lib
CC=  /usr/local/clang6/bin/clang
SHLIB_CXXLD=ccache /usr/local/clang6/bin/clang++
CXX11 =  /usr/local/clang6/bin/clang++
CXX98 =  /usr/local/clang6/bin/clang++
CXX14 =  /usr/local/clang6/bin/clang++

如何去除这两个警告标志?

How can I remove these two WARNING signs?

推荐答案

简而言之,这些是警告不是错误.此外,这些警告无关.

In short, these are warnings and not errors. Moreover, these warnings do not matter.

让我们谈谈每个警告的含义...

Let's talk about what each warning means...

配置:警告:编译器自我识别为与 GNUC 扩展兼容,但不是 g++.

configure: WARNING: Compiler self-identifies as being compliant with GNUC extensions but is not g++.

这说明在 Makevars 文件的 CXX 变量中定义的编译器是 identifyinggcc 但是不是 gcc 编译器.本质上,每个编译器都有自己的预定义头文件,参见 第 3.7.2 节C 预处理器的通用预定义宏,以及这个check 的重点是验证是否选择了现代 gcc 编译器.但是,如果编译器对它的身份撒谎,则很难检查编译器是否存在.

This is stating that the compiler defined in the Makevars file's CXX variable is identifying as gcc but is not the gcc compiler. In essence, each compiler has its own predefined header, see Section 3.7.2 Common Predefined Macros of The C Preprocessor, and this check is focused on verifying that a modern gcc compiler is selected. However, it's hard to check the presence of a compiler if the compiler is lying about who it is.

关于起源的详细信息,请参阅问题中的讨论在配置后添加检查消息成功g++ 版本检查 #183 和提交 norel="default"455557101033d 消息g++ 测试).

For details on the origin, see discussion in the issue Add a check message success in config after g++version check #183 and the commit the default message on the g++ test).

配置:警告:某些复数值 LAPACK 函数可能不可用

configure: WARNING: Some complex-valued LAPACK functions may not be available

在此警告中,有人抱怨底层线性代数包R 附带的相同.不幸的是,R 附带的 LAPACK 严重 有限且有点过时.因此,这里的检查是希望通过 OpenBLAS、英特尔 MKL 或 ATLAS 提供外部 LAPACK.由于此检查的结构方式,除非您从源代码编译 R - 即您选择不使用 CRAN 提供的二进制文件 - 没有办法避免打嗝.

Within this warning, there is a complaint that the underlying Linear Algebra PACKage is the same one that is shipped with R. Unfortunately, the LAPACK that is shipped with R is severely limited and a bit out of date. So, the check here is hoping for an external LAPACK being present via either OpenBLAS, Intel MKL, or ATLAS. Due to the way this check is structured, unless you are compiling R from source -- that is you opt not to use the binary provided by CRAN -- there is no way to avoid the hiccup.

简单地说,CRAN 二进制文件在特定位置查找 LAPACK.切换到另一个 LAPACK 需要建立一个指向现有 lRlapack 位置的符号链接,这就是 支票搜索.但是,不建议进行这样的符号链接.(对不起 vecLib 爱好者!)

Simply put, the CRAN binary looks for the LAPACK in a specific location. Switching to another LAPACK would require the establishment of a symbolic link to the existing lRlapack location, which is what the check searches for. Though, it isn't advisable doing such a symbolic link. (Sorry vecLib lovers!)

如果您有兴趣从源代码编译,请考虑查看 "nofollow noreferrer">R 安装和管理,描述了使用外部 LAPACK 的过程.

If you are interested in compiling from source, consider viewing Section A.3 Linear algebra of R Installation and Administration, which describes the procedure for using external LAPACKs.

这篇关于安装“RcppArmadillo"时出错R中的包的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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