简体   繁体   中英

Rcpp can't dyn.load library: Missing __si_class_type_info

I am trying to compile an R package that contains both C++ and Fortran code using Rcpp. The compilation works perfectly fine, but the package can't dyn.load the shared object, throwing the error:

undefined symbol: _ZTVN10__cxxabiv120__si_class_type_infoE

Applying a c++filt to this gives:

vtable for __cxxabiv1::__si_class_type_info

The package is the sf_onefolder branch from here: https://github.com/blowfish711/PEcAnRTM .

I thought this might be because of some compatibility (or lack thereof) with the latest R version, but an older R version on a different system gives the same error.

I don't necessarily even need an answer to this as much as a way to debug it. I've used gdb with R scripts in the past, but I'm at a loss about how to approach this. Any suggestions are welcome!

What you post is not a minimally reproducible example but the first thing that comes to mind is different headers / signatures and eg the need to use extern "C" before C++ functions called from C.

You may need to something similar. It is hard to say more but there are of course package uses C++ and Fortran together.

I've had similar issues when trying to call Fortran code using the Rcpp interface. I solved them by building an R package (see here 1 for the source). Hope this helps.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM