How to use ffi.verfiy() to open a shared library? I tried a C code by using dlopen, but met the same errors.
void *handle; handle = dlopen("./_distcache.so", RTLD_LAZY); if (!handle) { fprintf(stderr, "%s\n", dlerror()); exit(EXIT_FAILURE); } With C code, it also reported that " undefined symbol: _ZTIN6apsara13ExceptionBaseE". On Wed, Jul 8, 2015 at 5:18 PM, Armin Rigo <ar...@tunes.org> wrote: > Hi Maciej, > > On 8 July 2015 at 11:14, Maciej Fijalkowski <fij...@gmail.com> wrote: > > you should probably use verify instead of dlopen. This symbol is > > likely defined in libstdc++, which is not loaded in pypy (you might > > try to load it by hand, but I'm way out of my depth here) > > http://demangler.com/ says the symbol is apsara::ExceptionBase, which > doesn't look like it comes from libstdc++. That's about all I can say > though. The point is that "./_distcache.so" looks like it is missing > this symbol and can't be loaded (independently of cffi --- try to load > it for example in a small C program that calls dlopen()). > > Obviously I agree with Maciej's comment and you should use verify() > instead of dlopen(), particularly if _distcache.so is full of C++ > names, because these can't be cleanly accessed with dlopen(). > > > Armin >
_______________________________________________ pypy-dev mailing list pypy-dev@python.org https://mail.python.org/mailman/listinfo/pypy-dev