error when installing beachmat
3
0
Entering edit mode
j.xu3 • 0
@jxu3-14605
Last seen 7.0 years ago

when I tried to install beachmat under gcc/7.2.0 and R/3.4.1, I got below error messages, please kindly help:

LANGUAGE_DETECTION = ['en']

> biocLite("beachmat")

BioC_mirror: https://bioconductor.org

Using Bioconductor 3.6 (BiocInstaller 1.28.0), R 3.4.1 (2017-06-30).

Installing package(s) 'beachmat'

trying URL 'https://bioconductor.org/packages/3.6/bioc/src/contrib/beachmat_1.0.2.tar.gz'

Content type 'application/x-gzip' length 75131 bytes (73 KB)

==================================================

downloaded 73 KB

 

* installing *source* package 'beachmat' ...

** libs

g++ -std=gnu++0x -I/opt/Modules/R/3.4.1/lib64/R/include -DNDEBUG  -I"/home/jun.xu/R/x86_64-pc-linux-gnu-library/3.4/Rcpp/include" -I"/home/jun.xu/R/x86_64-pc-linux-gnu-library/3.4/Rhdf5lib/include" -I/opt/Modules/pcre/8.40/include -I/opt/Modules/xz/5.2.3/include -I/opt/Modules/bzip2/1.0.6/include -I/opt/Modules/zlib/1.2.11/include   -fpic  -g -O2 -c HDF5_utils.cpp -o HDF5_utils.o

g++ -std=gnu++0x -I/opt/Modules/R/3.4.1/lib64/R/include -DNDEBUG  -I"/home/jun.xu/R/x86_64-pc-linux-gnu-library/3.4/Rcpp/include" -I"/home/jun.xu/R/x86_64-pc-linux-gnu-library/3.4/Rhdf5lib/include" -I/opt/Modules/pcre/8.40/include -I/opt/Modules/xz/5.2.3/include -I/opt/Modules/bzip2/1.0.6/include -I/opt/Modules/zlib/1.2.11/include   -fpic  -g -O2 -c any_matrix.cpp -o any_matrix.o

g++ -std=gnu++0x -I/opt/Modules/R/3.4.1/lib64/R/include -DNDEBUG  -I"/home/jun.xu/R/x86_64-pc-linux-gnu-library/3.4/Rcpp/include" -I"/home/jun.xu/R/x86_64-pc-linux-gnu-library/3.4/Rhdf5lib/include" -I/opt/Modules/pcre/8.40/include -I/opt/Modules/xz/5.2.3/include -I/opt/Modules/bzip2/1.0.6/include -I/opt/Modules/zlib/1.2.11/include   -fpic  -g -O2 -c character_matrix.cpp -o character_matrix.o

g++ -std=gnu++0x -I/opt/Modules/R/3.4.1/lib64/R/include -DNDEBUG  -I"/home/jun.xu/R/x86_64-pc-linux-gnu-library/3.4/Rcpp/include" -I"/home/jun.xu/R/x86_64-pc-linux-gnu-library/3.4/Rhdf5lib/include" -I/opt/Modules/pcre/8.40/include -I/opt/Modules/xz/5.2.3/include -I/opt/Modules/bzip2/1.0.6/include -I/opt/Modules/zlib/1.2.11/include   -fpic  -g -O2 -c character_output.cpp -o character_output.o

g++ -std=gnu++0x -I/opt/Modules/R/3.4.1/lib64/R/include -DNDEBUG  -I"/home/jun.xu/R/x86_64-pc-linux-gnu-library/3.4/Rcpp/include" -I"/home/jun.xu/R/x86_64-pc-linux-gnu-library/3.4/Rhdf5lib/include" -I/opt/Modules/pcre/8.40/include -I/opt/Modules/xz/5.2.3/include -I/opt/Modules/bzip2/1.0.6/include -I/opt/Modules/zlib/1.2.11/include   -fpic  -g -O2 -c find_chunks.cpp -o find_chunks.o

