I am trying to build a server plugin which utilizes the boost::regex
library, and for some reason when I quit paraview I get this message:

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

I've setup a basic project which demonstrates the issue:

CMakeLists.txt:

find_package(ParaView REQUIRED)

find_package(Boost COMPONENTS regex REQUIRED)

include(${PARAVIEW_USE_FILE})


ADD_PARAVIEW_PLUGIN(RegexProblem "1.0"

  SERVER_MANAGER_XML reader.xml

  SERVER_MANAGER_SOURCES main.cpp

  )


target_link_libraries(RegexProblem PRIVATE

  ${Boost_REGEX_LIBRARY}

)


Then I added a simple regex search to the RequestData function:


#include <boost/regex.hpp>


int main::RequestData(vtkInformation *request, vtkInformationVector
**inVec, vtkInformationVector *outVec)

{

  std::string base_name = "ab12cd34";

  boost::regex last_num("\\d+$");

  boost::match_results<std::string::iterator> match;

  // The next line is the one which triggers the issue

  boost::regex_search(base_name.begin(), base_name.end(), match, last_num);

  return 1;

}


I don't have any issues with other libraries (filesystem, system, hdf5).

I've also tried creating a separate executable which calls dlopen/dlclose
on the library and have had no issues.

Is there something I'm doing wrong, or is a fundamental issue with
ParaView/my OS? I'm running 64-bit Ubuntu 14.04. I'm using the git master
(v4.1.0-934-g29029db)

The one thing I can do to get this message to go away is to change the
target_link_libraries to INTERFACE, but then the code will crash on trying
to run RequestData because it can't find the symbols.
_______________________________________________
Powered by www.kitware.com

Visit other Kitware open-source projects at 
http://www.kitware.com/opensource/opensource.html

Please keep messages on-topic and check the ParaView Wiki at: 
http://paraview.org/Wiki/ParaView

Follow this link to subscribe/unsubscribe:
http://public.kitware.com/mailman/listinfo/paraview

Reply via email to