[ITK-dev] [ITK] ITK and old expat library

Matt McCormick matt.mccormick at kitware.com
Tue Jun 3 23:06:24 EDT 2014


Hi Rashad,

Great work on the patch.

Could it please be uploaded to Gerrit [1]?. This will allow you to
retain authorship, have a conversation easily around the code, and get
cross-platform testing.

Thanks,
Matt

[1] https://insightsoftwareconsortium.github.io/ITKBarCamp-doc/CommunitySoftwareProcess/SubmitAPatchToGerrit/index.html


On Mon, Jun 2, 2014 at 12:10 PM, Rashad M <mohammedrashadkm at gmail.com> wrote:
> Hello,
>
> Please find attached patch to use system expat with ITK.
>
>
> On Mon, Jun 2, 2014 at 2:40 PM, Rashad M <mohammedrashadkm at gmail.com> wrote:
>>
>>
>>
>>
>> On Mon, Jun 2, 2014 at 2:34 PM, Bradley Lowekamp <blowekamp at mail.nih.gov>
>> wrote:
>>>
>>> Hello,
>>>
>>> As the symbols in the ITK library are not managled. So if you try to use
>>> the a system expat in conjunction with the ITK expat you could have
>>> conflicting symbols and undefined behavior. Simply installing the header in
>>> a different location will not solve this problem.
>>>
>>> Configuring ITK to use a system expat will fully solve you problem.
>>>
>>> You can find how other third party libraries did it here:
>>>
>>>
>>> https://github.com/InsightSoftwareConsortium/ITK/blob/master/Modules/ThirdParty/JPEG/CMakeLists.txt
>>>
>>> https://github.com/InsightSoftwareConsortium/ITK/blob/master/Modules/ThirdParty/TIFF/CMakeLists.txt
>>>
>>> Would you like to try to create a patch to address this issue?
>>
>>
>> Yes. I would like to try a patch
>>>
>>>
>>> Thanks,
>>> Brad
>>>
>>> On Jun 2, 2014, at 8:22 AM, Rashad M <mohammedrashadkm at gmail.com> wrote:
>>>
>>>
>>>
>>>
>>> On Mon, Jun 2, 2014 at 2:07 PM, Bradley Lowekamp <blowekamp at mail.nih.gov>
>>> wrote:
>>>>
>>>> Hello,
>>>>
>>>> It would be quite reasonable to support using a system expact.
>>>>
>>>> Could you please describe you problem a little clearer? Are you having
>>>> problem compiling ITK? or an Application which uses ITK? or Issues compiling
>>>> independent programs after ITK is installed?
>>>
>>>
>>> My problem not with compiling/installing ITK but when compiling libkml, a
>>> dependency of OTB which uses ITK. This uses an expat library and instead of
>>> using  a system expat i wind up using expat from ITK as expat.h is installed
>>> in <prefix>/include/ITK4.6. I can confirm using system expat doesnt have any
>>> problem with libkml when used with OTB.
>>>
>>> If you would like to have a look at bug report, see here[1]. I had a
>>> temporary solution to build libkml before adding itk headers but a best
>>> would be to have a fix in ITK' expat library.
>>>
>>> The issue is coming using an installed version of ITK.
>>> So if you are planning to upgrade expat library to its latest version or
>>> use system expat then the problem is solved.
>>>
>>> [1] http://bugs.orfeo-toolbox.org/view.php?id=879
>>>
>>>
>>>
>>>>
>>>> Thanks,
>>>> Brad
>>>>
>>>> On Jun 1, 2014, at 3:29 AM, Rashad M <mohammedrashadkm at gmail.com> wrote:
>>>>
>>>> Hi,
>>>>
>>>> Is there an option to install expat includes in a different location?
>>>> For now its installed in <prefix>/include. This seems to be a problem when
>>>> using a latest expat version and by default ITK's expat is included.
>>>>
>>>> Or if it is possible to use a system expat to make sure that both ITK
>>>> and other libraries uses same expat (latest version).
>>>>
>>>> best would be to change location <prefix>/include/expat. So that cmake
>>>> can be used to remove item from list of include directories.
>>>>
>>>> eg:
>>>> list(REMOVE_ITEM expat-includes itk-includes)
>>>>
>>>> --
>>>> Regards,
>>>>    Rashad
>>>> _______________________________________________
>>>> 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.php
>>>>
>>>> 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
>>>>
>>>>
>>>
>>>
>>>
>>> --
>>> Regards,
>>>    Rashad
>>>
>>>
>>
>>
>>
>> --
>> Regards,
>>    Rashad
>
>
>
>
> --
> Regards,
>    Rashad
>
> _______________________________________________
> 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.php
>
> 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
>
> _______________________________________________
> Community mailing list
> Community at itk.org
> http://public.kitware.com/cgi-bin/mailman/listinfo/community
>


More information about the Insight-developers mailing list