g++ -std=gnu++0x -I/opt/Modules/R/3.4.1/lib64/R/include -DNDEBUG  -I"/home/jun.xu/R/x86_64-pc-linux-gnu-library/3.4/Rcpp/include" -I"/home/jun.xu/R/x86_64-pc-linux-gnu-library/3.4/Rhdf5lib/include" -I/opt/Modules/pcre/8.40/include -I/opt/Modules/xz/5.2.3/include -I/opt/Modules/bzip2/1.0.6/include -I/opt/Modules/zlib/1.2.11/include   -fpic  -g -O2 -c functions.cpp -o functions.o

g++ -std=gnu++0x -I/opt/Modules/R/3.4.1/lib64/R/include -DNDEBUG  -I"/home/jun.xu/R/x86_64-pc-linux-gnu-library/3.4/Rcpp/include" -I"/home/jun.xu/R/x86_64-pc-linux-gnu-library/3.4/Rhdf5lib/include" -I/opt/Modules/pcre/8.40/include -I/opt/Modules/xz/5.2.3/include -I/opt/Modules/bzip2/1.0.6/include -I/opt/Modules/zlib/1.2.11/include   -fpic  -g -O2 -c integer_matrix.cpp -o integer_matrix.o

g++ -std=gnu++0x -I/opt/Modules/R/3.4.1/lib64/R/include -DNDEBUG  -I"/home/jun.xu/R/x86_64-pc-linux-gnu-library/3.4/Rcpp/include" -I"/home/jun.xu/R/x86_64-pc-linux-gnu-library/3.4/Rhdf5lib/include" -I/opt/Modules/pcre/8.40/include -I/opt/Modules/xz/5.2.3/include -I/opt/Modules/bzip2/1.0.6/include -I/opt/Modules/zlib/1.2.11/include   -fpic  -g -O2 -c logical_matrix.cpp -o logical_matrix.o

g++ -std=gnu++0x -I/opt/Modules/R/3.4.1/lib64/R/include -DNDEBUG  -I"/home/jun.xu/R/x86_64-pc-linux-gnu-library/3.4/Rcpp/include" -I"/home/jun.xu/R/x86_64-pc-linux-gnu-library/3.4/Rhdf5lib/include" -I/opt/Modules/pcre/8.40/include -I/opt/Modules/xz/5.2.3/include -I/opt/Modules/bzip2/1.0.6/include -I/opt/Modules/zlib/1.2.11/include   -fpic  -g -O2 -c numeric_matrix.cpp -o numeric_matrix.o

g++ -std=gnu++0x -I/opt/Modules/R/3.4.1/lib64/R/include -DNDEBUG  -I"/home/jun.xu/R/x86_64-pc-linux-gnu-library/3.4/Rcpp/include" -I"/home/jun.xu/R/x86_64-pc-linux-gnu-library/3.4/Rhdf5lib/include" -I/opt/Modules/pcre/8.40/include -I/opt/Modules/xz/5.2.3/include -I/opt/Modules/bzip2/1.0.6/include -I/opt/Modules/zlib/1.2.11/include   -fpic  -g -O2 -c output_param.cpp -o output_param.o

g++ -std=gnu++0x -I/opt/Modules/R/3.4.1/lib64/R/include -DNDEBUG  -I"/home/jun.xu/R/x86_64-pc-linux-gnu-library/3.4/Rcpp/include" -I"/home/jun.xu/R/x86_64-pc-linux-gnu-library/3.4/Rhdf5lib/include" -I/opt/Modules/pcre/8.40/include -I/opt/Modules/xz/5.2.3/include -I/opt/Modules/bzip2/1.0.6/include -I/opt/Modules/zlib/1.2.11/include   -fpic  -g -O2 -c repacker.cpp -o repacker.o

