0

CentOS7のローカルディレクトリ(/home/ikutsu/Tsuchiya_NGS/local)にインストールしたR-4.4.1を使用して、生物情報学的な解析を行っています。root権限がないのでgcc-13.2.0やcurl-8.10.1などをRと同じくローカルディレクトリにソースからビルドして使っています。

BioconductorというツールのBiocNeighborsパッケージをインストールするとエラーが出ます。c, c++には詳しくないのですが、恐らくc++ compilerの問題です。環境変数を色々といじっていますが解決の兆しがありません。BiocNeighborsパッケージ以外のR,Bioconductorのパッケージはこのようなエラーが出ることなくインストールできています。

PKG_CONFIG_PATH=/home/ikutsu/Tsuchiya_NGS/local/lib/pkgconfig
CC=/home/ikutsu/Tsuchiya_NGS/local/bin/gcc
CXX=/home/ikutsu/Tsuchiya_NGS/local/bin/g++
CFLAGS="-I/home/ikutsu/Tsuchiya_NGS/local/include"
LDFLAGS="-L/home/ikutsu/Tsuchiya_NGS/local/lib"
LD_LIBRARY_PATH=/home/ikutsu/Tsuchiya_NGS/local/lib:/home/ikutsu/Tsuchiya_NGS/local/lib64
PATH=/home/ikutsu/Tsuchiya_NGS/local/bin:/usr/local/bin:/usr/bin:/usr/local/sbin:/usr/sbin:/opt/ibutils/bin
> BiocManager::install("BiocNeighbors")
Bioconductor version 3.20 (BiocManager 1.30.25), R 4.4.1 (2024-06-14)
Installing package(s) 'BiocNeighbors'
trying URL 'https://bioconductor.org/packages/3.20/bioc/src/contrib/BiocNeighbors_2.0.0.tar.gz'
Content type 'application/x-gzip' length 338928 bytes (330 KB)
==================================================
downloaded 330 KB

* installing *source* package ‘BiocNeighbors’ ...
** package ‘BiocNeighbors’ successfully unpacked and MD5 sums checked
** using staged installation
** libs
using C++ compiler: ‘g++ (GCC) 13.2.0’
using C++17
/home/ikutsu/Tsuchiya_NGS/local/bin/g++ -std=gnu++17 -fPIC -std=gnu++17 -I"/home/ikutsu/Tsuchiya_NGS/local/lib64/R/include" -DNDEBUG -I../inst/include -I'/home/ikutsu/Tsuchiya_NGS/local/lib64/R/library/Rcpp/include' -I'/home/ikutsu/Tsuchiya_NGS/local/lib64/R/library/assorthead/include' -I/home/ikutsu/Tsuchiya_NGS/local/include    -fpic  -g -O2   -c RcppExports.cpp -o RcppExports.o
/home/ikutsu/Tsuchiya_NGS/local/bin/g++ -std=gnu++17 -fPIC -std=gnu++17 -I"/home/ikutsu/Tsuchiya_NGS/local/lib64/R/include" -DNDEBUG -I../inst/include -I'/home/ikutsu/Tsuchiya_NGS/local/lib64/R/library/Rcpp/include' -I'/home/ikutsu/Tsuchiya_NGS/local/lib64/R/library/assorthead/include' -I/home/ikutsu/Tsuchiya_NGS/local/include    -fpic  -g -O2   -c annoy.cpp -o annoy.o
/home/ikutsu/Tsuchiya_NGS/local/bin/g++ -std=gnu++17 -fPIC -std=gnu++17 -I"/home/ikutsu/Tsuchiya_NGS/local/lib64/R/include" -DNDEBUG -I../inst/include -I'/home/ikutsu/Tsuchiya_NGS/local/lib64/R/library/Rcpp/include' -I'/home/ikutsu/Tsuchiya_NGS/local/lib64/R/library/assorthead/include' -I/home/ikutsu/Tsuchiya_NGS/local/include    -fpic  -g -O2   -c exhaustive.cpp -o exhaustive.o
/home/ikutsu/Tsuchiya_NGS/local/bin/g++ -std=gnu++17 -fPIC -std=gnu++17 -I"/home/ikutsu/Tsuchiya_NGS/local/lib64/R/include" -DNDEBUG -I../inst/include -I'/home/ikutsu/Tsuchiya_NGS/local/lib64/R/library/Rcpp/include' -I'/home/ikutsu/Tsuchiya_NGS/local/lib64/R/library/assorthead/include' -I/home/ikutsu/Tsuchiya_NGS/local/include    -fpic  -g -O2   -c find_mutual_nns.cpp -o find_mutual_nns.o
/home/ikutsu/Tsuchiya_NGS/local/bin/g++ -std=gnu++17 -fPIC -std=gnu++17 -I"/home/ikutsu/Tsuchiya_NGS/local/lib64/R/include" -DNDEBUG -I../inst/include -I'/home/ikutsu/Tsuchiya_NGS/local/lib64/R/library/Rcpp/include' -I'/home/ikutsu/Tsuchiya_NGS/local/lib64/R/library/assorthead/include' -I/home/ikutsu/Tsuchiya_NGS/local/include    -fpic  -g -O2   -c generics.cpp -o generics.o
In file included from /home/ikutsu/Tsuchiya_NGS/local/include/c++/13.2.0/bits/c++allocator.h:33,
                 from /home/ikutsu/Tsuchiya_NGS/local/include/c++/13.2.0/bits/allocator.h:46,
                 from /home/ikutsu/Tsuchiya_NGS/local/include/c++/13.2.0/bits/alloc_traits.h:39,
                 from /home/ikutsu/Tsuchiya_NGS/local/include/c++/13.2.0/ext/alloc_traits.h:34,
                 from /home/ikutsu/Tsuchiya_NGS/local/include/c++/13.2.0/bits/hashtable_policy.h:39,
                 from /home/ikutsu/Tsuchiya_NGS/local/include/c++/13.2.0/bits/hashtable.h:35,
                 from /home/ikutsu/Tsuchiya_NGS/local/include/c++/13.2.0/bits/unordered_map.h:33,
                 from /home/ikutsu/Tsuchiya_NGS/local/include/c++/13.2.0/unordered_map:41,
                 from /home/ikutsu/Tsuchiya_NGS/local/lib64/R/library/Rcpp/include/Rcpp/platform/compiler.h:153,
                 from /home/ikutsu/Tsuchiya_NGS/local/lib64/R/library/Rcpp/include/Rcpp/r/headers.h:66,
                 from /home/ikutsu/Tsuchiya_NGS/local/lib64/R/library/Rcpp/include/RcppCommon.h:30,
                 from /home/ikutsu/Tsuchiya_NGS/local/lib64/R/library/Rcpp/include/Rcpp.h:27,
                 from generics.cpp:1:
