<html><head><meta http-equiv="Content-Type" content="text/html charset=iso-8859-1"><meta http-equiv="Content-Type" content="text/html charset=iso-8859-1"></head><body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space;">I don't understand where or why these variable were causing the problem. It is just some CMake script which is not correctly handling when then are empty strings?<div><br></div><div>Brad<br><div><div>On Feb 6, 2014, at 4:55 PM, Jean-Christophe Fillion-Robin <<a href="mailto:jchris.fillionr@kitware.com">jchris.fillionr@kitware.com</a>> wrote:</div><br class="Apple-interchange-newline"><blockquote type="cite"><meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1"><div dir="ltr"><div><div><div><div><div><div><div>Hi Folks, <br><br>May be ITK could include a module similar to what is done in Slicer (originally grabbed from paraview). See [1]<br><br>[1] <a href="https://github.com/Slicer/Slicer/blob/master/CMake/SlicerBlockSetCMakeOSXVariables.cmake">https://github.com/Slicer/Slicer/blob/master/CMake/SlicerBlockSetCMakeOSXVariables.cmake</a><br>

<br></div>Then, by simply doing:<br><br></div>  include(ITKOSXVariables)<br><br></div>before <br><br>  project(ITK ...)<br><br></div>everything would be set by default.<br><br></div>This approach turns out to be very useful and saved our user a lot of headaches.<br>

<br></div>Hth<br></div>Jc<br></div><div class="gmail_extra"><br><br><div class="gmail_quote">On Thu, Feb 6, 2014 at 4:32 PM, Padfield, Dirk R (GE Global Research) <span dir="ltr"><<a href="mailto:padfield@research.ge.com" target="_blank">padfield@research.ge.com</a>></span> wrote:<br>

<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">Hi All,<br>
<br>
I just got everything to work.  I needed to set the OSX variables in CMake.  When I did this for the git version, it all compiled correctly.  Below are the three needed settings.  Where is the best place where we can document this for others?<br>


<br>
Thanks,<br>
Dirk<br>
<br>
CMAKE_OSX_SYSROOT:PATH=/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.9.sdk<br>
<br>
CMAKE_OSX_DEPLOYMENT_TARGET:STRING=10.9<br>
<br>
CMAKE_OSX_ARCHITECTURES:STRING=x86_64<br>
<div class="im HOEnZb"><br>
<br>
On Feb 6, 2014, at 1:47 PM, Bradley Lowekamp <<a href="mailto:blowekamp@mail.nih.gov">blowekamp@mail.nih.gov</a>><br>
 wrote:<br>
<br>
</div><div class="HOEnZb"><div class="h5">> Dirk,<br>
><br>
> 1) You are not using GNU's GCC. Apple has LLVM  alias as gcc.<br>
><br>
> 2)  I think you are on the right track with changing the c++ standard library. However this should be a flag for the compiler too. Before doing a fresh configure to a CLEAN build directory, set the CXX_FLAGS environmental variable to "-stdlib=libc++", with "export CXX_FLAGS=-stdlib=libc++". CMake should pick that up and place it in the CMAKE_CXX_FLAGS variable, also I think SCIFIO does some type of external project, so hopefully this environmental variable will help it get propagated there too.<br>


><br>
> Good luck,<br>
> Brad<br>
><br>
> On Feb 6, 2014, at 1:01 PM, Padfield, Dirk R (GE Global Research) <<a href="mailto:padfield@research.ge.com">padfield@research.ge.com</a>> wrote:<br>
><br>
>> Hi Matt,<br>
>><br>
>> I started from a fresh build tree several times yesterday just to make sure (although I will try a fresh source tree today too).  I wiped the entire build tree and started from scratch twice.  I also built 4.5.0 from scratch yesterday, and it worked fine until I enabled "Module_SCIFIO" at which point it gave the same error as the git version.  At least it's consistent!<br>


>><br>
>> I tried adding the following flag to the linker<br>
>><br>
>> -stdlib=libstdc++<br>
>><br>
>> as suggested in <a href="http://mathematica.stackexchange.com/questions/34692/mathlink-linking-error-after-os-x-10-9-mavericks-upgrade" target="_blank">http://mathematica.stackexchange.com/questions/34692/mathlink-linking-error-after-os-x-10-9-mavericks-upgrade</a>, but that didn't help.  I'm not on OSX 10.9, but I am using Xcode 5.0.2.<br>


>><br>
>> Thanks,<br>
>> Dirk<br>
>><br>
>><br>
>> ________________________________________<br>
>> From: Matt McCormick [<a href="mailto:matt.mccormick@kitware.com">matt.mccormick@kitware.com</a>]<br>
>> Sent: Thursday, February 06, 2014 12:50 PM<br>
>> To: Padfield, Dirk R (GE Global Research)<br>
>> Cc: <a href="mailto:insight-developers@itk.org">insight-developers@itk.org</a><br>
>> Subject: Re: [ITK Community] [Insight-developers] Problem building ITK<br>
>><br>
>> Hi Dirk,<br>
>><br>
>> Starting from a a fresh source tree and a fresh build tree, does the<br>
>> problem persist?<br>
>><br>
>> Thanks,<br>
>> Matt<br>
>><br>
>> On Thu, Feb 6, 2014 at 12:01 PM, Padfield, Dirk R (GE Global Research)<br>
>> <<a href="mailto:padfield@research.ge.com">padfield@research.ge.com</a>> wrote:<br>
>>> Hi All,<br>
>>><br>
>>> I have a problem building ITK on my Mac that I wanted to ask about.  ITK builds all the way to the end but then fails when linking<br>
>>><br>
>>> Linking CXX shared library ../../../../lib/libitkSCIFIO-4.6.dylib<br>
>>> Undefined symbols for architecture x86_64:<br>
>>><br>
>>> This is followed by a string of errors inside of SCIFIOImageIO.<br>
>>><br>
>>> Here are my specs:<br>
>>> Mac OSX 10.8.5 (Mountain Lion)<br>
>>> Xcode 5.0.2<br>
>>> CMake 2.8.11<br>
>>> ITK latest git pull with:<br>
>>> BUILD_SHARED_LIBS = ON<br>
>>> CMAKE_BUILD_TYPE = RelWithDebInfo<br>
>>><br>
>>> Also, I am building with "Eclipse CDT4 - Unix Makefiles" and "specify native compilers" of "C = gcc" and "C++ = g++".<br>
>>><br>
>>> When running CMake on this version, there is no flag for "Module_SCIFIO".<br>
>>><br>
>>> By the way, I also tried downloading Insight-4.5.0 and building it exactly the same way, and it worked fine.  I noticed that in CMake for 4.5.0, it has a flag "Module_SCIFIO", which is off by default.  But if I turn this flag on and rebuild, I get the same issue described above.<br>


>>><br>
>>> Does anyone have any ideas?<br>
>>><br>
>>> Thanks,<br>
>>> Dirk<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>
>>> Community mailing list<br>
>>> <a href="mailto:Community@itk.org">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>
>> 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>
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>
Community mailing list<br>
<a href="mailto:Community@itk.org">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>
</div></div></blockquote></div><br><br clear="all"><br>-- <br>+1 919 869 8849<br>
</div>
</blockquote></div><br></div></body></html>