[Rcpp-devel] Rcpp installation fails with undefined symbol: _ZTISo - what library am I missing?

Steven McKinney smckinney at bccrc.ca
Wed Dec 17 05:45:34 CET 2014


Hi Dirk,

More reading lead me to the Makevars file specification option so with 
CXX=/share/data/usr/bin/g++

in ~/.R/Makevars I get compilation with g++




/share/data/usr/bin/g++ -shared -L/share/data/usr/local/lib64 -L/share/data/usr/lib64 -o Rcpp.so Date.o Module.o Rcpp_init.o api.o attributes.o barrier.o
installing to /share/data/apps/R/R-3.1.2/lib64/R/library/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
* DONE (Rcpp)

> library("Rcpp")
> 


Thanks again for your help and guidance.


Best

Steven McKinney

________________________________________
From: Dirk Eddelbuettel [edd at debian.org]
Sent: December 16, 2014 7:31 PM
To: Steven McKinney
Cc: rcpp-devel at lists.r-forge.r-project.org
Subject: Re: [Rcpp-devel] Rcpp installation fails with undefined symbol: _ZTISo - what library am I missing?

Hi Steven,

On 16 December 2014 at 19:16, Steven McKinney wrote:
|
| Hi,
|
| I installed R-3.1.2 today, and am having trouble installing Rcpp.
|
| The error message is
|
| Error in dyn.load(file, DLLpath = DLLpath, ...) :
|   unable to load shared object '/share/data/apps/R/R-3.1.2/lib64/R/library/Rcpp/libs/Rcpp.so':
|   /share/data/apps/R/R-3.1.2/lib64/R/library/Rcpp/libs/Rcpp.so: undefined symbol: _ZTISo
|
| so there's some library I haven't linked against.  I've combed the vignettes and the web, but haven't found anything specific for this symbol, and haven't found a list of libraries that need to be specified when compiling Rcpp.
|
| Can anyone tell me what libraries I should be linking against?

The c++filt tool is helpful:

  edd at max:~$ c++filt _ZTISo
  typeinfo for std::basic_ostream<char, std::char_traits<char> >
  edd at max:~$

This suggests basic iostream, ie C++ input/output. And indeed ...

| Best
|
| Steven McKinney
|
| Details:
|
| This is a custom install for a cluster situation, so libraries are in non-standard locations so as to be accessible to all machines in the cluster and local network.
|
| The error message in R is:
|
| libs
| /share/data/usr/bin/gcc44 -I/share/data/apps/R/R-3.1.2/lib64/R/include -DNDEBUG -I../inst/include/ -I/share/data/usr/local/include -I/share/data/usr/include    -fpic  -g -O2  -c Date.cpp -o Date.o

That is a) a bug OUCH for having to cope with a five-year old compiler
(gcc-4.4) but b) a serious error on your part: you generally want __g++__ and
not gcc for C++ code.  One of the differences is that g++ automagically links
against the C++ libraries.

That may be all you need.

Dirk

| /share/data/usr/bin/gcc44 -I/share/data/apps/R/R-3.1.2/lib64/R/include -DNDEBUG -I../inst/include/ -I/share/data/usr/local/include -I/share/data/usr/include    -fpic  -g -O2  -c Module.cpp -o Module.o
| /share/data/usr/bin/gcc44 -I/share/data/apps/R/R-3.1.2/lib64/R/include -DNDEBUG -I../inst/include/ -I/share/data/usr/local/include -I/share/data/usr/include    -fpic  -g -O2  -c Rcpp_init.cpp -o Rcpp_init.o
| /share/data/usr/bin/gcc44 -I/share/data/apps/R/R-3.1.2/lib64/R/include -DNDEBUG -I../inst/include/ -I/share/data/usr/local/include -I/share/data/usr/include    -fpic  -g -O2  -c api.cpp -o api.o
| /share/data/usr/bin/gcc44 -I/share/data/apps/R/R-3.1.2/lib64/R/include -DNDEBUG -I../inst/include/ -I/share/data/usr/local/include -I/share/data/usr/include    -fpic  -g -O2  -c attributes.cpp -o attributes.o
| /share/data/usr/bin/gcc44 -I/share/data/apps/R/R-3.1.2/lib64/R/include -DNDEBUG -I../inst/include/ -I/share/data/usr/local/include -I/share/data/usr/include    -fpic  -g -O2  -c barrier.cpp -o barrier.o
| /share/data/usr/bin/gcc44 -shared -L/share/data/usr/local/lib64 -L/share/data/usr/lib64 -o Rcpp.so Date.o Module.o Rcpp_init.o api.o attributes.o barrier.o
| installing to /share/data/apps/R/R-3.1.2/lib64/R/library/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 '/share/data/apps/R/R-3.1.2/lib64/R/library/Rcpp/libs/Rcpp.so':
|   /share/data/apps/R/R-3.1.2/lib64/R/library/Rcpp/libs/Rcpp.so: undefined symbol: _ZTISo
| Error: loading failed
| Execution halted
| ERROR: loading failed
|
|
|
|
| > sessionInfo()
| R version 3.1.2 (2014-10-31)
| Platform: x86_64-unknown-linux-gnu (64-bit)
|
| locale:
|  [1] LC_CTYPE=en_US.UTF-8       LC_NUMERIC=C
|  [3] LC_TIME=en_US.UTF-8        LC_COLLATE=en_US.UTF-8
|  [5] LC_MONETARY=en_US.UTF-8    LC_MESSAGES=en_US.UTF-8
|  [7] LC_PAPER=en_US.UTF-8       LC_NAME=C
|  [9] LC_ADDRESS=C               LC_TELEPHONE=C
| [11] LC_MEASUREMENT=en_US.UTF-8 LC_IDENTIFICATION=C
|
| attached base packages:
| [1] stats     graphics  grDevices utils     datasets  methods   base
|
| loaded via a namespace (and not attached):
| [1] tcltk_3.1.2 tools_3.1.2
| >
|
|
|
|
|
| Steven McKinney, Ph.D.
|
| Statistician
| Molecular Oncology and Breast Cancer Program
| British Columbia Cancer Research Centre
|
| email: smckinney +at+ bccrc +dot+ ca
|
| tel: 604-675-8000 x7561
|
| BCCRC
| Molecular Oncology
| 675 West 10th Ave, Floor 4
| Vancouver B.C.
| V5Z 1L3
| Canada
| _______________________________________________
| Rcpp-devel mailing list
| Rcpp-devel at lists.r-forge.r-project.org
| https://lists.r-forge.r-project.org/cgi-bin/mailman/listinfo/rcpp-devel

--
http://dirk.eddelbuettel.com | @eddelbuettel | edd at debian.org


More information about the Rcpp-devel mailing list