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

Ismail SEZEN sezenismail at gmail.com
Sun Jul 16 14:39:45 CEST 2017


> On 16 Jul 2017, at 15:09, Ismail SEZEN <sezenismail at gmail.com> wrote:
> 
> Hello all,
> 
> 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
> 
> And my session info:
> 
> R> sessionInfo()
> R version 3.4.1 (2017-06-30)
> Platform: x86_64-apple-darwin16.6.0 (64-bit)
> Running under: macOS Sierra 10.12.5
> 
> Matrix products: default
> BLAS: /System/Library/Frameworks/Accelerate.framework/Versions/A/Frameworks/vecLib.framework/Versions/A/libBLAS.dylib
> LAPACK: /opt/local/Library/Frameworks/R.framework/Versions/3.4/Resources/lib/libRlapack.dylib
> 
> locale:
> [1] en_US.UTF-8/en_US.UTF-8/en_US.UTF-8/C/en_US.UTF-8/en_US.UTF-8
> 
> attached base packages:
> [1] stats     graphics  grDevices datasets  utils     methods   base     
> 
> other attached packages:
> [1] lintr_1.0.0
> 
> loaded via a namespace (and not attached):
> [1] compiler_3.4.1            lazyeval_0.2.0            magrittr_1.5             
> [4] tools_3.4.1               rex_1.1.1                 RcppArmadillo_0.7.900.2.0
> [7] withr_1.0.2               Rcpp_0.12.12              memoise_1.1.0            
> [10] digest_0.6.12             RcppParallel_4.3.20       devtools_1.13.2
> 
> Thanks for your help.
> 
> İsmail SEZEN
> 
> 


It’s solved. My mistake and I apologize for keeping the list busy.

For the people who might have the same/similar issue;

Please do not use direct call (as below) to cpp functions in your code somewhere;

.Call('rpbl_hef_list', PACKAGE = ‘rpbl’, ...)

Thanks to all.




More information about the Rcpp-devel mailing list