<div dir="ltr">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:<div><br></div><div>Inconsistency detected by ld.so: dl-close.c: 762: _dl_close: Assertion `map->l_init_called' failed!<br>

<br clear="all"><div>I've setup a basic project which demonstrates the issue:</div><div><br></div><div>CMakeLists.txt:</div><div><br></div><div>
<pre style="margin-top:0px;margin-bottom:0px"><span style="color:rgb(128,128,0)">find_package</span>(ParaView<span style="color:rgb(192,192,192)"> </span>REQUIRED)</pre>
<pre style="margin-top:0px;margin-bottom:0px"><span style="color:rgb(128,128,0)">find_package</span>(Boost<span style="color:rgb(192,192,192)"> </span>COMPONENTS<span style="color:rgb(192,192,192)"> </span>regex<span style="color:rgb(192,192,192)"> </span>REQUIRED)</pre>


<pre style="margin-top:0px;margin-bottom:0px"><span style="color:rgb(128,128,0)">include</span>(<span style="color:rgb(128,0,0)">${PARAVIEW_USE_FILE}</span>)</pre>
<pre style="margin-top:0px;margin-bottom:0px"><br></pre>
<pre style="margin-top:0px;margin-bottom:0px"><span style="color:rgb(128,128,0)">ADD_PARAVIEW_PLUGIN</span>(RegexProblem<span style="color:rgb(192,192,192)"> </span><span style="color:rgb(0,128,0)">"1.0"</span></pre>


<pre style="margin-top:0px;margin-bottom:0px"><span style="color:rgb(192,192,192)">  </span>SERVER_MANAGER_XML<span style="color:rgb(192,192,192)"> </span>reader.xml</pre>
<pre style="margin-top:0px;margin-bottom:0px"><span style="color:rgb(192,192,192)">  </span>SERVER_MANAGER_SOURCES<span style="color:rgb(192,192,192)"> </span>main.cpp</pre>
<pre style="margin-top:0px;margin-bottom:0px"><span style="color:rgb(192,192,192)">  </span>)</pre>
<pre style="margin-top:0px;margin-bottom:0px"><br></pre>
<pre style="margin-top:0px;margin-bottom:0px"><span style="color:rgb(128,128,0)">target_link_libraries</span>(RegexProblem<span style="color:rgb(192,192,192)"> </span>PRIVATE</pre>
<pre style="margin-top:0px;margin-bottom:0px"><span style="color:rgb(192,192,192)">  </span><span style="color:rgb(128,0,0)">${Boost_REGEX_LIBRARY}</span></pre>
<pre style="margin-top:0px;margin-bottom:0px">)</pre>
<pre style="margin-top:0px;margin-bottom:0px"><br></pre><pre style="margin-top:0px;margin-bottom:0px">Then I added a simple regex search to the RequestData function:</pre><pre style="margin-top:0px;margin-bottom:0px"><br>

</pre><pre style="margin-top:0px;margin-bottom:0px"><pre style="margin-top:0px;margin-bottom:0px"><span style="color:rgb(0,0,128)">#include</span><span style="color:rgb(192,192,192)"> </span><span style="color:rgb(0,128,0)"><boost/regex.hpp></span></pre>

<pre style="margin-top:0px;margin-bottom:0px"><span style="color:rgb(0,128,0)"><br></span></pre></pre><pre style="margin-top:0px;margin-bottom:0px"><pre style="margin-top:0px;margin-bottom:0px"><span style="color:rgb(128,128,0)">int</span><span style="color:rgb(192,192,192)"> </span><span style="color:rgb(128,0,128)">main</span><span style="color:rgb(0,0,0)">::</span><span style="font-style:italic;color:rgb(0,0,0)">RequestData</span><span style="color:rgb(0,0,0)">(</span><span style="color:rgb(128,0,128)">vtkInformation</span><span style="color:rgb(192,192,192)"> </span><span style="color:rgb(0,0,0)">*</span><span style="color:rgb(0,0,0)">request</span><span style="color:rgb(0,0,0)">,</span><span style="color:rgb(192,192,192)"> </span><span style="color:rgb(128,0,128)">vtkInformationVector</span><span style="color:rgb(192,192,192)"> </span><span style="color:rgb(0,0,0)">**</span><span style="color:rgb(0,0,0)">inVec</span><span style="color:rgb(0,0,0)">,</span><span style="color:rgb(192,192,192)"> </span><span style="color:rgb(128,0,128)">vtkInformationVector</span><span style="color:rgb(192,192,192)"> </span><span style="color:rgb(0,0,0)">*</span><span style="color:rgb(0,0,0)">outVec</span><span style="color:rgb(0,0,0)">)</span></pre>


<pre style="margin-top:0px;margin-bottom:0px"><span style="color:rgb(0,0,0)">{</span></pre><pre style="margin-top:0px;margin-bottom:0px"><span style="color:rgb(192,192,192)">  </span><span style="color:rgb(128,0,128)">std</span><span style="color:rgb(0,0,0)">::</span><span style="color:rgb(128,0,128)">string</span><span style="color:rgb(192,192,192)"> </span><span style="color:rgb(0,0,0)">base_name</span><span style="color:rgb(192,192,192)"> </span><span style="color:rgb(0,0,0)">=</span><span style="color:rgb(192,192,192)"> </span><span style="color:rgb(0,128,0)">"ab12cd34"</span><span style="color:rgb(0,0,0)">;</span></pre>

<pre style="margin-top:0px;margin-bottom:0px"><span style="color:rgb(192,192,192)">  </span><span style="color:rgb(128,0,128)">boost</span><span style="color:rgb(0,0,0)">::</span><span style="color:rgb(128,0,128)">regex</span><span style="color:rgb(192,192,192)"> </span><span style="color:rgb(0,0,0)">last_num</span><span style="color:rgb(0,0,0)">(</span><span style="color:rgb(0,128,0)">"\\d+$"</span><span style="color:rgb(0,0,0)">);</span></pre>

<pre style="margin-top:0px;margin-bottom:0px"><span style="color:rgb(192,192,192)">  </span><span style="color:rgb(128,0,128)">boost</span><span style="color:rgb(0,0,0)">::</span><span style="color:rgb(128,0,128)">match_results</span><span style="color:rgb(0,0,0)"><</span><span style="color:rgb(128,0,128)">std</span><span style="color:rgb(0,0,0)">::</span><span style="color:rgb(128,0,128)">string</span><span style="color:rgb(0,0,0)">::</span><span style="color:rgb(128,0,128)">iterator</span><span style="color:rgb(0,0,0)">></span><span style="color:rgb(192,192,192)"> </span><span style="color:rgb(0,0,0)">match</span><span style="color:rgb(0,0,0)">;</span></pre>

<pre style="margin-top:0px;margin-bottom:0px"><span style="color:rgb(0,0,0)">  // The next line is the one which triggers the issue</span></pre><pre style="margin-top:0px;margin-bottom:0px"><span style="color:rgb(192,192,192)">  </span><span style="color:rgb(128,0,128)">boost</span><span style="color:rgb(0,0,0)">::</span><span style="color:rgb(0,0,0)">regex_search</span><span style="color:rgb(0,0,0)">(</span><span style="color:rgb(0,0,0)">base_name</span><span style="color:rgb(0,0,0)">.</span><span style="color:rgb(0,0,0)">begin</span><span style="color:rgb(0,0,0)">(),</span><span style="color:rgb(192,192,192)"> </span><span style="color:rgb(0,0,0)">base_name</span><span style="color:rgb(0,0,0)">.</span><span style="color:rgb(0,0,0)">end</span><span style="color:rgb(0,0,0)">(),</span><span style="color:rgb(192,192,192)"> </span><span style="color:rgb(0,0,0)">match</span><span style="color:rgb(0,0,0)">,</span><span style="color:rgb(192,192,192)"> </span><span style="color:rgb(0,0,0)">last_num</span><span style="color:rgb(0,0,0)">);</span></pre>

<pre style="margin-top:0px;margin-bottom:0px"><span style="color:rgb(192,192,192)">  </span><span style="color:rgb(128,128,0)">return</span><span style="color:rgb(192,192,192)"> </span><span style="color:rgb(0,0,128)">1</span><span style="color:rgb(0,0,0)">;</span></pre>

<pre style="margin-top:0px;margin-bottom:0px"><span style="color:rgb(0,0,0)">}</span></pre></pre></div><div><br></div><div>I don't have any issues with other libraries (filesystem, system, hdf5).</div><div><br></div>
<div>
I've also tried creating a separate executable which calls dlopen/dlclose on the library and have had no issues.</div><div><br></div><div>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)<br>

</div></div><div><br></div><div>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.</div>

</div>