<div dir="ltr"><div>Hi Matt,</div><div><br></div>Done.<div><div><a href="http://review.source.kitware.com/15640" target="_blank">http://review.source.kitware.com/15640</a></div></div><div class="gmail_extra"><br><br><div class="gmail_quote">

On Wed, Jun 4, 2014 at 5:06 AM, Matt McCormick <span dir="ltr"><<a href="mailto:matt.mccormick@kitware.com" target="_blank">matt.mccormick@kitware.com</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-color:rgb(204,204,204);border-left-style:solid;padding-left:1ex">Hi Rashad,<br>
<br>
Great work on the patch.<br>
<br>
Could it please be uploaded to Gerrit [1]?. This will allow you to<br>
retain authorship, have a conversation easily around the code, and get<br>
cross-platform testing.<br>
<br>
Thanks,<br>
Matt<br>
<br>
[1] <a href="https://insightsoftwareconsortium.github.io/ITKBarCamp-doc/CommunitySoftwareProcess/SubmitAPatchToGerrit/index.html" target="_blank">https://insightsoftwareconsortium.github.io/ITKBarCamp-doc/CommunitySoftwareProcess/SubmitAPatchToGerrit/index.html</a><br>



<div><div><br>
<br>
On Mon, Jun 2, 2014 at 12:10 PM, Rashad M <<a href="mailto:mohammedrashadkm@gmail.com" target="_blank">mohammedrashadkm@gmail.com</a>> wrote:<br>
> Hello,<br>
><br>
> Please find attached patch to use system expat with ITK.<br>
><br>
><br>
> On Mon, Jun 2, 2014 at 2:40 PM, Rashad M <<a href="mailto:mohammedrashadkm@gmail.com" target="_blank">mohammedrashadkm@gmail.com</a>> wrote:<br>
>><br>
>><br>
>><br>
>><br>
>> On Mon, Jun 2, 2014 at 2:34 PM, Bradley Lowekamp <<a href="mailto:blowekamp@mail.nih.gov" target="_blank">blowekamp@mail.nih.gov</a>><br>
>> wrote:<br>
>>><br>
>>> Hello,<br>
>>><br>
>>> As the symbols in the ITK library are not managled. So if you try to use<br>
>>> the a system expat in conjunction with the ITK expat you could have<br>
>>> conflicting symbols and undefined behavior. Simply installing the header in<br>
>>> a different location will not solve this problem.<br>
>>><br>
>>> Configuring ITK to use a system expat will fully solve you problem.<br>
>>><br>
>>> You can find how other third party libraries did it here:<br>
>>><br>
>>><br>
>>> <a href="https://github.com/InsightSoftwareConsortium/ITK/blob/master/Modules/ThirdParty/JPEG/CMakeLists.txt" target="_blank">https://github.com/InsightSoftwareConsortium/ITK/blob/master/Modules/ThirdParty/JPEG/CMakeLists.txt</a><br>



>>><br>
>>> <a href="https://github.com/InsightSoftwareConsortium/ITK/blob/master/Modules/ThirdParty/TIFF/CMakeLists.txt" target="_blank">https://github.com/InsightSoftwareConsortium/ITK/blob/master/Modules/ThirdParty/TIFF/CMakeLists.txt</a><br>