/home/ikutsu/Tsuchiya_NGS/local/include/c++/13.2.0/bits/new_allocator.h: In instantiation of ‘void std::__new_allocator<_Tp>::construct(_Up*, _Args&& ...) [with _Up = std::thread; _Args = {generic_find_knn(SEXP, Rcpp::IntegerVector, bool, Rcpp::Nullable<Rcpp::Vector<13> >, int, bool, bool, bool)::<lambda(int, int)>&, int&, int&}; _Tp = std::thread]’:
/home/ikutsu/Tsuchiya_NGS/local/include/c++/13.2.0/bits/alloc_traits.h:537:17:   required from ‘static void std::allocator_traits<std::allocator<_Tp1> >::construct(allocator_type&, _Up*, _Args&& ...) [with _Up = std::thread; _Args = {generic_find_knn(SEXP, Rcpp::IntegerVector, bool, Rcpp::Nullable<Rcpp::Vector<13> >, int, bool, bool, bool)::<lambda(int, int)>&, int&, int&}; _Tp = std::thread; allocator_type = std::allocator<std::thread>]’
/home/ikutsu/Tsuchiya_NGS/local/include/c++/13.2.0/bits/vector.tcc:117:30:   required from ‘std::vector<_Tp, _Alloc>::reference std::vector<_Tp, _Alloc>::emplace_back(_Args&& ...) [with _Args = {generic_find_knn(SEXP, Rcpp::IntegerVector, bool, Rcpp::Nullable<Rcpp::Vector<13> >, int, bool, bool, bool)::<lambda(int, int)>&, int&, int&}; _Tp = std::thread; _Alloc = std::allocator<std::thread>; reference = std::thread&]’
parallel.h:26:26:   required from ‘void generic_parallelize(Index_, int, Function_) [with Index_ = int; Function_ = generic_find_knn(SEXP, Rcpp::IntegerVector, bool, Rcpp::Nullable<Rcpp::Vector<13> >, int, bool, bool, bool)::<lambda(int, int)>]’
generics.cpp:148:24:   required from here
/home/ikutsu/Tsuchiya_NGS/local/include/c++/13.2.0/bits/new_allocator.h:187:11: error: no matching function for call to ‘std::thread::thread(generic_find_knn(SEXP, Rcpp::IntegerVector, bool, Rcpp::Nullable<Rcpp::Vector<13> >, int, bool, bool, bool)::<lambda(int, int)>&, int&, int&)’
  187 |         { ::new((void *)__p) _Up(std::forward<_Args>(__args)...); }
      |           ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