g++ -std=gnu++0x -I/opt/Modules/R/3.4.1/lib64/R/include -DNDEBUG  -I"/home/jun.xu/R/x86_64-pc-linux-gnu-library/3.4/Rcpp/include" -I"/home/jun.xu/R/x86_64-pc-linux-gnu-library/3.4/Rhdf5lib/include" -I/opt/Modules/pcre/8.40/include -I/opt/Modules/xz/5.2.3/include -I/opt/Modules/bzip2/1.0.6/include -I/opt/Modules/zlib/1.2.11/include   -fpic  -g -O2 -c utils.cpp -o utils.o

g++ -std=gnu++0x -shared -L/opt/Modules/pcre/8.40/lib -L/opt/Modules/xz/5.2.3/lib -L/opt/Modules/bzip2/1.0.6/lib -L/opt/Modules/zlib/1.2.11/lib -o beachmat.so HDF5_utils.o any_matrix.o character_matrix.o character_output.o find_chunks.o functions.o integer_matrix.o logical_matrix.o numeric_matrix.o output_param.o repacker.o utils.o /home/jun.xu/R/x86_64-pc-linux-gnu-library/3.4/Rhdf5lib/lib/libhdf5_cpp.a /home/jun.xu/R/x86_64-pc-linux-gnu-library/3.4/Rhdf5lib/lib/libhdf5.a /home/jun.xu/R/x86_64-pc-linux-gnu-library/3.4/Rhdf5lib/lib/libsz.a

ar rc libbeachmat.a any_matrix.o character_matrix.o character_output.o integer_matrix.o logical_matrix.o numeric_matrix.o utils.o HDF5_utils.o output_param.o

g++ -std=gnu++0x -shared -L/opt/Modules/pcre/8.40/lib -L/opt/Modules/xz/5.2.3/lib -L/opt/Modules/bzip2/1.0.6/lib -L/opt/Modules/zlib/1.2.11/lib -o libbeachmat.so any_matrix.o character_matrix.o character_output.o integer_matrix.o logical_matrix.o numeric_matrix.o utils.o HDF5_utils.o output_param.o `echo 'Rhdf5lib::pkgconfig("PKG_CXX_LIBS")'| "/opt/Modules/R/3.4.1/lib64/R/bin/R" --vanilla --slave` 

mkdir -p "/home/jun.xu/R/x86_64-pc-linux-gnu-library/3.4/beachmat/lib" "/home/jun.xu/R/x86_64-pc-linux-gnu-library/3.4/beachmat/include/beachmat"

cp any_matrix.h utils.h beachmat.h HDF5_utils.h output_param.h Psymm_matrix.h HDF5_matrix.h Csparse_matrix.h dense_matrix.h simple_matrix.h Rle_matrix.h Input_matrix.h simple_output.h Csparse_output.h HDF5_output.h Output_matrix.h LIN_matrix.h LIN_methods.h LIN_output.h LIN_outfun.h logical_matrix.h integer_matrix.h character_matrix.h numeric_matrix.h character_output.h   "/home/jun.xu/R/x86_64-pc-linux-gnu-library/3.4/beachmat/include/beachmat"

mv libbeachmat.* "/home/jun.xu/R/x86_64-pc-linux-gnu-library/3.4/beachmat/lib"

installing to /home/jun.xu/R/x86_64-pc-linux-gnu-library/3.4/beachmat/libs

** R

** inst

** preparing package for lazy loading

** help

*** installing help indices

** building package indices

** installing vignettes

** testing if installed package can be loaded

Error: package or namespace load failed for 'beachmat' in dyn.load(file, DLLpath = DLLpath, ...):

 unable to load shared object '/home/jun.xu/R/x86_64-pc-linux-gnu-library/3.4/beachmat/libs/beachmat.so':

  /home/jun.xu/R/x86_64-pc-linux-gnu-library/3.4/beachmat/libs/beachmat.so: undefined symbol: _ZN2H56H5FileC1ERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEjRKNS_17FileCreatPropListERKNS_15FileAccPropListE

Error: loading failed

Execution halted

ERROR: loading failed

