Problems with external library conflict in R package

classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view

Problems with external library conflict in R package

I have an R library (using Rcpp) that used to compile and install fine.
It uses some boost libraries. My Makevars file looks like this:

PKG_LIBS=`$(R_HOME)/bin/Rscript -e "Rcpp:::LdFlags()"` -lboost_iostreams -lm

The problem I face now is that for some other R-independent software
project I installed boost 1.71 from source in /usr/local. Since then,
the R package does not install anymore; I get:

Error: package or namespace load failed (...) dyn.load(file, DLLpath =
DLLpath, ...):
  unable to load shared object (...)
  undefined symbol: _ZN5boost9iostreams6detail10bzip2_base3endEbSt9nothrow_t

Both the distribution's includes and library files and the ones I
installed in /usr/local are there:

$ locate boost/iostreams/filter/bzip2.hpp

$ ldconfig -p | grep boost_ios (libc6,x86-64) =>
/usr/local/lib/ (libc6,x86-64) =>

When I als specify -L/usr/local/lib in Makevars, the code installs fine.

There is probably a simple answer, but I don't understand why I get this
mismatch between library versions. Any help is appreciated!



[hidden email] mailing list -- To UNSUBSCRIBE and more, see
PLEASE do read the posting guide
and provide commented, minimal, self-contained, reproducible code.