In file included from /home/ikutsu/Tsuchiya_NGS/local/include/c++/13.2.0/thread:45,
                 from /home/ikutsu/Tsuchiya_NGS/local/lib64/R/library/assorthead/include/subpar/range.hpp:9,
                 from /home/ikutsu/Tsuchiya_NGS/local/lib64/R/library/assorthead/include/subpar/subpar.hpp:4,
                 from /home/ikutsu/Tsuchiya_NGS/local/lib64/R/library/assorthead/include/kmeans/parallelize.hpp:10,
                 from /home/ikutsu/Tsuchiya_NGS/local/lib64/R/library/assorthead/include/kmeans/InitializeKmeanspp.hpp:14,
                 from /home/ikutsu/Tsuchiya_NGS/local/lib64/R/library/assorthead/include/kmeans/kmeans.hpp:9,
                 from /home/ikutsu/Tsuchiya_NGS/local/lib64/R/library/assorthead/include/knncolle/Kmknn.hpp:11,
                 from /home/ikutsu/Tsuchiya_NGS/local/lib64/R/library/assorthead/include/knncolle/knncolle.hpp:13,
                 from ../inst/include/BiocNeighbors.h:6,
                 from generics.cpp:2:
/home/ikutsu/Tsuchiya_NGS/local/include/c++/13.2.0/bits/std_thread.h:178:5: note: candidate: ‘std::thread::thread(std::thread&&)’
  178 |     thread(thread&& __t) noexcept
      |     ^~~~~~
/home/ikutsu/Tsuchiya_NGS/local/include/c++/13.2.0/bits/std_thread.h:178:5: note:   candidate expects 1 argument, 3 provided
/home/ikutsu/Tsuchiya_NGS/local/include/c++/13.2.0/bits/std_thread.h:132:5: note: candidate: ‘std::thread::thread()’
  132 |     thread() noexcept = default;
      |     ^~~~~~
/home/ikutsu/Tsuchiya_NGS/local/include/c++/13.2.0/bits/std_thread.h:132:5: note:   candidate expects 0 arguments, 3 provided
/home/ikutsu/Tsuchiya_NGS/local/include/c++/13.2.0/bits/new_allocator.h: In instantiation of ‘void std::__new_allocator<_Tp>::construct(_Up*, _Args&& ...) [with _Up = std::thread; _Args = {generic_query_knn(SEXP, Rcpp::NumericMatrix, Rcpp::IntegerVector, bool, int, bool, bool, bool)::<lambda(int, int)>&, int&, int&}; _Tp = std::thread]’:
/home/ikutsu/Tsuchiya_NGS/local/include/c++/13.2.0/bits/alloc_traits.h:537:17:   required from ‘static void std::allocator_traits<std::allocator<_Tp1> >::construct(allocator_type&, _Up*, _Args&& ...) [with _Up = std::thread; _Args = {generic_query_knn(SEXP, Rcpp::NumericMatrix, Rcpp::IntegerVector, bool, int, bool, bool, bool)::<lambda(int, int)>&, int&, int&}; _Tp = std::thread; allocator_type = std::allocator<std::thread>]’
/home/ikutsu/Tsuchiya_NGS/local/include/c++/13.2.0/bits/vector.tcc:117:30:   required from ‘std::vector<_Tp, _Alloc>::reference std::vector<_Tp, _Alloc>::emplace_back(_Args&& ...) [with _Args = {generic_query_knn(SEXP, Rcpp::NumericMatrix, Rcpp::IntegerVector, bool, int, bool, bool, bool)::<lambda(int, int)>&, int&, int&}; _Tp = std::thread; _Alloc = std::allocator<std::thread>; reference = std::thread&]’
parallel.h:26:26:   required from ‘void generic_parallelize(Index_, int, Function_) [with Index_ = int; Function_ = generic_query_knn(SEXP, Rcpp::NumericMatrix, Rcpp::IntegerVector, bool, int, bool, bool, bool)::<lambda(int, int)>]’
generics.cpp:299:24:   required from here
/home/ikutsu/Tsuchiya_NGS/local/include/c++/13.2.0/bits/new_allocator.h:187:11: error: no matching function for call to ‘std::thread::thread(generic_query_knn(SEXP, Rcpp::NumericMatrix, Rcpp::IntegerVector, bool, int, bool, bool, bool)::<lambda(int, int)>&, int&, int&)’
  187 |         { ::new((void *)__p) _Up(std::forward<_Args>(__args)...); }
      |           ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/home/ikutsu/Tsuchiya_NGS/local/include/c++/13.2.0/bits/std_thread.h:178:5: note: candidate: ‘std::thread::thread(std::thread&&)’
  178 |     thread(thread&& __t) noexcept
      |     ^~~~~~