* removing '/home/jun.xu/R/x86_64-pc-linux-gnu-library/3.4/beachmat'

 

The downloaded source packages are in

    '/ram/tmp/RtmpQo1dlw/downloaded_packages'

installation path not writeable, unable to update packages: Matrix, backports,

  boot, crayon, curl, debugme, desc, devtools, httr, mgcv, openssl, rlang,

  rstudioapi, withr

Warning message:

In install.packages(pkgs = doing, lib = lib, ...) :

  installation of package 'beachmat' had non-zero exit status

 

sessionInfo():

R version 3.4.1 (2017-06-30)

Platform: x86_64-pc-linux-gnu (64-bit)

Running under: CentOS release 6.9 (Final)

 

Matrix products: default

BLAS: /opt/Modules/R/3.4.1/lib64/R/lib/libRblas.so

LAPACK: /opt/Modules/R/3.4.1/lib64/R/lib/libRlapack.so

 

locale:

[1] C

 

attached base packages:

[1] stats     graphics  grDevices utils     datasets  methods   base     

 

other attached packages:

[1] BiocInstaller_1.28.0

 

loaded via a namespace (and not attached):

[1] compiler_3.4.1 tools_3.4.1   

 

 

beachmat scater • 2.0k views
ADD COMMENT
0
Entering edit mode

Let's try to see if this is a Rhdf5lib problem or a beachmat problem. Does the following work?

devtools::install_github("grimbough/usingRhdf5lib")
library(usingRhdf5lib)
create_dataset(lang="C++")

If it runs without errors, then it's a beachmat problem; otherwise, it's an Rhdf5lib problem.

ADD REPLY
0
Entering edit mode
Aaron Lun ★ 28k
@alun
Last seen 3 hours ago
The city by the bay

Having pondered this further, I am willing to bet that it is a C++11 issue. Demangling the missing name gives:

H5::H5File::H5File(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&,
    unsigned int, H5::FileCreatPropList const&, H5::FileAccPropList const&)

... indicating that the H5File constructor using a std::string cannot be found. Note the __cxx11, which indicates that we're looking for the version of the constructor that accepts C++11-implemented strings.

Now, Rhdf5lib was built using the C++03 standard by default, as C++11 was not explicitly requested. In my (and BioC's) compilers, it seems that the default is to use a binary interface that automatically includes C++11-compatible implementations. This means that the C++11 code in beachmat can successfully link to the C++03 (but C++11-compatible) code in Rhdf5lib.

However, there seem to be at least a few compilers/configurations in which this is not the case:

https://gcc.gnu.org/onlinedocs/libstdc++/manual/using_dual_abi.html

... which is the likely origin of the bug. I'm not entirely sure how to change this, I suppose putting:

CXXFLAGS="--with-default-libstdcxx-abi=cxx11"

... in your ~/.R/Makevars might help? We could also eliminate the use of std::strings into HDF5 functions on our end.

ADD COMMENT
0
Entering edit mode

I couldn't reproduce the ABI issues on my end, so I settled for the second option (eliminating std::strings). Try:

devtools::install_github("LTLA/beachmat@debugger2")

... and see if that installs correctly on your machine. Or at least gives a different error message.

ADD REPLY
0
Entering edit mode
j.xu3 • 0
@jxu3-14605
Last seen 7.0 years ago

got it fixed - reinstall all other packages from scratch.

the reason might be a mix of gcc version in compiling different installations.

 

ADD COMMENT
0
Entering edit mode

Differences in GCC versions could definitely cause this, though it implies that there was an update to your GCC in between the installation of Rhdf5lib and beachmat. This doesn't seem like something you would do accidentally - I've always felt that admins and package managers are very conservative about updating GCC, specifically to avoid the issues that we've observed here.

ADD REPLY

Login before adding your answer.

Traffic: 695 users visited in the last hour
Help About
FAQ
Access RSS
API
Stats

Use of this site constitutes acceptance of our User Agreement and Privacy Policy.

Powered by the version 2.3.6