Browse Source

Removed RTLD_GLOBAL flag from QPluginLoader again.

Adding the flag was a bad idea (should have known better).
Although it fixed the problem of "missing" type_info symbols
from DSOs loaded via dlopen() on gcc < 4.5, it had the effect
of merging all C symbols with the same name from all DSOs.
Hence, qt_plugin_instance() functions from different plugins
where merged together and ctkPluginActivator classes loaded
from the wrong plugins.

The only solution for systems with gcc < 4.5 (MacOS 10.5 and
older Linux distributions) is to use qobject_cast instead
of dynamic_cast.

Note that in gcc 4.5 the default behavior for comparing
typeinfo names has changed, so dynamic_cast across DSOs
loaded via dlopen() works.
Sascha Zelzer 14 years ago
parent
commit
fa514d5e7d
1 changed files with 0 additions and 4 deletions
  1. 0 4
      Libs/PluginFramework/ctkPluginPrivate.cpp

+ 0 - 4
Libs/PluginFramework/ctkPluginPrivate.cpp

@@ -48,10 +48,6 @@ ctkPluginPrivate::ctkPluginPrivate(
   //TODO
   //checkCertificates(pa);
 
-  // Older gcc versions need to be told to make external symbols and RTTI information
-  // available to other libraries when loading a library with dlopen
-  pluginLoader.setLoadHints(QLibrary::ExportExternalSymbolsHint);
-
   checkManifestHeaders();
 
   pluginDir = fwCtx->getDataStorage(id);