[Rcpp-devel] unable to load shared object - Symbol not found

Dirk Eddelbuettel edd at debian.org
Sun Jul 16 15:00:12 CEST 2017


On 16 July 2017 at 15:09, Ismail SEZEN wrote:
| I had a package that I wrote myself with Rcpp code. After Rcpp 0.12.12 update, I can not build and install the package and I’m getting the error below:
| 
| ** testing if installed package can be loaded
| Error: package or namespace load failed for ‘rpbl’ in dyn.load(file, DLLpath = DLLpath, ...):
|  unable to load shared object '/Users/isezen/Library/R/3.4/library/rpbl/libs/rpbl.so':
|   dlopen(/Users/isezen/Library/R/3.4/library/rpbl/libs/rpbl.so, 6): Symbol not found: _rpbl_hef2
|   Referenced from: /Users/isezen/Library/R/3.4/library/rpbl/libs/rpbl.so
|   Expected in: flat namespace
|  in /Users/isezen/Library/R/3.4/library/rpbl/libs/rpbl.so
| Error: loading failed
| Execution halted
| ERROR: loading failed
| * removing ‘/Users/isezen/Library/R/3.4/library/rpbl’
| 
| The only difference is C++ native routines with underscore (in RcppExports.R and RcppExports.cpp files)  as mentioned in Dirk’s post.
| 
| Generate C++ native routines with underscore ("_") prefix to
|              avoid exporting when standard exportPattern is used in
|              NAMESPACE (JJ in #725 addressing #723).
| 
| the whole package and the code can be found here: https://github.com/isezen/rpbl

Not exactly "minimally reproducible".  Do tell beforehand than cloning the
repo will suck down 300+ megabytes. And that you have build requirements for
other packages exotic enough that they are NOT met by the reverse depends of
the now almost 1100 packages I test against. Not nice.  And after I wasted
all that time it STILL failed because you have an unsatisfiable depends in
'rwind'.  Did you mean rWind?

When I then re-generate the exports via `compileAttributes()` I now get

Warning messages:
1: Unable to parse C++ default value 'numeric_limits<double>::infinity()' for argument max_h of function hef2 
2: Unable to parse C++ default value 'numeric_limits<double>::infinity()' for argument max_h of function hef_list 

That is
 a) likely an issue an our end we will try to fix for Rcpp 0.12.13
 b) something you should have caught, but likely didn't because your build
 already generated pages and pages of compiler warnings
 c) something you can work around locally, eg via a file local const

As a test, I just removed the argument from the function interface and it
worked fine.

Thanks for the report though.  But next time, __please__ try to submit
something __minimally reproducible__ and not a blob requiring the
installation of 15 other packages and a download of 300mb.

Dirk

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


More information about the Rcpp-devel mailing list