I got the following error message during mosbi installation (both gihub and bioconductor install).
g++ -std=gnu++11 -I"/usr/local/lib64/R/include" -DNDEBUG -I'/usr/local/lib64/R/library/Rcpp/include' -I'/usr/local/lib64/R/library/BH/include' -I'/usr/local/lib64/R/library/RcppParallel/include' -I/usr/local/include -c network_edge_strength.cpp -o network_edge_strength.o
network_edge_strength.cpp: In member function ‘virtual void ReplaceWorker::operator()(std::size_t, std::size_t)’:
network_edge_strength.cpp:153:40: error: parameter declared ‘auto’
[this] (const auto& x) { return x < th ? 0 : 1; });
^
network_edge_strength.cpp: In lambda function:
network_edge_strength.cpp:153:52: error: ‘x’ was not declared in this scope
[this] (const auto& x) { return x < th ? 0 : 1; });
^
In file included from /usr/include/c++/4.8.2/algorithm:62:0,
from /usr/local/lib64/R/library/RcppParallel/include/tbb/concurrent_vector.h:30,
from /usr/local/lib64/R/library/RcppParallel/include/tbb/enumerable_thread_specific.h:21,
from /usr/local/lib64/R/library/RcppParallel/include/tbb/combinable.h:20,
from /usr/local/lib64/R/library/RcppParallel/include/tbb/tbb.h:40,
from /usr/local/lib64/R/library/RcppParallel/include/RcppParallel/TBB.h:10,
from /usr/local/lib64/R/library/RcppParallel/include/RcppParallel.h:21,
from network_edge_strength.cpp:2:
/usr/include/c++/4.8.2/bits/stl_algo.h: In instantiation of ‘_OIter std::transform(_IIter, _IIter, _OIter, _UnaryOperation) [with _IIter = const double*; _OIter = double*; _UnaryOperation = ReplaceWorker::operator()(std::size_t, std::size_t)::__lambda1]’:
network_edge_strength.cpp:153:69: required from here
/usr/include/c++/4.8.2/bits/stl_algo.h:4926:33: error: no match for call to ‘(ReplaceWorker::operator()(std::size_t, std::size_t)::__lambda1) (const double&)’
__result = __unary_op(__first);
^
network_edge_strength.cpp:153:25: note: candidate is:
[this] (const auto& x) { return x < th ? 0 : 1; });
^
network_edge_strength.cpp:153:41: note: ReplaceWorker::operator()(std::size_t, std::size_t)::__lambda1
[this] (const auto& x) { return x < th ? 0 : 1; });
^
network_edge_strength.cpp:153:41: note: candidate expects 0 arguments, 1 provided
make: *** [network_edge_strength.o] Error 1
ERROR: compilation failed for package ‘mosbi’
- removing ‘/usr/local/lib64/R/library/mosbi’
Warning message:
In i.p(...) :
installation of package ‘/tmp/Rtmp6fNfBD/file1675817580259/mosbi_1.1.10.tar.gz’ had non-zero exit status
> sessionInfo()
R version 4.2.0 (2022-04-22)
Platform: x86_64-pc-linux-gnu (64-bit)
Running under: CentOS Linux 7 (Core)
Matrix products: default
BLAS: /usr/local/lib64/R/lib/libRblas.so
LAPACK: /usr/local/lib64/R/lib/libRlapack.so
locale:
[1] LC_CTYPE=en_US.UTF-8 LC_NUMERIC=C
[3] LC_TIME=en_US.UTF-8 LC_COLLATE=en_US.UTF-8
[5] LC_MONETARY=en_US.UTF-8 LC_MESSAGES=en_US.UTF-8
[7] LC_PAPER=en_US.UTF-8 LC_NAME=C
[9] LC_ADDRESS=C LC_TELEPHONE=C
[11] LC_MEASUREMENT=en_US.UTF-8 LC_IDENTIFICATION=C
attached base packages:
[1] stats graphics grDevices utils datasets methods base
loaded via a namespace (and not attached):
[1] magrittr_2.0.3 usethis_2.1.6 devtools_2.4.3
[4] pkgload_1.2.4 R6_2.5.1 rlang_1.0.2
[7] fastmap_1.1.0 tcltk_4.2.0 tools_4.2.0
[10] pkgbuild_1.3.1 sessioninfo_1.2.2 cli_3.3.0
[13] withr_2.5.0 ellipsis_0.3.2 remotes_2.4.2
[16] rprojroot_2.0.3 lifecycle_1.0.1 crayon_1.5.1
[19] brio_1.1.3 processx_3.6.0 purrr_0.3.4
[22] BiocManager_1.30.18 callr_3.7.0 fs_1.5.2
[25] ps_1.7.0 curl_4.3.2 testthat_3.1.4
[28] memoise_2.0.1 glue_1.6.2 cachem_1.0.6
[31] compiler_4.2.0 desc_1.4.1 prettyunits_1.1.1