Dear Bioconductor developers and users,
I am contacting you with respect to an installation issue with the package Rgraphviz. I have an analysis pipeline that requires the package but I can not get it installed properly and the online solutions I tried did not help me.
Since Rgraphviz come bundled with graphviz, I first tried to install them both from R but it fails towards the end and the system complains about not being able to load the shared library:
> BiocManager::install("Rgraphviz") [... some more logs here...] ** testing if installed package can be loaded from temporary location Error: package or namespace load failed for ‘Rgraphviz’: .onLoad failed in loadNamespace() for 'Rgraphviz', details: call: value[[3L]](cond) error: unable to load shared object '/mnt/irisgpfs/users/xxxxx/R/x86_64-pc-linux-gnu-library/4.0/00LOCK-Rgraphviz/00new/Rgraphviz/libs/Rgraphviz.so': /mnt/irisgpfs/users/xxxxx/R/x86_64-pc-linux-gnu-library/4.0/00LOCK-Rgraphviz/00new/Rgraphviz/libs/Rgraphviz.so: undefined symbol: _ZGVdN4vv___pow_finite Rgraphviz is unable to be loaded. This typically is a symptom of an installation problem. From 2.x.x onwards, Graphviz ought to come bundled with Rgraphviz.
It is unclear for me from the logs what the problem could be but I indeed see that when running
configure (for graphviz), it seems that
-static is not supported (not sure whether that is an issue but on another machine where I can successfully install Rgraphviz, these options are all set to yes):
checking if gcc static flag -static works... no checking if g++ -std=gnu++11 static flag -static works... no checking if gcc static flag -static works... no
In any case, I also tried to install first Graphviz (version 2.28.0 to match the one used by Rgraphviz) but then, when I try to install Rgraphviz with the
--with-graphviz option, it seems the R package is not able to properly use the version I just compiled:
$> ls /home/users/xxxxx/Software/graphviz/include/graphviz arith.h cgraph.h geom.h graphviz_version.h gvc.h gvcommon.h gv.cpp gvplugin_device.h gvplugin_layout.h gvplugin_render.h gvpr.h pathgeom.h textpara.h usershape.h cdt.h color.h graph.h gvcext.h gvcjob.h gvconfig.h gv.i gvplugin.h gvplugin_loadimage.h gvplugin_textlayout.h pack.h pathplan.h types.h xdot.h $> ls /home/users/xxxxx/Software/graphviz/lib/graphviz config6 java libgvplugin_core.so.6.0.0 libgvplugin_dot_layout.so.6.0.0 libgvplugin_gd.so.6.0.0 libgvplugin_neato_layout.so.6.0.0 php python25 ruby go libgvplugin_core.la libgvplugin_dot_layout.la libgvplugin_gd.la libgvplugin_neato_layout.la lua python python26 sharp guile libgvplugin_core.so libgvplugin_dot_layout.so libgvplugin_gd.so libgvplugin_neato_layout.so ocaml python23 python27 tcl io libgvplugin_core.so.6 libgvplugin_dot_layout.so.6 libgvplugin_gd.so.6 libgvplugin_neato_layout.so.6 perl python24 R $> R CMD INSTALL --configure-args='--with-graphviz=/home/users/xxxxx/Software/graphviz' /home/users/xxxxx/Software/Rgraphviz_install/Rgraphviz_2.38.0.tar.gz * installing to library ‘/mnt/irisgpfs/users/xxxxx/R/x86_64-pc-linux-gnu-library/4.0’ * installing *source* package ‘Rgraphviz’ ... ** using staged installation configure: Using external Graphviz. configure: Using Graphviz dir '/home/users/xxxxx/Software/graphviz' configure: Found Graphviz version '2.28.0'. configure: Graphviz major version is '2' and minor version is '28'. 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/home/users/xxxxx/Software/graphviz/include/graphviz -DGRAPHVIZ_MAJOR=2 -DGRAPHVIZ_MINOR=28 configure: PKG_LIBS=-L/home/users/xxxxx/Software/graphviz/lib/graphviz -L/home/users/xxxxx/Software/graphviz/lib -lgvc configure: GVIZ_DEFS= configure: Compiling using Graphviz version: '2.28.0'. configure: Using bundled Graphviz: 'FALSE'. configure: creating ./config.status config.status: creating R/graphviz_build_version.R config.status: creating src/Makevars [...Some more lines here...] ** testing if installed package can be loaded from temporary location Error: package or namespace load failed for ‘Rgraphviz’: .onLoad failed in loadNamespace() for 'Rgraphviz', details: call: value[[3L]](cond) error: unable to load shared object '/mnt/irisgpfs/users/xxxxx/R/x86_64-pc-linux-gnu-library/4.0/00LOCK-Rgraphviz/00new/Rgraphviz/libs/Rgraphviz.so': /mnt/irisgpfs/users/xxxxx/R/x86_64-pc-linux-gnu-library/4.0/00LOCK-Rgraphviz/00new/Rgraphviz/libs/Rgraphviz.so: undefined symbol: agraphattr
I also tried other versions of Graphviz just in case but it does not help so I focused on v2.28.0 instead. I am not quite sure what to do from there as the Graphviz installation seems to be fine but maybe not exactly the way the R package expects it.
I read that some people experienced similar error messages when compiling using the O3 optimization but it does not seem to be the case here as all compilations are run using O2 - as far as I can see from the logs.
I am running R v4.0.5, Bioconductor v3.12 and trying to install Rgraphviz 2.38.0 with gcc 10.2.0 on a Linux machine (x86_64) for which I do not have the admin rights. My sessionInfo is pasted below.
> sessionInfo() R version 4.0.5 (2021-03-31) Platform: x86_64-pc-linux-gnu (64-bit) Running under: Red Hat Enterprise Linux 8.3 (Ootpa) Matrix products: default BLAS/LAPACK: /mnt/irisgpfs/apps/resif/aion/2020b/epyc/software/OpenBLAS/0.3.12-GCC-10.2.0/lib/libopenblas_zenp-r0.3.12.so locale:  LC_CTYPE=en_GB.UTF-8 LC_NUMERIC=C  LC_TIME=fr_FR.UTF-8 LC_COLLATE=en_GB.UTF-8  LC_MONETARY=fr_FR.UTF-8 LC_MESSAGES=en_GB.UTF-8  LC_PAPER=fr_FR.UTF-8 LC_NAME=C  LC_ADDRESS=C LC_TELEPHONE=C  LC_MEASUREMENT=fr_FR.UTF-8 LC_IDENTIFICATION=C attached base packages:  stats graphics grDevices utils datasets methods base loaded via a namespace (and not attached):  compiler_4.0.5
Any hint or help will be much appreciated. I can provide the full commands / logs but I did not want that message to be longer than it is already. I thank you already for the support.
Best regards, C.