FYI -- C++ RTTI is not enabled by default on the AIX C++ compiler..... this is one of the reasons why we have long discouraged use of "dynamic_cast" and type_id in the VTK code base.<br><br>See these warnings which are occurring because of the accidental sneak-in of some dynamic_cast and type_id usage in VTK code:
<br><a href="http://www.vtk.org/Testing/Sites/r06n01.pbm.ihost.com/AIX00CF53-xlC/20071129-0300-Nightly/BuildWarning.html">http://www.vtk.org/Testing/Sites/r06n01.pbm.ihost.com/AIX00CF53-xlC/20071129-0300-Nightly/BuildWarning.html
</a><br><br><br>David Cole<br><br><div><span class="gmail_quote">On 11/29/07, <b class="gmail_sendername">Mathieu Malaterre</b> <<a href="mailto:mathieu.malaterre@gmail.com">mathieu.malaterre@gmail.com</a>> wrote:</span>
<blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">Indeed this bug would only show up when loading the shared lib with<br>RTLD_LOCAL, you cannot compare addresses anymore.
<br><br>Ref:<br><a href="http://gcc.gnu.org/ml/gcc/2002-05/msg00869.html">http://gcc.gnu.org/ml/gcc/2002-05/msg00869.html</a><br>and<br><a href="http://lists.apple.com/archives/xcode-users/2006/Feb/msg00234.html">http://lists.apple.com/archives/xcode-users/2006/Feb/msg00234.html
</a><br><br>As far as I know a somewhat similar bug was found on AIX which was the<br>whole reason of vtkpython...I'll have to dig in the code to see what<br>was the fix.<br><br>-Mathieu<br><br>On Nov 29, 2007 5:44 PM, Mathieu Malaterre <
<a href="mailto:mathieu.malaterre@gmail.com">mathieu.malaterre@gmail.com</a>> wrote:<br>> Hi there,<br>><br>>   I have been struggling for a while today tracking down a bug on<br>> debian stable/gcc 3.3.5 (loading the shared lib from python).
<br>> Basically there is a bug in the operator== for std::type_info (as far<br>> as I understand), which prevent the following code from ImageIOBase to<br>> work correclty (*). I found a reference in the boost code, so I assume
<br>> there has been some version of gcc that suffered from it:<br>><br>> $ cat boost/function/function_base.hpp<br>> // Borrowed from Boost.Python library: determines the cases where we<br>> // need to use std::type_info::name to compare instead of operator==.
<br>> # if (defined(__GNUC__) && __GNUC__ >= 3) \<br>>  || defined(_AIX) \<br>>  || (   defined(__sgi) && defined(__host_mips))<br>> #  include <cstring><br>> #  define BOOST_FUNCTION_COMPARE_TYPE_ID(X,Y) \
<br>>      (std::strcmp((X).name(),(Y).name()) == 0)<br>> # else<br>> #  define BOOST_FUNCTION_COMPARE_TYPE_ID(X,Y) ((X)==(Y))<br>> #endif<br>><br>><br>> so the question is: the bug never showed up on *any* dashboards, is it
<br>> still a reasonable patch to apply ?<br>> And for reference the image was itk::Image< itk::Vector<float, 3>, 3>.<br>><br>> Thanks<br>> -Mathieu<br>><br>> (*)<br>> template <typename T>
<br>> bool<br>> itkSetPixelType(ImageIOBase *This,<br>>                 const std::type_info &ptype,<br>>                 ImageIOBase::IOComponentType ntype,<br>>                 T itkNotUsed( dummy ) )
<br>> {<br>>   if( ptype == typeid(T) )<br>>     {<br>>     This->SetNumberOfComponents(1);<br>>     This->SetComponentType(ntype);<br>>     This->SetPixelType(ImageIOBase::SCALAR);<br>>     return true;
<br>>     }<br>> ...<br>><br>> --<br>> Mathieu<br>><br><br><br><br>--<br>Mathieu<br>_______________________________________________<br>Insight-developers mailing list<br><a href="mailto:Insight-developers@itk.org">
Insight-developers@itk.org</a><br><a href="http://www.itk.org/mailman/listinfo/insight-developers">http://www.itk.org/mailman/listinfo/insight-developers</a><br></blockquote></div><br>