<html><head><meta http-equiv="Content-Type" content="text/html charset=utf-8"></head><body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space;" class="">That did not seem to help either. Any more ideas? Does ITK build some intermediate static libraries that have “managers” that load filters? I ran into an issue with our own code where we had static libraries with singleton “manager” design patterns that turned out not to work due to each library getting its own singleton instance.<br class=""><div apple-content-edited="true" class="">
<div style="color: rgb(0, 0, 0); letter-spacing: normal; orphans: auto; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; widows: auto; word-spacing: 0px; -webkit-text-stroke-width: 0px; word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space;" class="">--</div><div style="color: rgb(0, 0, 0); letter-spacing: normal; orphans: auto; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; widows: auto; word-spacing: 0px; -webkit-text-stroke-width: 0px; word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space;" class="">Mike Jackson [<a href="mailto:mike.jackson@bluequartz.net" class="">mike.jackson@bluequartz.net</a>]<br class=""><br class=""></div>
</div>
<br class=""><div><blockquote type="cite" class=""><div class="">On Oct 30, 2015, at 4:07 PM, Matt McCormick <<a href="mailto:matt.mccormick@kitware.com" class="">matt.mccormick@kitware.com</a>> wrote:</div><br class="Apple-interchange-newline"><div class="">Thanks for the information.<br class=""><br class="">It is hard to tell, but maybe it is related to factory registration.<br class="">To test, try this:<br class=""><br class="">In the plugin CMake code, add<br class=""><br class=""> set(ITK_NO_IO_FACTORY_REGISTER_MANAGER 1)<br class=""><br class="">before<br class=""><br class=""> include(${ITK_USE_FILE})<br class=""><br class="">Then see if neither plugins work, both plugins work, and one of the<br class="">plugins works.<br class=""><br class="">HTH,<br class="">Matt<br class=""><br class="">On Fri, Oct 30, 2015 at 1:36 PM, Michael Jackson<br class=""><<a href="mailto:mike.jackson@bluequartz.net" class="">mike.jackson@bluequartz.net</a>> wrote:<br class=""><blockquote type="cite" class="">Some more data. If we create an intermediate library that links to ITK, called ITKSupport, and then have our plugins link against ITKSupport then the code executes correctly. Just another data point.<br class="">--<br class="">Michael A. Jackson<br class="">BlueQuartz Software, LLC<br class="">[e]: <a href="mailto:mike.jackson@bluequartz.net" class="">mike.jackson@bluequartz.net</a><br class=""><br class=""><blockquote type="cite" class="">On Oct 30, 2015, at 12:57 PM, Michael Jackson <<a href="mailto:mike.jackson@bluequartz.net" class="">mike.jackson@bluequartz.net</a>> wrote:<br class=""><br class="">Yes. Verified. Both plugins are built as part of DREAM.3D and we don’t put any extra CXX_FLAGS in any of the CMake files. We also built with VERBOSE=1 and looked at the compile commands to ensure that what we wanted was actually being used. Then we looked at the libraries themselves with otool -L to ensure they all link against libC++. Which they do.<br class=""><br class=""><br class="">--<br class="">Michael A. Jackson<br class="">BlueQuartz Software, LLC<br class="">[e]: <a href="mailto:mike.jackson@bluequartz.net" class="">mike.jackson@bluequartz.net</a><br class=""><br class=""><blockquote type="cite" class="">On Oct 30, 2015, at 12:05 PM, Matt McCormick <<a href="mailto:matt.mccormick@kitware.com" class="">matt.mccormick@kitware.com</a>> wrote:<br class=""><br class="">Hi Michael,<br class=""><br class="">Sorry to be redundant, and just to be sure: are both A.plugin and<br class="">B.plugin built with the same C++ standard library, OSX deployment<br class="">target, and C++ standard?<br class=""><br class="">Thanks,<br class="">Matt<br class=""><br class="">On Fri, Oct 30, 2015 at 11:35 AM, Michael Jackson<br class=""><<a href="mailto:mike.jackson@bluequartz.net" class="">mike.jackson@bluequartz.net</a>> wrote:<br class=""><blockquote type="cite" class=""><br class=""><br class=""><blockquote type="cite" class="">On Oct 29, 2015, at 11:40 AM, Matt McCormick <<a href="mailto:matt.mccormick@kitware.com" class="">matt.mccormick@kitware.com</a>> wrote:<br class=""><br class="">On Thu, Oct 29, 2015 at 10:00 AM, Michael Jackson<br class=""><<a href="mailto:mike.jackson@bluequartz.net" class="">mike.jackson@bluequartz.net</a>> wrote:<br class=""><blockquote type="cite" class="">We also ran an experiment where we moved the ITK Dependency from just the<br class="">plugin down into one of our lower level libraries. So now we have the plugin<br class="">dependent on a lower level library which then is dependent on the ITK<br class="">Libraries. Now the code seems to execute and produce results. This was on OS<br class="">X 10.9 and 10.10. So it seems that there is some odd issue with loading the<br class="">ITK libraries through a plugin mechanism? Does ITK need the “-fPIC” added to<br class="">the list of compile commands?<br class=""></blockquote><br class="">If ITK is built in a plugin as shared libraries, then it will already<br class="">be built with -fPIC.<br class=""><br class=""><br class=""><blockquote type="cite" class="">Qt is actually built WITHOUT C++11 support but still links against libc++.<br class="">They (the Qt Devs) set the OS X Min Deployment Version to 10.7. I have no<br class="">idea what that triggers or not.<br class=""></blockquote><br class="">All code should be built with the same C++ standard and OSX deployment<br class="">target. When building ITK and related code, set<br class="">CMAKE_OSX_DEPLOYMENT_TARGET [1] to 10.7 to ensure all binaries are<br class="">using consistent libraries.<br class=""><br class="">HTH,<br class="">Matt<br class=""><br class="">[1] <a href="https://cmake.org/cmake/help/v3.3/variable/CMAKE_OSX_DEPLOYMENT_TARGET.html" class="">https://cmake.org/cmake/help/v3.3/variable/CMAKE_OSX_DEPLOYMENT_TARGET.html</a><br class=""></blockquote><br class="">Matt,<br class=""> We have verified that ALL dependent libraries are built with libC++, 10.7 as the min deployment, C++11 enabled. This goes for Boost, HDF5, Eigen, ITK, and Qt 5.5.1. We still have the issue. We can also reproduce that if we move the dependency to a lower level then the issue goes away. So it would seem that there is a problem with multiple plugins being dependent on the same External library. in this case it is ITK. I’ll try to diagram below.<br class="">## Failure Mode ##<br class="">A.plugin depends on ITK<br class="">A.plugin depends on SIMPlib.<br class=""><br class="">B.plugin depends on ITK<br class="">B.plugin depends on SIMPlib.<br class=""><br class="">B.plugin will fail to execute properly.<br class=""><br class="">## Success Mode ##<br class="">A.plugin depends on SIMPlib.<br class="">SIMPlib depends on ITK<br class=""><br class="">B.plugin depends on SIMPlib.<br class="">SIMPlib depends on ITK<br class=""><br class="">The DREAM.3D filters both execute properly and give the proper output.<br class=""><br class="">--<br class="">Michael A. Jackson<br class="">BlueQuartz Software, LLC<br class="">[e]: <a href="mailto:mike.jackson@bluequartz.net" class="">mike.jackson@bluequartz.net</a><br class="">_____________________________________<br class="">Powered by <a href="http://www.kitware.com" class="">www.kitware.com</a><br class=""><br class="">Visit other Kitware open-source projects at<br class=""><a href="http://www.kitware.com/opensource/opensource.html" class="">http://www.kitware.com/opensource/opensource.html</a><br class=""><br class="">Kitware offers ITK Training Courses, for more information visit:<br class="">http://www.kitware.com/products/protraining.php<br class=""><br class="">Please keep messages on-topic and check the ITK FAQ at:<br class="">http://www.itk.org/Wiki/ITK_FAQ<br class=""><br class="">Follow this link to subscribe/unsubscribe:<br class="">http://public.kitware.com/mailman/listinfo/insight-users<br class=""></blockquote></blockquote><br class=""></blockquote><br class=""></blockquote></div></blockquote></div><br class=""></body></html>