在我的Linux集群上,我无法重新编译需要重新编译的R软件包
删除最新版本中的libRcpp.so
。最终目标是
得到R包DEseq2运行。我们已经安装了新版本
/opt/bin
目录中的g ++在/opt/lib64
中有新库。我有
还创建了具有以下指令的.R/Makevars
:
CXX=/opt/bin/g++ -Wl,-rpath,/opt/lib64 -Wl,-L,/opt/lib64
-Wl,-llibstdc++ CC=/opt/bin/c++ -Wl,-rpath,/opt/lib64 -Wl,-L,/opt/lib64 -Wl,-llibstdc++
SHLIB_OPENMP_CXXFLAGS= -fopenmp
“各种版本的Makevars都失败了,这只是我最近的尝试
克服了一个加载器问题,当它链接时没有找到libstdc ++
犰狳。正如您所看到的,它正在寻找/usr/lib64
而不是/opt/lib64
-Wl
。好像我的LD_LIBRARY_PATH=/opt/lib64:/opt/lib64/R/library/Rcpp/libs:$LD_LIBRARY_PATH:~/lib:~/perl/lib:~/lib/bamtools
LD_RUN_PATH=/opt/lib64:$LD_RUN_PATH:~/lib
export LD_LIBRARY_PATH
export LD_RUN_PATH
指令被忽略了。我是
将R作为sudo运行。
我的.bashrc也有:
install.packages(onCRAN, lib=lib, repos=rep)
trying URL 'http://cran.rstudio.com/src/contrib/RcppArmadillo_0.4.000.2.tar.gz'
Content type 'application/x-gzip' length 892941 bytes (872 Kb)
opened URL
==================================================
downloaded 872 Kb
* installing *source* package âRcppArmadilloâ ...
** package âRcppArmadilloâ successfully unpacked and MD5 sums checked
* checking LAPACK_LIBS divide-and-conquer complex SVD unavailable via R-supplied LAPACK
* divide-and-conquer algorithm for complex SVD will be redirected to default
** libs
/opt/bin/g++ -Wl,-rpath,/opt/lib64 -Wl,-L,/opt/lib64 -Wl,-llibstdc++ -I/opt/lib64/R/include -DNDEBUG -I/usr/local/include -I"/opt/lib64/R/library/Rcpp/include" -I../inst/include -fpic -g -O2 -c RcppArmadillo.cpp -o RcppArmadillo.o
/opt/bin/g++ -Wl,-rpath,/opt/lib64 -Wl,-L,/opt/lib64 -Wl,-llibstdc++ -I/opt/lib64/R/include -DNDEBUG -I/usr/local/include -I"/opt/lib64/R/library/Rcpp/include" -I../inst/include -fpic -g -O2 -c RcppExports.cpp -o RcppExports.o
/opt/bin/g++ -Wl,-rpath,/opt/lib64 -Wl,-L,/opt/lib64 -Wl,-llibstdc++ -I/opt/lib64/R/include -DNDEBUG -I/usr/local/include -I"/opt/lib64/R/library/Rcpp/include" -I../inst/include -fpic -g -O2 -c fastLm.cpp -o fastLm.o
Error in dyn.load(file, DLLpath = DLLpath, ...) :
unable to load shared object '/opt/lib64/R/library/Rcpp/libs/Rcpp.so':
/usr/lib64/libstdc++.so.6: version `GLIBCXX_3.4.9' not found (required by /opt/lib64/R/library/Rcpp/libs/Rcpp.so)
Calls: ::: ... tryCatch -> tryCatchList -> tryCatchOne -> <Anonymous>
Execution halted
/opt/bin/g++ -Wl,-rpath,/opt/lib64 -Wl,-L,/opt/lib64 -Wl,-llibstdc++ -shared -L/usr/local/lib64 -o RcppArmadillo.so RcppArmadillo.o RcppExports.o fastLm.o -L/opt/lib64/R/lib -lRlapack
-L/opt/lib64/R/lib -lRblas -lgfortran -lm
Error in dyn.load(file, DLLpath = DLLpath, ...) :
unable to load shared object '/opt/lib64/R/library/Rcpp/libs/Rcpp.so':
/usr/lib64/libstdc++.so.6: version `GLIBCXX_3.4.9' not found (required by /opt/lib64/R/library/Rcpp/libs/Rcpp.so)`
Calls: ::: ... tryCatch -> tryCatchList -> tryCatchOne -> <Anonymous>
Execution halted
/usr/bin/ld: cannot find -llibstdc++
collect2: error: ld returned 1 exit status
make: *** [RcppArmadillo.so] Error 1
ERROR: compilation failed for package âRcppArmadilloâ
* removing â/opt/lib64/RcppArmadilloâ
以下是我尝试在R中编译需要的新软件包时得到的内容 重新编译:
/tmp/RtmpZty35f/downloaded_packages
下载的源包在
中In install.packages(onCRAN, lib = lib, repos = rep) :
installation of package RcppArmadillo had non-zero exit code
警告讯息:
{{1}}
答案 0 :(得分:0)
两个快速评论:
CXX
中CXX=/opt/bin/g++ -Wl,-rpath,/opt/lib64 -Wl,-L,/opt/lib64
的定义是一个小小的,不同寻常的,因为它混合了链接器指令(对于ld
二进制)。我会在没有的情况下再试一次。
编译RcppArmadillo时的错误没什么意义,它应该尝试加载libRcpp.so
。并且'GLIBCXX_3.4.9' not found
表示您可能已设置路径。
我会尝试更简单的设置,更少的铃声和口哨,然后从内到外工作:重建/重新安装Rcpp,然后RcppArmadillo等等。它适用于很多使用更多标准设置的人。