Ask Your Question

guerinp38's profile - activity

2017-03-13 10:50:22 -0600 asked a question Inconsistency detected by ld.so: dl-close.c

Hello,

I have an application that loads shared libraries with dlopen() and releases them by dlclose(). Once a shared library is loaded, I can access to its functions in a generic way.

One of these shared library uses OpenCV to do some image processing such as resizing an image. The problem arises when my shared library is bound to OpenCV static libraries (it doesn't happen with OpenCV shared ones. The simple fact to load my shared library, even with no image processing call, gives the following error :

Inconsistency detected by ld.so: dl-close.c: 743: _dl_close: Assertion `map->l_init_called' failed!

As the assertion fails, it calls exit() and stops the application.

I know that dlclose should return an error rather than using the assert, but I can't explain why dlclose is unable to release the loaded libray in this context.

Environment :

Linux Debian 7 (Linux debian 3.2.0-4-686-pae #1 SMP Debian 3.2.84-2 i686 GNU/Linux) OpenCV 3.2.0 built from sources (core, imgcodec, imgproc and jasper, jpeg, png, tiff from OpenCV) g++ (Debian 4.7.2-5) 4.7.2

Thank you for your answers Kind regards, Patrice.