[Rcpp-devel] Unable to load shared object

Krzysztof Sakrejda krzysztof.sakrejda at gmail.com
Wed Jul 10 20:36:19 CEST 2013


On Wed, Jul 10, 2013 at 2:18 PM, Jules Archer <jules.archer at ymail.com> wrote:

> | However, when I try to compile as an R package, I keep getting the
> following
> | error:
> |
> | ** building package indices
> | ** testing if installed package can be loaded
> | Error in dyn.load(file, DLLpath = DLLpath, ...) :
> |  unable to load shared object '/usr/local/lib/R/site-library/mathGL/libs/
> | mathGL.so':
> |  /usr/local/lib/R/site-library/mathGL/libs/mathGL.so: undefined symbol:
> | _ZTIN4Rcpp14not_compatibleE

I don't have an immediate answer, but calling c++filt gets you:

~ $ c++filt _ZTIN4Rcpp14not_compatibleE
typeinfo for Rcpp::not_compatible

I get more helpful error messages when I add "-Wl,-z,defs" to the gcc
flags when building the library.  With those flags, the error comes up
at compilation.  The proximate cause of the error is that it can't
find the Rcpp::not_compatible exception class... the next clue you
need is probably to look at the lines of output where your library is
actually being compiled to see how Rcpp is being included, that's the
part that's failing. Sorry if this is all obvious, I can't tell from
your post where you're at with the Rcpp/C++ combo.

Hope that helps,

Krzysztof


--

Krzysztof Sakrejda

Organismic and Evolutionary Biology
University of Massachusetts, Amherst
319 Morrill Science Center South
611 N. Pleasant Street
Amherst, MA 01003

work #: 413-325-6555
email: sakrejda at cns.umass.edu
-----------------------------------------------


More information about the Rcpp-devel mailing list