dlclose assert error with lib that have DF_1_NODELETE flag
This issue was created automatically from an original Mantis Issue. Further discussion may take place here.
in Utilities/KWSys/vtksys/DynamicLoader.cxx:503 there is a call to dlclose, this is used to unload lib when quitting any application using plugins ( aka pvpython, paraview... )
But, if the lib as the DF_1_NODELETE flag set, the dlclose call will fail with the following assert error : Inconsistency detected by ld.so: dl-close.c: 764: _dl_close: Assertion `map->l_init_called' failed!
This flag can be set for three reasons :
- RTLD_NODELETE have bess used as a flag when calling dlopen, not the case here.
- -z nodelete have been used when linking the library, unlikely when using ADD_PARAVIEW_PLUGIN macro, but who knows...
- The lib contains unique symbols : absolutely possible ( this is how i've pinpointed this bug )
More info here: http://stackoverflow.com/questions/31826309/glibc-test-if-lib-as-df-1-nodelete-flag-or-if-lib-has-unique-symbol https://sourceware.org/ml/libc-alpha/2015-05/msg00810.html https://www.redhat.com/archives/posix-c++-wg/2009-August/msg00002.html