[Rcpp-devel] Unable to load shared object

Jules Archer jules.archer at ymail.com
Sat Jul 13 06:35:21 CEST 2013


Krzysztof,


Thank you very much for your helpful reply.

Along with your suggestions, I was finally able to track down the problem. As it turned out, I was (incorrectly) re-defining PKG_LIBS instead of adding to the already existing 
PKG_LIBS = `$(R_HOME)/bin/Rscript -e "Rcpp:::LdFlags()"` in the Makevars file. With this fix, the binary package build is successful.


Thanks again to you and Dirk for your help!


________________________________
 From: Krzysztof Sakrejda <krzysztof.sakrejda at gmail.com>
To: Jules Archer <jules.archer at ymail.com> 
Cc: Dirk Eddelbuettel <edd at debian.org>; "rcpp-devel at lists.r-forge.r-project.org" <rcpp-devel at lists.r-forge.r-project.org> 
Sent: Wednesday, July 10, 2013 11:36 AM
Subject: Re: [Rcpp-devel] Unable to load shared object
 

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
-----------------------------------------------
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.r-forge.r-project.org/pipermail/rcpp-devel/attachments/20130712/943abe08/attachment.html>


More information about the Rcpp-devel mailing list