Frage

I am currently trying to install the bioconductor package 'flowStats' which depends upon the bioconductor package 'Rgraphviz'. As I understand from the Rgraphviz github there may be some issues with getting it installed on 12.04 which should be fixed by using the bundled Graphviz. However I keep on getting the same issues even when using install_github from the devtools package, stating gvc.h: No such file or directory. Which is very weird, as gvc.h can be found (find / -iname gvc.h) in the usr/local/include/graphviz directory. On the other hand, when using the local graphviz installation by R CMD INSTALL --configure-args='--with-graphviz=/usr/local' Rgraphviz_*.tar.gz I get the following output, that I cannot seem to understand:

 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

Does anybody have some pointers here? I have been trying a lot of things, including compiling from source and using github package versions and so on so I would be very happy if somebody can help me out.

War es hilfreich?

Lösung

After correspondence with the package maintainer, I found out that the most recent commit was not pushed to github yet. This issue is now resolved and installing from github works flawlessly:

install_github("kasperdanielhansen/Rgraphviz")

The problem was caused by some agressive compiler settings used on Ubuntu 12.04.

It was solved in commit e0e2b6dcd1cc09b14d150889a83780c978e1cc37.

Andere Tipps

Another option is to install a binary distribution, such as those by Michael Rutter:

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

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

For example, if you are running a 64bit system, use:

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 

You could checks his buildlogs to see if there is any clue...

Compiling with -O3 still causes install problems for Rgraphviz 2.34.0 on Ubuntu 20.10 as of Feb 2021.

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

Using -O2 instead worked for me.

Lizenziert unter: CC-BY-SA mit Zuschreibung
Nicht verbunden mit StackOverflow
scroll top