[Insight-developers] Problem again in NRRDIO

Gordon L. Kindlmann glk at uchicago.edu
Tue Mar 23 16:26:41 EDT 2010


hi,

> 165a169,178
> > #define _nrrdSprintCH itk__nrrdSprintCH
> > #define _nrrdSprintDB itk__nrrdSprintDB
> > #define _nrrdSprintFL itk__nrrdSprintFL
> > #define _nrrdSprintIN itk__nrrdSprintIN
> > #define _nrrdSprintLL itk__nrrdSprintLL
> > #define _nrrdSprintSH itk__nrrdSprintSH
> > #define _nrrdSprintUC itk__nrrdSprintUC 	
> > #define _nrrdSprintUI itk__nrrdSprintUI 	
> > #define _nrrdSprintUL itk__nrrdSprintUL 	
> > #define _nrrdSprintUS itk__nrrdSprintUS

Are these actually needed now, or are they what was with the previous  
NrrdIO?

These symbols are now "static" (as they should have been previously),  
so they shouldn't be showing up in nm output.

Gordon

On Mar 23, 2010, at 3:16 PM, Daniel Blezek wrote:

> <Edit>Mailman didn't like my 40K posting.  Diff attached.
>
>
> Here is my hand-edited itk_NrrdIO_mangle.h.  It properly links  
> against the
> Teem libraries.  Perhaps it will help tease out the missing  
> symbols.  FYI,
> we link against Teem 1.11.
>
> Thanks,
> -dan
>
>
> On 3/23/10 12:42 PM, "Bill Lorensen" <bill.lorensen at gmail.com> wrote:
>
>> The other libraries have instructions like this:
>> The following commands were used to obtain the symbol list:
>>
>> nm libitktiff.a |grep " T "
>> nm libitktiff.a |grep " D "
>> nm libitktiff.a |grep " R "
>>
>> which is similar to what the pl script is doing.
>>
>> On Tue, Mar 23, 2010 at 11:30 AM, Gordon L. Kindlmann <glk at uchicago.edu 
>> >
>> wrote:
>>> Hi,
>>>
>>> Yes, grepping for those symbols on the "nm" output on Michel's  
>>> NrrdIO build
>>> will clarify how to correctly filter the results in the mangle.pl  
>>> script,
>>> which can be fixed.
>>>
>>> On the other hand, it would be interesting to learn how other  
>>> libraries
>>> (zlib, png) are name-mangled: are there automatic scripts, or were  
>>> symbol
>>> lists generated by hand?
>>>
>>> Gordon
>>>
>>> On Mar 23, 2010, at 1:12 PM, Bill Lorensen wrote:
>>>
>>>> Is it possible to fix the mangle.pl script? Otherwise, this will  
>>>> happen
>>>> again.
>>>>
>>>> Bill
>>>>
>>>> On Tue, Mar 23, 2010 at 11:10 AM, Michel Audette
>>>> <michel.audette at kitware.com> wrote:
>>>>>
>>>>> Hi gents,
>>>>>
>>>>> I'll look into this later today and tomorrow.
>>>>>
>>>>> Daniel, sorry about your tribulations. It's possible that my  
>>>>> edits caused
>>>>> bugs not picked up by the existing tests.
>>>>>
>>>>> I'll report back shortly.
>>>>>
>>>>> Best wishes,
>>>>>
>>>>> Michel
>>>>>
>>>>> On Tue, Mar 23, 2010 at 2:07 PM, Gordon L. Kindlmann <glk at uchicago.edu 
>>>>> >
>>>>> wrote:
>>>>>>
>>>>>> Hello,
>>>>>>
>>>>>> Shoot- sorry about this; I was just thinking the NrrdIO update  
>>>>>> was
>>>>>> finished!
>>>>>>
>>>>>> There indeed probably aren't any tests for checking compiling
>>>>>> applications
>>>>>> against both Teem (containing the air, biff, and nrrd libraries  
>>>>>> that
>>>>>> these
>>>>>> symbols are coming from) and ITK (containing NrrdIO, the  
>>>>>> fraction of
>>>>>> Teem
>>>>>> required for Nrrd file IO).  Aren't Slicer builds doing this?   
>>>>>> Are there
>>>>>> analogous tests for, say, compiling applications against non- 
>>>>>> ITK zlib
>>>>>> and
>>>>>> ITK name-mangled zlib, which can be copied from?
>>>>>>
>>>>>> I can tell that these names are for the global variables that  
>>>>>> exist in
>>>>>> NrrdIO.  These are probably not getting correctly picked up  
>>>>>> from the
>>>>>> list of
>>>>>> symbols in the NrrdIO library, which mangle.pl does by using  
>>>>>> "nm".
>>>>>>
>>>>>> Michel, can go through the NrrdIO process on whatever platform  
>>>>>> you used
>>>>>> last, and at the point of running mangle.pl, can you run "nm"  
>>>>>> manually
>>>>>> and
>>>>>> grep for, say, _nrrdStateGrayscaleImage3D, and see how that  
>>>>>> symbol is
>>>>>> identified?  Line 66 of mangle.pl apparently is missing this.
>>>>>>
>>>>>> Gordon
>>>>>>
>>>>>> On Mar 23, 2010, at 12:33 PM, Daniel Blezek wrote:
>>>>>>
>>>>>>> Hi,
>>>>>>>
>>>>>>>  We link both against NRRD and ITK in our applications.  At  
>>>>>>> the end of
>>>>>>> February, the mangled ITK names were changed from what I fixed.
>>>>>>>  Clearly,
>>>>>>> this is not tested properly, because today I updated ITK and  
>>>>>>> re-built:
>>>>>>>
>>>>>>> 34>ITKNrrdIO.lib(string.obj) : error LNK2005:  
>>>>>>> _airStrtokQuoting already
>>>>>>> defined in teem.lib(string.obj)
>>>>>>> 34>ITKNrrdIO.lib(defaultsNrrd.obj) : error LNK2005:  
>>>>>>> _nrrdStateVerboseIO
>>>>>>> already defined in teem.lib(defaultsNrrd.obj)
>>>>>>> 34>ITKNrrdIO.lib(defaultsNrrd.obj) : error LNK2005:
>>>>>>> _nrrdStateKeyValuePairsPropagate already defined in
>>>>>>> teem.lib(defaultsNrrd.obj)
>>>>>>> 34>ITKNrrdIO.lib(defaultsNrrd.obj) : error LNK2005:
>>>>>>> _nrrdStateDisableContent already defined in  
>>>>>>> teem.lib(defaultsNrrd.obj)
>>>>>>> 34>ITKNrrdIO.lib(defaultsNrrd.obj) : error LNK2005:
>>>>>>> _nrrdStateGrayscaleImage3D already defined in
>>>>>>> teem.lib(defaultsNrrd.obj)
>>>>>>> 34>ITKNrrdIO.lib(defaultsNrrd.obj) : error LNK2005:
>>>>>>> _nrrdStateKeyValueReturnInternalPointers already defined in
>>>>>>> teem.lib(defaultsNrrd.obj)
>>>>>>> 34>ITKNrrdIO.lib(defaultsNrrd.obj) : error LNK2005:  
>>>>>>> _nrrdStateKindNoop
>>>>>>> already defined in teem.lib(defaultsNrrd.obj)
>>>>>>> 34>ITKNrrdIO.lib(biffmsg.obj) : error LNK2005: __biffMsgNoop  
>>>>>>> already
>>>>>>> defined in teem.lib(biffmsg.obj)
>>>>>>> 34>ITKNrrdIO.lib(dio.obj) : error LNK2005: _airDisableDio  
>>>>>>> already
>>>>>>> defined
>>>>>>> in teem.lib(dio.obj)
>>>>>>>
>>>>>>> Could “Michel” (according to CVS) please have a closer look at  
>>>>>>> this?  I
>>>>>>> had tweaked this once before, and my changes were blown away  
>>>>>>> by the
>>>>>>> (broken)
>>>>>>> mangle.pl script.
>>>>>>>
>>>>>>> I’ll go back through and manually add the names if necessary.
>>>>>>>
>>>>>>> Cheers,
>>>>>>> -dan
>>>>>>>
>>>>>>> --
>>>>>>> Daniel Blezek, PhD
>>>>>>> Medical Imaging Informatics Innovation Center
>>>>>>>
>>>>>>> P 127 or (77) 8 8886
>>>>>>> T 507 538 8886
>>>>>>> E blezek.daniel at mayo.edu
>>>>>>>
>>>>>>> Mayo Clinic
>>>>>>> 200 First St. S.W.
>>>>>>> Harwick SL-44
>>>>>>> Rochester, MN 55905
>>>>>>> mayoclinic.org
>>>>>>>
>>>>>>> _______________________________________________
>>>>>>> Powered by www.kitware.com
>>>>>>>
>>>>>>> Visit other Kitware open-source projects at
>>>>>>> http://www.kitware.com/opensource/opensource.html
>>>>>>>
>>>>>>> Kitware offers ITK Training Courses, for more information visit:
>>>>>>> http://kitware.com/products/protraining.html
>>>>>>>
>>>>>>> Please keep messages on-topic and check the ITK FAQ at:
>>>>>>> http://www.itk.org/Wiki/ITK_FAQ
>>>>>>>
>>>>>>> Follow this link to subscribe/unsubscribe:
>>>>>>> http://www.itk.org/mailman/listinfo/insight-developers
>>>>>>
>>>>>> _______________________________________________
>>>>>> Powered by www.kitware.com
>>>>>>
>>>>>> Visit other Kitware open-source projects at
>>>>>> http://www.kitware.com/opensource/opensource.html
>>>>>>
>>>>>> Kitware offers ITK Training Courses, for more information visit:
>>>>>> http://kitware.com/products/protraining.html
>>>>>>
>>>>>> Please keep messages on-topic and check the ITK FAQ at:
>>>>>> http://www.itk.org/Wiki/ITK_FAQ
>>>>>>
>>>>>> Follow this link to subscribe/unsubscribe:
>>>>>> http://www.itk.org/mailman/listinfo/insight-developers
>>>>>
>>>>>
>>>>>
>>>>> --
>>>>> Michel Audette, Ph.D.
>>>>> R & D Engineer,
>>>>> Kitware Inc.,
>>>>> Chapel Hill, N.C.
>>>>>
>>>>>
>>>>> _______________________________________________
>>>>> Powered by www.kitware.com
>>>>>
>>>>> Visit other Kitware open-source projects at
>>>>> http://www.kitware.com/opensource/opensource.html
>>>>>
>>>>> Kitware offers ITK Training Courses, for more information visit:
>>>>> http://kitware.com/products/protraining.html
>>>>>
>>>>> Please keep messages on-topic and check the ITK FAQ at:
>>>>> http://www.itk.org/Wiki/ITK_FAQ
>>>>>
>>>>> Follow this link to subscribe/unsubscribe:
>>>>> http://www.itk.org/mailman/listinfo/insight-developers
>>>>>
>>>>>
>>>>
>>>
>>>
>
> -- 
> Daniel Blezek, PhD
> Medical Imaging Informatics Innovation Center
>
> P 127 or (77) 8 8886
> T 507 538 8886
> E blezek.daniel at mayo.edu
>
> Mayo Clinic
> 200 First St. S.W.
> Harwick SL-44
> Rochester, MN 55905
> mayoclinic.org
>
>
> <Diff.txt>



More information about the Insight-developers mailing list