Brotli for R无法正确编译 [英] Brotli for R is not compiling correctly

查看:236
本文介绍了Brotli for R无法正确编译的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在尝试在R中安装brotli软件包.像往常一样,我运行: install.packages("brotli")

I am trying to install the brotli package in R. As usual, I run: install.packages("brotli")

但是,由于某种原因,编译似乎没有完成.我现在已经在两个不同的系统上进行了尝试(一个在我的Mac上,另一个在EC2实例上).错误如下:

However, for some reason, the compilation seems to not be completing. I have tried this now on two different systems (one on my Mac, the other on an EC2 instance). Here are the errors:

wrapper.c:94:14: error: unknown type name 'R_CallMethodDef'

static const R_CallMethodDef CallEntries[] = {
             ^
wrapper.c:95:28: error: use of undeclared identifier 'DL_FUNC'
  {"R_brotli_compress",   (DL_FUNC) &R_brotli_compress,   3},
                           ^
wrapper.c:96:28: error: use of undeclared identifier 'DL_FUNC'
  {"R_brotli_decompress", (DL_FUNC) &R_brotli_decompress, 1},
                           ^
wrapper.c:100:20: error: unknown type name 'DllInfo'
void R_init_brotli(DllInfo *dll) {
                   ^
wrapper.c:101:3: warning: implicit declaration of function         'R_registerRoutines' is invalid in C99 [-Wimplicit-function-declaration]
  R_registerRoutines(dll, NULL, CallEntries, NULL, NULL);
  ^
wrapper.c:102:3: warning: implicit declaration of function     'R_useDynamicSymbols' is invalid in C99 [-Wimplicit-function-declaration]
  R_useDynamicSymbols(dll, FALSE);
  ^
2 warnings and 4 errors generated.
make: *** [wrapper.o] Error 1
ERROR: compilation failed for package ‘brotli’
* removing     ‘/Library/Frameworks/R.framework/Versions/3.3/Resources/library/brotli’

The downloaded source packages are in
        ‘/private/var/folders/6s/dkpknwzd4d51qm959wqxv7280000gn/T/RtmpHOPjwI/downloa    ded_packages’
Warning message:
In install.packages("brotli") :
  installation of package ‘brotli’ had non-zero exit status

我对C的了解不如我应该精通,但是我试图对其进行反向工程无济于事.我想念什么吗?我还尝试使用"dependencies"选项(dependencies = TRUE)进行安装.有人对此有任何想法吗?

I'm not as proficient in C as I probably should be, but I tried to reverse engineer it with no avail. Am I missing something? I also tried to install this with the dependencies option (dependencies = TRUE). Does anyone have any thoughts on this?

推荐答案

因此,通过一些额外的C代码查找,似乎认为该解决方案非常简单.我只是没有安装r-development.在我的Mac和EC2上安装后,现在安装没有问题.这很奇怪,因为我想应该可以在不需要开发软件包的情况下安装一个不错的R软件包.但是,也许我对R软件包的开发缺乏经验,无法对此事发表评论.尽管如此,我希望这对其他试图安装同一软件包的经验不足的人有所帮助.谢谢您的帮助!

So, it seems as thought, through some additional poking in the C code, that the solution was really simple. I just didn't have r-development installed. After installing on both my mac and my EC2, it now installs with no issue. This is strange, since I would imagine that a decent R package should be able to be installed without the need of the development packages. But maybe I'm too inexperienced in R package development to comment an opinion on the matter. None-the-less, I hope this helps other less-experienced that are seeking to install the same package. Thanks for the help though!

这篇关于Brotli for R无法正确编译的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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