[Insight-users] Cannot build ITK for MAC OS X Tiger 64 bit

Alex Lisovich alex.lisovich at gmail.com
Fri Jul 6 17:52:04 EDT 2007


Hi Sean,

Thank you very much for your patch! The warning about AppKit and
Carbon issue are gone. However, the build fails as before:

ld64-62.1 failed: duplicate symbol
itk::Region::Print(std::basic_ostream<char, std::char_traits<char> >&,
itk::Indent) constin
/Users/Alex/Sources/ITK_J2K_Region/ItkXCode_Debug/bin/Debug/libITKCommon.a(itkRegion.o)
and /Users/Alex/Sources/ITK_J2K_Region/ItkXCode_Debug/bin/Debug/libITKCommon.a(itkRegion.o)

So it looks like it complains about the duplicate Region::Print()
method within the same itkRegion.o? And this definitely looks like
template instantiation problem, because when I remove the line
"ImageType::Pointer im=ImageType::New();" it builds. I am (almost)
positive I am not building universal binaries, because I am using
<xcodebuild ARCHS="x86_64"> which should build for a single target.
Using make also produces the same build failure with the same message.

Best,

Alex


On 7/6/07, Sean McBride <sean at rogue-research.com> wrote:
> On 7/6/07 2:06 PM, Alex Lisovich said:
>
> >Was anybody able to build ITK on MAC OS Tiger for 64 bit Intel target
> >(x86_64)?
>
> Tiger is only kinda 64 bit.  We have a 64 bit ITK mostly working in a
> Mac OS X 10.5 beta.  It builds anyway.
>
> >    The first problem is that it itkMultiThreader.cxx unconditionally
> >includes Carbon.h for any APPLE build including 64-bit, and Carbon on
> >Tiger does not support it. It seems I was able to solve this by using
> >fix from VTK bug report list ( see
> >http://www.vtk.org/Bug/bug.php?op=show&bugid=2932 ) which allowed ITK
> >to build (without examples and tests).
>
> Neat, that was me that patched that.  :)  A shame that ITK has pretty
> much the same code copy and pasted.  I had no idea or I would have
> patched it in both places.
>
> >And the build fails:
> >
> >....
> >ld64 warning: in /System/Library/Frameworks//AppKit.framework/AppKit,
> >missing required architecture x86_64 in file
>
> AppKit is 32 bit only in 10.4.  Odd that ITK thinks it needs to link
> with AppKit.framework.  However, searching the ITK source reveals that
> it does indeed pass "-framework AppKit".  This should not be necessary.
> I suspect if you remove that your problem will go away.  The current ITK
> code does an #include <Carbon/Carbon.h> and so should use "-framework
> Carbon", AppKit itself links to Carbon which explains why ITK can link.
>
> Anyway, try the attached patch.  I have not actually tried it, but I
> think it will work.
>
> Let us know if it works, then maybe someone can commit it.
>
> Cheers,
>
> --
> ____________________________________________________________
> Sean McBride, B. Eng                 sean at rogue-research.com
> Rogue Research                        www.rogue-research.com
> Mac Software Developer              Montréal, Québec, Canada
>
>


More information about the Insight-users mailing list