[Rcpp-devel] version GLIBCXX not found

Peter Carr pcarr at broadinstitute.org
Tue Mar 15 01:07:08 CET 2016


I am getting an error installing Rcpp from source with R-2.15.3 and Rcpp 0.10.5:
     /usr/lib64/libstdc++.so.6: version `GLIBCXX_3.4.20' not found
I am working in a non-standard environment; running R on a compute cluster, 
similar to this thread:
https://github.com/molpopgen/devnotes/wiki/Rcpp-and-compiler-flags
Compute nodes on the cluster use 'environment modules' to load the environment 
at runtime. E.g.
     module load R-2.15
     Rscript ...
In my particular case we are using 'dotkit' but the concept is the same. I don't 
have permission to change the R installation; nor is it an option to update the 
compute node VM or the version of R. I'd like to know what environment variables 
to set to force g++ to use the correct flags.
     # R installation dir
     /pkgs/r_2.15.3

     # custom package location
     ~/rhel6/Library/R/2.15


On my system, I have two different locations for the libstdc++.so.6 file.
     /usr/lib64/libstdc++.so.6
     /pkgs/gcc_4.9.0/lib64/libstdc++.so.6

  The GLIBCXX in /pkgs is the correct version (GLIBCXX_3.4.20); the one in 
'/usr/' is missing that version.

Here is a trace ...

---------------------
Installing from http://cran.rstudio.com/src/contrib/Archive/Rcpp/Rcpp_0.10.5.tar.gz
---------------------

Installing package(s) into ~/rhel6/Library/R/2.15

* installing *source* package Rcpp ...
** package Rcpp successfully unpacked and MD5 sums checked
** libs
g++ -I/pkgs/r_2.15.3/lib64/R/include -DNDEBUG -I../inst/include/     -fpic  -g -O2  -c Date.cpp -o Date.o
g++ -I/pkgs/r_2.15.3/lib64/R/include -DNDEBUG -I../inst/include/     -fpic  -g -O2  -c Module.cpp -o Module.o
gcc -std=gnu99 -I/pkgs/r_2.15.3/lib64/R/include -DNDEBUG -I../inst/include/     -fpic   -c Rcpp_init.c -o Rcpp_init.o
g++ -I/pkgs/r_2.15.3/lib64/R/include -DNDEBUG -I../inst/include/     -fpic  -g -O2  -c Timer.cpp -o Timer.o
g++ -I/pkgs/r_2.15.3/lib64/R/include -DNDEBUG -I../inst/include/     -fpic  -g -O2  -c api.cpp -o api.o
g++ -I/pkgs/r_2.15.3/lib64/R/include -DNDEBUG -I../inst/include/     -fpic  -g -O2  -c attributes.cpp -o attributes.o
g++ -I/pkgs/r_2.15.3/lib64/R/include -DNDEBUG -I../inst/include/     -fpic  -g -O2  -c barrier.cpp -o barrier.o
g++ -I/pkgs/r_2.15.3/lib64/R/include -DNDEBUG -I../inst/include/     -fpic  -g -O2  -c exceptions.cpp -o exceptions.o
g++ -shared -o Rcpp.so Date.o Module.o Rcpp_init.o Timer.o api.o attributes.o barrier.o exceptions.o -L/pkgs/r_2.15.3/lib64/R/lib -lR
g++ -o libRcpp.so Date.o Module.o Rcpp_init.o Timer.o api.o attributes.o barrier.o exceptions.o -shared   -L/pkgs/r_2.15.3/lib64/R/lib -lR
ar qc libRcpp.a Date.o Module.o Rcpp_init.o Timer.o api.o attributes.o barrier.o exceptions.o
cp libRcpp.so ../inst/lib
cp libRcpp.a ../inst/lib
rm libRcpp.so libRcpp.a
installing to ~/rhel6/Library/R/2.15/Rcpp/libs
** R
** inst
** preparing package for lazy loading
** help
*** installing help indices
** building package indices
** installing vignettes
...
** testing if installed package can be loaded
Error in dyn.load(file, DLLpath = DLLpath, ...) :
   unable to load shared object '~/rhel6/Library/R/2.15/Rcpp/libs/Rcpp.so':
   /usr/lib64/libstdc++.so.6: version `GLIBCXX_3.4.20' not found (required by ~/rhel6/Library/R/2.15/Rcpp/libs/Rcpp.so)
Error: loading failed
Execution halted
ERROR: loading failed


Thanks for any pointers,
Peter

-- 
Peter Carr <pcarr at broadinstitute.org>
Sr. Software Engineer
Broad Institute - GenePattern Team (http://genepattern.org/)

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.r-forge.r-project.org/pipermail/rcpp-devel/attachments/20160314/b3386d07/attachment.html>


More information about the Rcpp-devel mailing list