MarioniLab / scran

Clone of the Bioconductor repository for the scran package.
https://bioconductor.org/packages/devel/bioc/html/scran.html
40 stars 22 forks source link

problem about "BOOST_CONSTEXPR" while installing the scran package #47

Closed ghost closed 4 years ago

ghost commented 4 years ago

I'm trying to install scran with command: BiocManager::install("scran")

And then this ERROR came out:

In file included from /xxx/xxx/rpackages/BH/include/boost/utility.hpp(22),
                 from /xxx/xxx/rpackages/BH/include/boost/range/size.hpp(25),
                 from /xxx/xxx/rpackages/BH/include/boost/random/hyperexponential_distribution.hpp(29),
                 from /xxx/xxx/rpackages/BH/include/boost/random.hpp(69),
                 from rand_custom.h(6),
                 from compute_rho_null.cpp(4):
/xxx/xxx/rpackages/BH/include/boost/core/noncopyable.hpp(42): error: defaulted default constructor cannot be constexpr because the corresponding implicitly declared default constructor would not be constexpr
        BOOST_CONSTEXPR noncopyable() = default;
                        ^

compilation aborted for compute_rho_null.cpp (code 2)
make: *** [compute_rho_null.o] Error 2
ERROR: compilation failed for package ‘scran’

I tried reinstalling the 'BH' pacakge and it didn't solve the problem. I really don't know how to solve the problem.

My R version is R version 3.6.0 (2019-04-26) -- "Planting of a Tree" Copyright (C) 2019 The R Foundation for Statistical Computing Platform: x86_64-pc-linux-gnu (64-bit)

Many thanks for any suggestions.

LTLA commented 4 years ago

I would guess that your version GCC is too old and does not have full support for C++11. What does gcc -v say?

ghost commented 4 years ago

Thank you for your reply!

I pasted the message after typing gcc -v as below:

Using built-in specs.
COLLECT_GCC=gcc
COLLECT_LTO_WRAPPER=/usr/libexec/gcc/x86_64-redhat-linux/4.8.5/lto-wrapper
Target: x86_64-redhat-linux
Configured with: ../configure --prefix=/usr --mandir=/usr/share/man --infodir=/usr/share/info --with-bugurl=http://bugzilla.redhat.com/bugzilla --enable-bootstrap --enable-shared --enable-threads=posix --enable-checking=release --with-system-zlib --enable-__cxa_atexit --disable-libunwind-exceptions --enable-gnu-unique-object --enable-linker-build-id --with-linker-hash-style=gnu --enable-languages=c,c++,objc,obj-c++,java,fortran,ada,go,lto --enable-plugin --enable-initfini-array --disable-libgcj --with-isl=/builddir/build/BUILD/gcc-4.8.5-20150702/obj-x86_64-redhat-linux/isl-install --with-cloog=/builddir/build/BUILD/gcc-4.8.5-20150702/obj-x86_64-redhat-linux/cloog-install --enable-gnu-indirect-function --with-tune=generic --with-arch_32=x86-64 --build=x86_64-redhat-linux
Thread model: posix
gcc version 4.8.5 20150623 (Red Hat 4.8.5-36) (GCC) 
LTLA commented 4 years ago

That's interesting. GCC 4.8.5 should be C++11-compliant.

Just to be safe, make sure you're installing for BioC 3.10 (scran version 1.14.0). And make sure BiocManager::valid() doesn't flag any problems.

It would also be helpful to see the full, unmodified installation log for BiocManager::install('scran').

ghost commented 4 years ago

I found my R version was 3.6.0. I just upgraded the R version into 3.6.1 and used 'BiocManager' to upgrade all the r packages. Now I successfully installed the scran pacakge! Thank you so much!