>>><br>
>>> Would you like to try to create a patch to address this issue?<br>
>><br>
>><br>
>> Yes. I would like to try a patch<br>
>>><br>
>>><br>
>>> Thanks,<br>
>>> Brad<br>
>>><br>
>>> On Jun 2, 2014, at 8:22 AM, Rashad M <<a href="mailto:mohammedrashadkm@gmail.com" target="_blank">mohammedrashadkm@gmail.com</a>> wrote:<br>
>>><br>
>>><br>
>>><br>
>>><br>
>>> On Mon, Jun 2, 2014 at 2:07 PM, Bradley Lowekamp <<a href="mailto:blowekamp@mail.nih.gov" target="_blank">blowekamp@mail.nih.gov</a>><br>
>>> wrote:<br>
>>>><br>
>>>> Hello,<br>
>>>><br>
>>>> It would be quite reasonable to support using a system expact.<br>
>>>><br>
>>>> Could you please describe you problem a little clearer? Are you having<br>
>>>> problem compiling ITK? or an Application which uses ITK? or Issues compiling<br>
>>>> independent programs after ITK is installed?<br>
>>><br>
>>><br>
>>> My problem not with compiling/installing ITK but when compiling libkml, a<br>
>>> dependency of OTB which uses ITK. This uses an expat library and instead of<br>
>>> using  a system expat i wind up using expat from ITK as expat.h is installed<br>
>>> in <prefix>/include/ITK4.6. I can confirm using system expat doesnt have any<br>
>>> problem with libkml when used with OTB.<br>
>>><br>
>>> If you would like to have a look at bug report, see here[1]. I had a<br>
>>> temporary solution to build libkml before adding itk headers but a best<br>
>>> would be to have a fix in ITK' expat library.<br>
>>><br>
>>> The issue is coming using an installed version of ITK.<br>
>>> So if you are planning to upgrade expat library to its latest version or<br>
>>> use system expat then the problem is solved.<br>
>>><br>
>>> [1] <a href="http://bugs.orfeo-toolbox.org/view.php?id=879" target="_blank">http://bugs.orfeo-toolbox.org/view.php?id=879</a><br>
>>><br>
>>><br>
>>><br>
>>>><br>
>>>> Thanks,<br>
>>>> Brad<br>
>>>><br>
>>>> On Jun 1, 2014, at 3:29 AM, Rashad M <<a href="mailto:mohammedrashadkm@gmail.com" target="_blank">mohammedrashadkm@gmail.com</a>> wrote:<br>
>>>><br>
>>>> Hi,<br>
>>>><br>
>>>> Is there an option to install expat includes in a different location?<br>
>>>> For now its installed in <prefix>/include. This seems to be a problem when<br>
>>>> using a latest expat version and by default ITK's expat is included.<br>
>>>><br>
>>>> Or if it is possible to use a system expat to make sure that both ITK<br>
>>>> and other libraries uses same expat (latest version).<br>
>>>><br>
>>>> best would be to change location <prefix>/include/expat. So that cmake<br>
>>>> can be used to remove item from list of include directories.<br>
>>>><br>
>>>> eg:<br>
>>>> list(REMOVE_ITEM expat-includes itk-includes)<br>
>>>><br>
>>>> --<br>
>>>> Regards,<br>
>>>>    Rashad<br>
>>>> _______________________________________________<br>
>>>> Powered by <a href="http://www.kitware.com" target="_blank">www.kitware.com</a><br>
>>>><br>
>>>> Visit other Kitware open-source projects at<br>
>>>> <a href="http://www.kitware.com/opensource/opensource.html" target="_blank">http://www.kitware.com/opensource/opensource.html</a><br>
>>>><br>
>>>> Kitware offers ITK Training Courses, for more information visit:<br>
>>>> <a href="http://kitware.com/products/protraining.php" target="_blank">http://kitware.com/products/protraining.php</a><br>
>>>><br>
>>>> Please keep messages on-topic and check the ITK FAQ at:<br>
>>>> <a href="http://www.itk.org/Wiki/ITK_FAQ" target="_blank">http://www.itk.org/Wiki/ITK_FAQ</a><br>
>>>><br>
>>>> Follow this link to subscribe/unsubscribe:<br>
>>>> <a href="http://www.itk.org/mailman/listinfo/insight-developers" target="_blank">http://www.itk.org/mailman/listinfo/insight-developers</a><br>
>>>><br>
>>>><br>
>>><br>
>>><br>
>>><br>
>>> --<br>
>>> Regards,<br>
>>>    Rashad<br>
>>><br>
>>><br>
>><br>
>><br>
>><br>
>> --<br>
>> Regards,<br>
>>    Rashad<br>
><br>
><br>
><br>
><br>
> --<br>
> Regards,<br>
>    Rashad<br>
><br>
> _______________________________________________<br>
> Powered by <a href="http://www.kitware.com" target="_blank">www.kitware.com</a><br>
><br>
> Visit other Kitware open-source projects at<br>
> <a href="http://www.kitware.com/opensource/opensource.html" target="_blank">http://www.kitware.com/opensource/opensource.html</a><br>
><br>
> Kitware offers ITK Training Courses, for more information visit:<br>
> <a href="http://kitware.com/products/protraining.php" target="_blank">http://kitware.com/products/protraining.php</a><br>
><br>
> Please keep messages on-topic and check the ITK FAQ at:<br>
> <a href="http://www.itk.org/Wiki/ITK_FAQ" target="_blank">http://www.itk.org/Wiki/ITK_FAQ</a><br>
><br>
> Follow this link to subscribe/unsubscribe:<br>
> <a href="http://www.itk.org/mailman/listinfo/insight-developers" target="_blank">http://www.itk.org/mailman/listinfo/insight-developers</a><br>
><br>
</div></div>> _______________________________________________<br>
> Community mailing list<br>
> <a href="mailto:Community@itk.org" target="_blank">Community@itk.org</a><br>
> <a href="http://public.kitware.com/cgi-bin/mailman/listinfo/community" target="_blank">http://public.kitware.com/cgi-bin/mailman/listinfo/community</a><br>
><br>
</blockquote></div><br><br clear="all"><div><br></div>-- <br><div><font face="arial, helvetica, sans-serif">Regards,<br>   Rashad</font></div>
</div></div>