[Rcpp-devel] Unable to load shared object
Dirk Eddelbuettel
edd at debian.org
Sat Jul 13 08:48:01 CEST 2013
On 12 July 2013 at 21:35, Jules Archer wrote:
| 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.
Yup, that'll do it. And again, there are many Rcpp-based packages linking to
external libraries so there is always a stanza to copy from.
| Thanks again to you and Dirk for your help!
Glad it works for you. Looking forward to your package.
Dirk
| -------------------------------------------------------------------------------
| 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
| -----------------------------------------------
|
|
--
Dirk Eddelbuettel | edd at debian.org | http://dirk.eddelbuettel.com
More information about the Rcpp-devel
mailing list