/home/ikutsu/Tsuchiya_NGS/local/include/c++/13.2.0/bits/std_thread.h:178:5: note:   candidate expects 1 argument, 3 provided
/home/ikutsu/Tsuchiya_NGS/local/include/c++/13.2.0/bits/std_thread.h:132:5: note: candidate: ‘std::thread::thread()’
  132 |     thread() noexcept = default;
      |     ^~~~~~
/home/ikutsu/Tsuchiya_NGS/local/include/c++/13.2.0/bits/std_thread.h:132:5: note:   candidate expects 0 arguments, 3 provided
/home/ikutsu/Tsuchiya_NGS/local/include/c++/13.2.0/bits/new_allocator.h: In instantiation of ‘void std::__new_allocator<_Tp>::construct(_Up*, _Args&& ...) [with _Up = std::thread; _Args = {generic_find_all(SEXP, Rcpp::Nullable<Rcpp::Vector<13> >, Rcpp::NumericVector, int, bool, bool)::<lambda(int, int)>&, int&, int&}; _Tp = std::thread]’:
/home/ikutsu/Tsuchiya_NGS/local/include/c++/13.2.0/bits/alloc_traits.h:537:17:   required from ‘static void std::allocator_traits<std::allocator<_Tp1> >::construct(allocator_type&, _Up*, _Args&& ...) [with _Up = std::thread; _Args = {generic_find_all(SEXP, Rcpp::Nullable<Rcpp::Vector<13> >, Rcpp::NumericVector, int, bool, bool)::<lambda(int, int)>&, int&, int&}; _Tp = std::thread; allocator_type = std::allocator<std::thread>]’
/home/ikutsu/Tsuchiya_NGS/local/include/c++/13.2.0/bits/vector.tcc:117:30:   required from ‘std::vector<_Tp, _Alloc>::reference std::vector<_Tp, _Alloc>::emplace_back(_Args&& ...) [with _Args = {generic_find_all(SEXP, Rcpp::Nullable<Rcpp::Vector<13> >, Rcpp::NumericVector, int, bool, bool)::<lambda(int, int)>&, int&, int&}; _Tp = std::thread; _Alloc = std::allocator<std::thread>; reference = std::thread&]’
parallel.h:26:26:   required from ‘void generic_parallelize(Index_, int, Function_) [with Index_ = int; Function_ = generic_find_all(SEXP, Rcpp::Nullable<Rcpp::Vector<13> >, Rcpp::NumericVector, int, bool, bool)::<lambda(int, int)>]’
generics.cpp:417:24:   required from here
/home/ikutsu/Tsuchiya_NGS/local/include/c++/13.2.0/bits/new_allocator.h:187:11: error: no matching function for call to ‘std::thread::thread(generic_find_all(SEXP, Rcpp::Nullable<Rcpp::Vector<13> >, Rcpp::NumericVector, int, bool, bool)::<lambda(int, int)>&, int&, int&)’
  187 |         { ::new((void *)__p) _Up(std::forward<_Args>(__args)...); }
      |           ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/home/ikutsu/Tsuchiya_NGS/local/include/c++/13.2.0/bits/std_thread.h:178:5: note: candidate: ‘std::thread::thread(std::thread&&)’
  178 |     thread(thread&& __t) noexcept
      |     ^~~~~~
/home/ikutsu/Tsuchiya_NGS/local/include/c++/13.2.0/bits/std_thread.h:178:5: note:   candidate expects 1 argument, 3 provided
/home/ikutsu/Tsuchiya_NGS/local/include/c++/13.2.0/bits/std_thread.h:132:5: note: candidate: ‘std::thread::thread()’
  132 |     thread() noexcept = default;
      |     ^~~~~~
