Question: Installation error RBGL 1.42
gravatar for agroff
4.3 years ago by
United States
agroff0 wrote:


I'm trying to install RBGL 1.42 from bioconductor. I've tried the following as well as installing from source, but keep getting the same error messages. Anyone know a workaround?

I'm including the full output of my installation attempt with the error in bold at the bottom. Following this is the output of sessionInfo(). I'm working on a linux cluster, using R 3.0.2 and Bioconductor version 2.13 

Thanks for your help!! Please let me know if I can be more precise!


> biocLite("RBGL")
Using Bioconductor version 2.13 (BiocInstaller 1.12.1), R version 3.0.2.
Installing package(s) 'RBGL'
trying URL ''
Content type 'application/x-gzip' length 2265926 bytes (2.2 Mb)
opened URL
downloaded 2.2 Mb

* installing *source* package ‘RBGL’ ...
untarring boost include tree...
** libs
g++ -I/n/sw/centos6/R-3.0.2/lib64/R/include -DNDEBUG  -I/usr/local/include   -Irbgl_trimmed_boost_1_49_0 -fpic  -g -O2  -c bbc.cpp -o bbc.o
In file included from /n/sw/gcc-4.6.1/lib/gcc/x86_64-unknown-linux-gnu/4.6.1/../../../../include/c++/4.6.1/bits/localefwd.h:42:0,
                 from /n/sw/gcc-4.6.1/lib/gcc/x86_64-unknown-linux-gnu/4.6.1/../../../../include/c++/4.6.1/ios:42,
                 from /n/sw/gcc-4.6.1/lib/gcc/x86_64-unknown-linux-gnu/4.6.1/../../../../include/c++/4.6.1/ostream:40,
                 from /n/sw/gcc-4.6.1/lib/gcc/x86_64-unknown-linux-gnu/4.6.1/../../../../include/c++/4.6.1/iostream:40,
                 from RBGL.hpp:7,
                 from bbc.cpp:1:
/n/sw/gcc-4.6.1/lib/gcc/x86_64-unknown-linux-gnu/4.6.1/../../../../include/c++/4.6.1/x86_64-unknown-linux-gnu/bits/c++locale.h:53:23: error: ‘uselocale’ was not declared in this scope
/n/sw/gcc-4.6.1/lib/gcc/x86_64-unknown-linux-gnu/4.6.1/../../../../include/c++/4.6.1/x86_64-unknown-linux-gnu/bits/c++locale.h:53:45: error: invalid type in declaration before ‘;’ token
/n/sw/gcc-4.6.1/lib/gcc/x86_64-unknown-linux-gnu/4.6.1/../../../../include/c++/4.6.1/x86_64-unknown-linux-gnu/bits/c++locale.h: In function ‘int std::__convert_from_v(__locale_struct* const&, char*, int, const char*, ...)’:
/n/sw/gcc-4.6.1/lib/gcc/x86_64-unknown-linux-gnu/4.6.1/../../../../include/c++/4.6.1/x86_64-unknown-linux-gnu/bits/c++locale.h:76:53: error: ‘__gnu_cxx::__uselocale’ cannot be used as a function
/n/sw/gcc-4.6.1/lib/gcc/x86_64-unknown-linux-gnu/4.6.1/../../../../include/c++/4.6.1/x86_64-unknown-linux-gnu/bits/c++locale.h:101:33: error: ‘__gnu_cxx::__uselocale’ cannot be used as a function
In file included from /usr/include/stdio.h:929:0,
                 from /n/sw/gcc-4.6.1/lib/gcc/x86_64-unknown-linux-gnu/4.6.1/../../../../include/c++/4.6.1/cstdio:44,
                 from RBGL.hpp:8,
                 from bbc.cpp:1:
/usr/include/bits/stdio.h: In function ‘__ssize_t getline(char**, size_t*, FILE*)’:
/usr/include/bits/stdio.h:118:52: error: ‘__getdelim’ was not declared in this scope
make: *** [bbc.o] Error 1
ERROR: compilation failed for package ‘RBGL’



> sessionInfo()
R version 3.0.2 (2013-09-25)
Platform: x86_64-unknown-linux-gnu (64-bit)

 [1] LC_CTYPE=en_US.UTF-8       LC_NUMERIC=C               LC_TIME=en_US.UTF-8       
 [7] LC_PAPER=en_US.UTF-8       LC_NAME=C                  LC_ADDRESS=C              

attached base packages:
[1] stats     graphics  grDevices utils     datasets  methods   base     

other attached packages:
[1] BiocInstaller_1.12.1 graph_1.40.1        

loaded via a namespace (and not attached):
[1] BiocGenerics_0.8.0 parallel_3.0.2     stats4_3.0.2       tools_3.0.2    

ADD COMMENTlink modified 4.3 years ago • written 4.3 years ago by agroff0

Do you know if there has been trouble on this cluster compiling packages containing C++ code that uses #include <iostream>? I think there's a mismatch in your version of gcc and libc or you have a bad install of gcc. More specifically, I think the gcc you get when you compile was built with an outdated version of c++locale.h. And I think all the errors in the output you included come from the same issue, not just the boldface one.

As a shortcut to making a package to eliminate the RBGL package as the culprit, could you install the inline package, and run

f = inline::cxxfunction(includes="#include <iostream>", body='printf("%d.%d.%d\\n", __GNUC__, __GNUC_MINOR__, __GNUC_PATCHLEVEL__); return R_NilValue;')

and then call f()? I predict it won't let you compile. That indicates something amiss with the gcc you get on your cluster. In that case:

  1. Talk to your sysadmin
  2. If that doesn't work, see if you can find an alternative gcc on the system, and use a personal Makevars to point to it; see 6.3.3 in R Installation and Administration (and note in the section above that where you use CC and CXX to point to your C and C++ compilers, respectively).

As a shot in the dark, before other shenanigans, get the RBGL source tarball, untar and try adding PKG_CPPFLAGS=-D_GNU_SOURCE on a new line in RBGL/src/Makevars. Try running R CMD INSTALL on that source directory. Note that unlike the HOME/.R/Makevars mentioned above you can't specify compilers in a package-level Makevars file, so don't try setting CC/CXX in the RBGL package.

ADD REPLYlink modified 4.3 years ago • written 4.3 years ago by Nathaniel Hayden180
Please log in to add an answer.


Use of this site constitutes acceptance of our User Agreement and Privacy Policy.
Powered by Biostar version 16.09
Traffic: 125 users visited in the last hour