[Insight-users] dynamic loader + GDCM
William A. Hoffman
billlist at nycap.rr.com
Mon Sep 12 11:44:52 EDT 2005
Are you sure that everything is being built 64bit?
I know 64 bit programs do not like to load 32 bit .so's,
and 32 bit programs do not load 64 bit .so's.
-Bill
At 10:00 AM 9/12/2005, Stefan Klein wrote:
>Hello,
>
>We have a problem with using the itkDynamicLoader in combination with the GDCM library.
>
>A little test program is attached to this email.
>In the main function (defined in amain.cxx), we are trying to load a dynamic library at runtime. In the attached example this library is called "libadll.so". In this library one function is defined, called "afunc", which does nothing more than printing some stuff to the screen and creating an instance of the GDCMImageIO class. After calling 'afunc' from the lib the main program also creates an instance of the GDCMImageIO class. No errors occur until this moment, but when closing the program a SEGMENTATION FAULT is generated.
>
>The problem does not occur with other imageIO classes.
>
>We use:
>GCC 3.4.2 on a 64bit linux system (AMD opteron).
>ITK 2.2, compiled with CMAKE_C_FLAGS and CMAKE_CXX_FLAGS set to -fPIC. This is necessary, otherwise the program does not compile at all.
>
>With ITK 2.0 an other error is given on exiting:
>*** glibc detected *** double free or corruption (!prev): 0x000000000061d0e0 ***
>
>Any ideas on what the problem is in the GDCM library? Can anybody reproduce this error?
>
>Apart from this problem with the GDCM library, we noticed that the ::LastError() function in the itk::DynamicLoader does not work at all. It produces a segmentation fault.
>
>Thanks in advance,
>
>Marius Staring and Stefan Klein.
>
>
>
>
>
>
>
>
>_______________________________________________
>Insight-users mailing list
>Insight-users at itk.org
>http://www.itk.org/mailman/listinfo/insight-users
More information about the Insight-users
mailing list