From 70a0cdb901e8f6b1676033457c0ecd01e0f92693 Mon Sep 17 00:00:00 2001 From: skv Date: Thu, 24 Nov 2016 13:49:48 +0300 Subject: [PATCH] Fix pb with save/restore GEOM for Debian 6.0 --- src/Container/Container_i.cxx | 2 +- src/MPIContainer/MPIContainer_i.cxx | 4 ++-- src/ParallelContainer/SALOME_ParallelContainerProxy_i.cxx | 2 +- src/ParallelContainer/SALOME_ParallelContainer_i.cxx | 2 +- src/SALOMELocalTrace/LocalTraceBufferPool.cxx | 2 +- 5 files changed, 6 insertions(+), 6 deletions(-) diff --git a/src/Container/Container_i.cxx b/src/Container/Container_i.cxx index 68373b289..a7eb1197d 100644 --- a/src/Container/Container_i.cxx +++ b/src/Container/Container_i.cxx @@ -514,7 +514,7 @@ Engines_Container_i::load_component_CppImplementation(const char* componentName, #ifndef WIN32 void* handle; - handle = dlopen( impl_name.c_str() , RTLD_NOW ) ; + handle = dlopen( impl_name.c_str() , RTLD_NOW | RTLD_GLOBAL ) ; if ( !handle ) { //not loadable. Try to find the lib file in LD_LIBRARY_PATH diff --git a/src/MPIContainer/MPIContainer_i.cxx b/src/MPIContainer/MPIContainer_i.cxx index 2c9d5efc3..ed1c745a5 100644 --- a/src/MPIContainer/MPIContainer_i.cxx +++ b/src/MPIContainer/MPIContainer_i.cxx @@ -162,7 +162,7 @@ bool Engines_MPIContainer_i::Lload_component_Library(const char* componentName) } void* handle; - handle = dlopen( impl_name.c_str() , RTLD_LAZY ) ; + handle = dlopen( impl_name.c_str() , RTLD_LAZY | RTLD_GLOBAL ) ; if ( handle ) { _library_map[impl_name] = handle; @@ -462,7 +462,7 @@ Engines::EngineComponent_ptr Engines_MPIContainer_i::Lload_impl( std::string absolute_impl_name(_impl_name); MESSAGE("[" << _numproc << "] absolute_impl_name=" << absolute_impl_name); - void * handle = dlopen(absolute_impl_name.c_str(), RTLD_LAZY); + void * handle = dlopen(absolute_impl_name.c_str(), RTLD_LAZY | RTLD_GLOBAL); if(!handle){ INFOS("[" << _numproc << "] Can't load shared library : " << absolute_impl_name); INFOS("[" << _numproc << "] error dlopen: " << dlerror()); diff --git a/src/ParallelContainer/SALOME_ParallelContainerProxy_i.cxx b/src/ParallelContainer/SALOME_ParallelContainerProxy_i.cxx index 53a9ff747..c337776e2 100644 --- a/src/ParallelContainer/SALOME_ParallelContainerProxy_i.cxx +++ b/src/ParallelContainer/SALOME_ParallelContainerProxy_i.cxx @@ -164,7 +164,7 @@ Container_proxy_impl_final::load_component_Library(const char* componentName, CO #endif void* handle; #ifndef WIN32 - handle = dlopen( impl_name.c_str() , RTLD_LAZY ) ; + handle = dlopen( impl_name.c_str() , RTLD_LAZY | RTLD_GLOBAL ) ; #else handle = dlopen( impl_name.c_str() , 0 ) ; #endif diff --git a/src/ParallelContainer/SALOME_ParallelContainer_i.cxx b/src/ParallelContainer/SALOME_ParallelContainer_i.cxx index 6e75e1a2c..263b8531c 100644 --- a/src/ParallelContainer/SALOME_ParallelContainer_i.cxx +++ b/src/ParallelContainer/SALOME_ParallelContainer_i.cxx @@ -321,7 +321,7 @@ Engines_Parallel_Container_i::load_component_Library(const char* componentName, MESSAGE("Try to load C++ component"); void* handle; #ifndef WIN32 - handle = dlopen( impl_name.c_str() , RTLD_LAZY ) ; + handle = dlopen( impl_name.c_str() , RTLD_LAZY | RTLD_GLOBAL ) ; #else handle = dlopen( impl_name.c_str() , 0 ) ; #endif diff --git a/src/SALOMELocalTrace/LocalTraceBufferPool.cxx b/src/SALOMELocalTrace/LocalTraceBufferPool.cxx index 8caf45f61..e346706cf 100644 --- a/src/SALOMELocalTrace/LocalTraceBufferPool.cxx +++ b/src/SALOMELocalTrace/LocalTraceBufferPool.cxx @@ -114,7 +114,7 @@ LocalTraceBufferPool* LocalTraceBufferPool::instance() void* handle; std::string impl_name = std::string ("lib") + traceKind + std::string("TraceCollector.so"); - handle = dlopen( impl_name.c_str() , RTLD_LAZY ) ; + handle = dlopen( impl_name.c_str() , RTLD_LAZY | RTLD_GLOBAL ) ; #else HINSTANCE handle; std::string impl_name = std::string ("lib") + traceKind + std::string(".dll"); -- 2.39.2