使用替代GCC大厦R封装 [英] Building R Packages using Alternate GCC

查看:121
本文介绍了使用替代GCC大厦R封装的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我一起工作的系统有GCC 4.5(实验)在/ usr / local / bin目录/ GCC这已被证明是对一些R封装问题。我想改用系统GCC在/ usr / bin中/海湾合作委员会。

The systems I work with have GCC 4.5 (experimental) in /usr/local/bin/gcc which has proven to be problematic for some R packages. I would like to instead use system GCC in /usr/bin/gcc.

我已经尝试设置在Bash配置文件CC和CXX(的.bashrc,.bash_profile文件等),以及在命令行,不过虽然猛砸认识的改变,R没有。

I have tried setting CC and CXX in the Bash configuration files (.bashrc, .bash_profile etc.) as well as on the command line, but although Bash recognizes the change, R does not.

我怎样才能得到R以在/ usr / bin中,而不是一个在/ usr / local / bin目录使用GCC的版本/?

How can I get R to use the version of GCC in /usr/bin instead of the one in /usr/local/bin/?

推荐答案

这是不是有据可查(例如,我没能找到它在任何'R扩展'或'R管理员现在),但布赖恩·里普利提到它在列出几次。

This is not that well documented (e.g. I failed to locate it in either 'R Extension' or 'R Admin' right now) but Brian Ripley mentioned it a few times on the lists.

基本上,在r编译时,会注册设置和存储在$罗姆的/ etc / Makeconf。一种可能性是直接编辑这个文件,但你可能没有root权限,也可能不会影响到所有其他用户。所以,更好的可能是创建

Basically, at R compile time, settings are registered and the stored in $RHOME/etc/Makeconf. One possibility is to edit that file directly, but you may not have root privileges or may not want to affect all other users. So the better may be to create

~/.R/Makevars

中的条目

CC=gcc-4.4
CXX=g++-4.4

加等你想设置任何optmisation标志。这将在影响的所有后续用途 - [R CMD INSTALL 研究CMD检查或...您运行。

在$罗姆其他文件在/ etc /同样可以从本地〜/ .R / 覆盖。

Other files in $RHOME/etc/ can similarly be overridden locally from ~/.R/.

这篇关于使用替代GCC大厦R封装的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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