[Insight-developers] [ITK Community] Problem building ITK

Bradley Lowekamp blowekamp at mail.nih.gov
Thu Feb 6 19:06:01 EST 2014


Dirk here is a fix for SCIFIO upstream:
https://github.com/scifio/scifio-imageio/pull/8


On Feb 6, 2014, at 4:32 PM, Padfield, Dirk R (GE Global Research) <padfield at research.ge.com> wrote:

> Hi All,
> 
> 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?
> 
> Thanks,
> Dirk
> 
> CMAKE_OSX_SYSROOT:PATH=/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.9.sdk 
> 
> CMAKE_OSX_DEPLOYMENT_TARGET:STRING=10.9 
> 
> CMAKE_OSX_ARCHITECTURES:STRING=x86_64
> 
> 
> On Feb 6, 2014, at 1:47 PM, Bradley Lowekamp <blowekamp at mail.nih.gov>
> wrote:
> 
>> Dirk,
>> 
>> 1) You are not using GNU's GCC. Apple has LLVM  alias as gcc.
>> 
>> 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.
>> 
>> Good luck,
>> Brad
>> 
>> On Feb 6, 2014, at 1:01 PM, Padfield, Dirk R (GE Global Research) <padfield at research.ge.com> wrote:
>> 
>>> Hi Matt,
>>> 
>>> 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!
>>> 
>>> I tried adding the following flag to the linker 
>>> 
>>> -stdlib=libstdc++
>>> 
>>> as suggested in http://mathematica.stackexchange.com/questions/34692/mathlink-linking-error-after-os-x-10-9-mavericks-upgrade, but that didn't help.  I'm not on OSX 10.9, but I am using Xcode 5.0.2.
>>> 
>>> Thanks,
>>> Dirk
>>> 
>>> 
>>> ________________________________________
>>> From: Matt McCormick [matt.mccormick at kitware.com]
>>> Sent: Thursday, February 06, 2014 12:50 PM
>>> To: Padfield, Dirk R (GE Global Research)
>>> Cc: insight-developers at itk.org
>>> Subject: Re: [ITK Community] [Insight-developers] Problem building ITK
>>> 
>>> Hi Dirk,
>>> 
>>> Starting from a a fresh source tree and a fresh build tree, does the
>>> problem persist?
>>> 
>>> Thanks,
>>> Matt
>>> 
>>> On Thu, Feb 6, 2014 at 12:01 PM, Padfield, Dirk R (GE Global Research)
>>> <padfield at research.ge.com> wrote:
>>>> Hi All,
>>>> 
>>>> 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
>>>> 
>>>> Linking CXX shared library ../../../../lib/libitkSCIFIO-4.6.dylib
>>>> Undefined symbols for architecture x86_64:
>>>> 
>>>> This is followed by a string of errors inside of SCIFIOImageIO.
>>>> 
>>>> Here are my specs:
>>>> Mac OSX 10.8.5 (Mountain Lion)
>>>> Xcode 5.0.2
>>>> CMake 2.8.11
>>>> ITK latest git pull with:
>>>> BUILD_SHARED_LIBS = ON
>>>> CMAKE_BUILD_TYPE = RelWithDebInfo
>>>> 
>>>> Also, I am building with "Eclipse CDT4 - Unix Makefiles" and "specify native compilers" of "C = gcc" and "C++ = g++".
>>>> 
>>>> When running CMake on this version, there is no flag for "Module_SCIFIO".
>>>> 
>>>> 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.
>>>> 
>>>> Does anyone have any ideas?
>>>> 
>>>> Thanks,
>>>> Dirk
>>>> _______________________________________________
>>>> 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
>>> _______________________________________________
>>> 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
>> 
> 



More information about the Insight-developers mailing list