Entering edit mode
Julian Gehring
★
1.3k
@julian-gehring-5818
Last seen 5.6 years ago
After upgrading to R 3.3.0 and Bioc 3.3, installing the RBGL package
source("http://bioconductor.org/biocLite.R") biocLite("RBGL")
fails with
BioC_mirror: http://mirrors.ebi.ac.uk/bioconductor Using Bioconductor 3.3 (BiocInstaller 1.22.1), R 3.3.0 (2016-05-03). Installing package(s) ‘RBGL’ trying URL 'http://mirrors.ebi.ac.uk/bioconductor/packages/3.3/bioc/src/contrib/RBGL_1.48.0.tar.gz' Content type 'application/x-gzip' length 2278218 bytes (2.2 MB) ================================================== downloaded 2.2 MB * installing *source* package ‘RBGL’ ... untarring boost include tree... ** libs clang++ -I/usr/local/Cellar/r/3.3.0/R.framework/Resources/include -DNDEBUG -I/usr/local/opt/gettext/include -I/usr/local/opt/readline/include -I/usr/local/opt/openssl/include -I/usr/local/include -Irbgl_trimmed_boost_1_49_0 -fPIC -g -O2 -c bbc.cpp -o bbc.o In file included from bbc.cpp:3: In file included from /usr/local/include/boost/graph/bc_clustering.hpp:14: In file included from /usr/local/include/boost/graph/graph_utility.hpp:32: In file included from /usr/local/include/boost/graph/depth_first_search.hpp:27: In file included from /usr/local/include/boost/tti/has_member_function.hpp:15: In file included from /usr/local/include/boost/tti/detail/dmem_fun.hpp:11: In file included from /usr/local/include/boost/function_types/is_member_function_pointer.hpp:14: In file included from /usr/local/include/boost/function_types/components.hpp:44: In file included from /usr/local/include/boost/mpl/remove.hpp:18: /usr/local/include/boost/mpl/remove_if.hpp:55:15: error: expected '(' for function-style cast or type construction > > ~ ^ /usr/local/include/boost/mpl/remove_if.hpp:56:9: error: expected class name > ^ /usr/local/include/boost/mpl/remove_if.hpp:72:15: error: expected '(' for function-style cast or type construction > > ~ ^ /usr/local/include/boost/mpl/remove_if.hpp:73:9: error: expected class name > ^ 4 errors generated. make: *** [bbc.o] Error 1 ERROR: compilation failed for package ‘RBGL’ * removing ‘/usr/local/lib/R/3.3/site-library/RBGL’ The downloaded source packages are in ‘/private/var/folders/_7/hb3h1xr10yz3csf7bdhkm5xx8y1cf0/T/RtmpIV0Juy/downloaded_packages’ Warning message: In install.packages(pkgs = doing, lib = lib, ...) : installation of package ‘RBGL’ had non-zero exit status
This may be related to the report: Install SomaticSignatures (ERROR: compilation failed for package 'RBGL')
Does anyone have an idea how this can be resolved?
SessionInfo:
R version 3.3.0 (2016-05-03) Platform: x86_64-apple-darwin15.4.0 (64-bit) Running under: OS X 10.11.4 (El Capitan) locale: [1] en_GB.UTF-8/en_GB.UTF-8/en_GB.UTF-8/C/en_GB.UTF-8/en_GB.UTF-8 attached base packages: [1] stats graphics grDevices utils datasets methods base other attached packages: [1] BiocInstaller_1.22.1 loaded via a namespace (and not attached): [1] tools_3.3.0
Output of gcc --version
:
Configured with: --prefix=/Applications/Xcode.app/Contents/Developer/usr --with-gxx-include-dir=/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.11.sdk/usr/include/c++/4.2.1 Apple LLVM version 7.3.0 (clang-703.0.31) Target: x86_64-apple-darwin15.4.0 Thread model: posix InstalledDir: /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin
Hi Julian,
Not terrible helpful, but I thought I'd say I'm currently unable to reproduce this on my Ubuntu machine with a fresh version of R-3.3.0 and gcc 4.8.4
That said, it looks like the compilation is getting header files from a system level installation of Boost, rather than the version that's distributed with RBGL - maybe that's part of the problem?
Perhaps you can remove the Boost installation from
/usr/local/include
, or stop it being included in the search path, and then test whether things get better? I can't remember how you can remove default compiler arguments during installation, but short term you can edit theCPPFLAGS
line inR_HOME/etc/Makeconf
Thanks for the pointers, Mike. Masking the system boost library for the installation of the RBGL package worked fine.
However, it seems to me that the configuration of the RBGL package can be changed to use the own boost library irrespective of what the system has to offer - most likely this will be the wrong version anyway, as boost is fairly incompatible between versions. Perhaps the package authors have some more insights.
I'm curious to know why the error has only just cropped up, it doesn't look like anything has changed in RBGL for a while, and I can't see any obvious entry in the R change log saying the way compiler header directories will be handled will change. Have you recently installed boost and it wasn't there in the past?
I can stop R looking in other directories for the header by adding the following to
RBGL/src/Makevars
- but I wouldn't like to pretend I know if this is entirely sensible.Or just
? It seems to place the local path ahead of /usr/.
Cool, I thought I'd tried that before making it more complex, but clearly not. That's certainly nicer.
I might have another datapoint on this - I've previously been able to install RBGL, but just ran into some issues now. I'm assuming it's because I just updated everything which included Boost (up to new version 1.59) and R (to 3.3). Getting the same error as above (with some minor path differences). Changing that line on Makevars to force it to use the bundled headers indeed worked.
OK Thanks I've updated the source code in subversion; the updated package will appear as RBGL version 1.48.1 (release) and 1.49.1 (devel) via biocLite after the next successful nightly build.
I'm looking into the possibility of packaging RBGL for Debian, and have run into a similar problem (output below). In this case, RBGL must be compiled against the Debian packaged version of Boost (currently 1.61 in Debian Unstable) not the locally bundled copy ([0],4.12).
Are there any plans to update RBGL to work with newer versions of Boost?
Thanks
Christopher
[0] https://www.debian.org/doc/debian-policy/ch-source.html
With boost 1.61, the following RBGL programs trigger errors like those noted above
bbc.cpp dominatorTree.cpp ordering.cpp planar.cpp shortestPath.cpp
There are also problems with some of the functions in interfaces.cpp. A nontrivial
fraction of the procedures compile with boost 1.61. If we can figure out the source of the issues
with mpl/remove_if ... we might be able to get this sorted relatively soon.
The devel branch of RBGL now employs an excerpt from boost 1.61.0
On two linux systems it passes check in R 3.3.0 with a warning about abort() in two of the boost functions
I cannot get it to build with el capitan clang++ ... let's see how the build system does.
All that was needed to get compatibility with boost 1.61 was to undefine the definition of protect in Rinternals.h ... this is done in RBGL.hpp.
We need to think about whether we want to back port to the release branch. I don't think I've ever done that for this package.
Thanks - there's no need to back port to the release branch on my account. As it turns out to be a small tweak to one file to get it working, I can easily use the Debian quilt mechanism to apply this to the upstream tarball.
Thanks for your help.