<html>
<head>
<meta http-equiv="content-type" content="text/html; charset=utf-8">
</head>
<body bgcolor="#FFFFFF" text="#000000">
I am getting an error installing Rcpp from source with R-2.15.3 and
Rcpp 0.10.5:<br>
/usr/lib64/libstdc++.so.6: version `GLIBCXX_3.4.20' not found <br>
I am working in a non-standard environment; running R on a compute
cluster, similar to this thread:<br>
<a class="moz-txt-link-freetext"
href="https://github.com/molpopgen/devnotes/wiki/Rcpp-and-compiler-flags">https://github.com/molpopgen/devnotes/wiki/Rcpp-and-compiler-flags</a><br>
Compute nodes on the cluster use 'environment modules' to load the
environment at runtime. E.g.<br>
module load R-2.15<br>
Rscript ...<br>
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.<br>
# R installation dir<br>
/pkgs/r_2.15.3<br>
<br>
# custom package location<br>
~/rhel6/Library/R/2.15<br>
<br>
<br>
On my system, I have two different locations for the libstdc++.so.6
file.<br>
/usr/lib64/libstdc++.so.6<br>
/pkgs/gcc_4.9.0/lib64/libstdc++.so.6<br>
<br>
The GLIBCXX in /pkgs is the correct version (GLIBCXX_3.4.20); the
one in '/usr/' is missing that version.<br>
<br>
Here is a trace ...<br>
<meta http-equiv="content-type" content="text/html; charset=utf-8">
<pre>---------------------
Installing from <a class="moz-txt-link-freetext" href="http://cran.rstudio.com/src/contrib/Archive/Rcpp/Rcpp_0.10.5.tar.gz">http://cran.rstudio.com/src/contrib/Archive/Rcpp/Rcpp_0.10.5.tar.gz</a>
---------------------
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
</pre>
<br>
Thanks for any pointers,<br>
Peter<br>
<br>
<pre class="moz-signature" cols="80">--
Peter Carr <a class="moz-txt-link-rfc2396E" href="mailto:pcarr@broadinstitute.org"><pcarr@broadinstitute.org></a>
Sr. Software Engineer
Broad Institute - GenePattern Team (<a class="moz-txt-link-freetext" href="http://genepattern.org/">http://genepattern.org/</a>)</pre>
</body>
</html>