/home/ikutsu/Tsuchiya_NGS/local/include/c++/13.2.0/bits/std_thread.h:132:5: note:   candidate expects 0 arguments, 3 provided
/home/ikutsu/Tsuchiya_NGS/local/include/c++/13.2.0/bits/new_allocator.h: In instantiation of ‘void std::__new_allocator<_Tp>::construct(_Up*, _Args&& ...) [with _Up = std::thread; _Args = {generic_query_all(SEXP, Rcpp::NumericMatrix, Rcpp::NumericVector, int, bool, bool)::<lambda(int, int)>&, int&, int&}; _Tp = std::thread]’:
/home/ikutsu/Tsuchiya_NGS/local/include/c++/13.2.0/bits/alloc_traits.h:537:17:   required from ‘static void std::allocator_traits<std::allocator<_Tp1> >::construct(allocator_type&, _Up*, _Args&& ...) [with _Up = std::thread; _Args = {generic_query_all(SEXP, Rcpp::NumericMatrix, Rcpp::NumericVector, int, bool, bool)::<lambda(int, int)>&, int&, int&}; _Tp = std::thread; allocator_type = std::allocator<std::thread>]’
/home/ikutsu/Tsuchiya_NGS/local/include/c++/13.2.0/bits/vector.tcc:117:30:   required from ‘std::vector<_Tp, _Alloc>::reference std::vector<_Tp, _Alloc>::emplace_back(_Args&& ...) [with _Args = {generic_query_all(SEXP, Rcpp::NumericMatrix, Rcpp::NumericVector, int, bool, bool)::<lambda(int, int)>&, int&, int&}; _Tp = std::thread; _Alloc = std::allocator<std::thread>; reference = std::thread&]’
parallel.h:26:26:   required from ‘void generic_parallelize(Index_, int, Function_) [with Index_ = int; Function_ = generic_query_all(SEXP, Rcpp::NumericMatrix, Rcpp::NumericVector, int, bool, bool)::<lambda(int, int)>]’
generics.cpp:510:24:   required from here
/home/ikutsu/Tsuchiya_NGS/local/include/c++/13.2.0/bits/new_allocator.h:187:11: error: no matching function for call to ‘std::thread::thread(generic_query_all(SEXP, Rcpp::NumericMatrix, Rcpp::NumericVector, int, bool, bool)::<lambda(int, int)>&, int&, int&)’
  187 |         { ::new((void *)__p) _Up(std::forward<_Args>(__args)...); }
      |           ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/home/ikutsu/Tsuchiya_NGS/local/include/c++/13.2.0/bits/std_thread.h:178:5: note: candidate: ‘std::thread::thread(std::thread&&)’
  178 |     thread(thread&& __t) noexcept
      |     ^~~~~~
/home/ikutsu/Tsuchiya_NGS/local/include/c++/13.2.0/bits/std_thread.h:178:5: note:   candidate expects 1 argument, 3 provided
/home/ikutsu/Tsuchiya_NGS/local/include/c++/13.2.0/bits/std_thread.h:132:5: note: candidate: ‘std::thread::thread()’
  132 |     thread() noexcept = default;
      |     ^~~~~~
/home/ikutsu/Tsuchiya_NGS/local/include/c++/13.2.0/bits/std_thread.h:132:5: note:   candidate expects 0 arguments, 3 provided
make: *** [/home/ikutsu/Tsuchiya_NGS/local/lib64/R/etc/Makeconf:204: generics.o] Error 1
ERROR: compilation failed for package ‘BiocNeighbors’
* removing ‘/home/ikutsu/Tsuchiya_NGS/local/lib64/R/library/BiocNeighbors’

The downloaded source packages are in
    ‘/tmp/Rtmpm8CNQp/downloaded_packages"
Updating HTML index of packages in ".Library"
Making "packages.html" ... done
Warning message:
In install.packages(...) :
  installation of package ‘BiocNeighbors" had non-zero exit status


> sessionInfo()
R version 4.4.1 (2024-06-14)
Platform: x86_64-pc-linux-gnu
Running under: CentOS Linux 7 (Core)

Matrix products: default
BLAS:   /home/ikutsu/Tsuchiya_NGS/local/lib64/R/lib/libRblas.so 
LAPACK: /home/ikutsu/Tsuchiya_NGS/local/lib64/R/lib/libRlapack.so;  LAPACK version 3.12.0

locale:
 [1] LC_CTYPE=en_US.UTF-8       LC_NUMERIC=C              
 [3] LC_TIME=ja_JP.UTF-8        LC_COLLATE=en_US.UTF-8    
 [5] LC_MONETARY=ja_JP.UTF-8    LC_MESSAGES=en_US.UTF-8   
 [7] LC_PAPER=ja_JP.UTF-8       LC_NAME=C                 
 [9] LC_ADDRESS=C               LC_TELEPHONE=C            
[11] LC_MEASUREMENT=ja_JP.UTF-8 LC_IDENTIFICATION=C       

time zone: Asia/Tokyo
tzcode source: system (glibc)

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

loaded via a namespace (and not attached):
[1] BiocManager_1.30.25 compiler_4.4.1      tools_4.4.1

0

この質問に回答するには、ログインする必要があります。

のタグが付いた他の質問を参照する。