R recompiles packages since

In my Linux cluster, it is difficult for me to recompile R packages that need to be recompiled with removal libRcpp.soin the latest version. The ultimate goal is to launch the DEseq2 R package. We have installed a new version from the g ++ directory, /opt/binhave new libraries in /opt/lib64. I have also created .R/Makevarsone that has the following directives:

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

"The various versions of Makevars fail, this is just my last attempt to overcome the bootloader problem by not finding libstdc ++ when it binds an armadillo. As you can see, it searches /usr/lib64instead   /opt/lib64. As if my directives are -Wlignored. I work R as sudo.

Also my .bashrc has:

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 ,  :


    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â

 /tmp/RtmpZty35f/downloaded_packages

:

In install.packages(onCRAN, lib = lib, repos = rep) :
   installation of package RcppArmadillo had non-zero exit code
+3
1

:

  • 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 .. , .

0
source

All Articles