RGraphiz安装继续失败ubuntu 12.04

时间:2014-04-28 17:39:10

标签: r bioconductor

我目前正在尝试安装bioconductor包' flowStats'这取决于生物导体包' Rgraphviz'。 据我所知Rgraphviz github,在12.04上安装它可能会遇到一些问题,应该使用捆绑的Graphviz来修复。但是,即使在使用devtools包中的install_github时,我仍然会遇到相同的问题,并声明gvc.h: No such file or directory。这很奇怪,因为在usr / local / include / graphviz目录中可以找到gvc.h(find / -iname gvc.h)。 另一方面,当使用R CMD INSTALL --configure-args='--with-graphviz=/usr/local' Rgraphviz_*.tar.gz的本地graphviz安装时,我得到以下输出,我似乎无法理解:

 configure: Using external Graphviz.
 configure: Using Graphviz dir '/usr/local'
 configure: Found Graphviz version '2.38.0'.
 configure: Graphviz major version is '2' and minor version is '38'.
 checking for stdbool.h that conforms to C99... no
 checking for _Bool... no
 checking for whether compiler has bool... no
 configure: Using the following compilation and linking flags for Rgraphviz
 configure:    PKG_CFLAGS=-I/usr/local/include/graphviz -DGRAPHVIZ_MAJOR=2 -DGRAPHVIZ_MINOR=38
 configure:    PKG_LIBS=-L/usr/local/lib/graphviz -L/usr/local/lib -lgvc
 configure:    GVIZ_DEFS=
 configure: Compiling using Graphviz version: '2.38.0'.
 configure: Using bundled Graphviz: 'FALSE'.
 configure: creating ./config.status
 config.status: creating R/graphviz_build_version.R
 config.status: creating src/Makevars
** libs
gcc -std=gnu99 -I/usr/share/R/include -DNDEBUG     -I/usr/local/include/graphviz -DGRAPHVIZ_MAJOR=2 -DGRAPHVIZ_MINOR=38  -fpic  -g -O2 -fstack-protector --param=ssp-buffer-size=4 -Wformat -Wformat-security -Werror=format-security -D_FORTIFY_SOURCE=2 -g  -c LL_funcs.c -o LL_funcs.o
In file included from LL_funcs.c:1:0:
 common.h:22:1: error: unknown type name Agdict_t
 LL_funcs.c:34:27: error: request for member dict in something not a structure or union
 LL_funcs.c:41:35: error: request for member list in something not a structure or union
 LL_funcs.c:42:33: error: request for member list in something not a structure or union
 LL_funcs.c: In function Rgraphviz_setDefAttrsGraph:
 LL_funcs.c:93:5: warning: implicit declaration of function agraphattr [-Wimplicit-function-declaration]
 LL_funcs.c:93:18: warning: initialization makes pointer from integer without a cast [enabled by default]
 LL_funcs.c: In function Rgraphviz_getDefAttrsNode:
 LL_funcs.c:194:20: error: Agraph_t has no member named âprotoâ
 LL_funcs.c: In function Rgraphviz_setDefAttrsNode:
 LL_funcs.c:224:5: warning: implicit declaration of function agnodeattr [-Wimplicit-function-declaration]
 LL_funcs.c:224:18: warning: initialization makes pointer from integer without a cast [enabled by default]
 LL_funcs.c: In function Rgraphviz_getDefAttrsEdge:
 LL_funcs.c:291:20: error: Agraph_t has no member named proto
 LL_funcs.c: In function Rgraphviz_setDefAttrsEdge:
 LL_funcs.c:321:5: warning: implicit declaration of function agedgeattr [-Wimplicit-function-declaration]
LL_funcs.c:321:18: warning: initialization makes pointer from integer without a cast [enabled by default]
LL_funcs.c: In function Rgraphviz_agopenSimple:
LL_funcs.c:456:5: error: too few arguments to function aginit
/usr/local/include/graphviz/cgraph.h:354:13: note: declared here
LL_funcs.c:458:5: error: incompatible type for argument 2 of agopen
/usr/local/include/graphviz/cgraph.h:261:18: note: expected âAgdesc_tâ but argument is  of type âintâ
LL_funcs.c:458:5: error: too few arguments to function agopen
/usr/local/include/graphviz/cgraph.h:261:18: note: declared here
LL_funcs.c:476:9: error: too few arguments to function agsubg
/usr/local/include/graphviz/cgraph.h:365:18: note: declared here
LL_funcs.c:501:9: error: too few arguments to function agnode
/usr/local/include/graphviz/cgraph.h:275:18: note: declared here
LL_funcs.c:531:13: error: too few arguments to function âagedgeâ
/usr/local/include/graphviz/cgraph.h:286:18: note: declared here
make: *** [LL_funcs.o] Error 1
ERROR: compilation failed for package Rgraphviz
* removing /home/fpkerckh/R/x86_64-pc-linux-gnu-library/3.1/Rgraphviz

有人在这里有一些指示吗?我一直在尝试很多东西,包括从源代码编译和使用github软件包等等,所以如果有人可以帮助我,我会很高兴。

3 个答案:

答案 0 :(得分:1)

另一种选择是安装二进制发行版,例如Michael Rutter的发行版:

AMD64https://launchpad.net/~marutter/+archive/c2d4u/+build/5402502

i386https://launchpad.net/~marutter/+archive/c2d4u/+build/5402503

例如,如果您运行的是64位系统,请使用:

wget https://launchpad.net/~marutter/+archive/c2d4u/+build/5402502/+files/r-bioc-rgraphviz_2.6.0-1cran1precise0_amd64.deb
sudo dpkg -i r-bioc-rgraphviz_2.6.0-1cran1precise0_amd64.deb 

你可以检查他的构建日志,看看是否有任何线索......

答案 1 :(得分:1)

在与包维护者通信后,我发现最近的提交还没有被推送到github。这个问题现在已经解决,从github安装工作完美无瑕:

install_github("kasperdanielhansen/Rgraphviz")

问题是由Ubuntu 12.04上使用的一些激进的编译器设置引起的。

它在提交e0e2b6dcd1cc09b14d150889a83780c978e1cc37中解决了。

答案 2 :(得分:0)

截至 2021 年 2 月,在 Ubuntu 20.10 上使用 -O3 进行编译仍然会导致 Rgraphviz 2.34.0 的安装问题。

https://github.com/kasperdanielhansen/Rgraphviz/issues/12

改用 -O2 对我有用。