[Insight-users] Cannot build ITK for MAC OS X Tiger 64 bit
Alex Lisovich
alex.lisovich at gmail.com
Mon Jul 9 13:01:34 EDT 2007
Hi Sean,
I was able to fix the problem, but the fix looks (to me) as strange as
the problem itself.
Inside my CMakeLists.txt file there was a line:
TARGET_LINK_LIBRARIES(Test64 ITKCommon ITKBasicFilters ITKAlgorithms
ITKNumerics ITKFEM ITKIO ITKStatistics ITKMetaIO itkpng itkzlib)
It appears that ITKCommon does not live together with any other
libraries in 64 bit mode, causing linker to include it twice into the
build (see the complete failure message below).Removing ITKCommon from
the line above leads to the successive build with, at least,
succesive creation of the image during the execution. The 32 bit build
works fine without the removal of ITKCommon.
Best,
Alex
P.S.: failure message (double inclusion of ITKCommon):
Ld /Users/Alex/Sources/ITK_J2K_Region/Test64built/Debug/Test64 normal x86_64
mkdir /Users/Alex/Sources/ITK_J2K_Region/Test64built/Debug
cd /Users/Alex/Sources/ITK_J2K_Region/Test64built
/usr/bin/g++-4.0 -o
/Users/Alex/Sources/ITK_J2K_Region/Test64built/Debug/Test64
-L/Users/Alex/Sources/ITK_J2K_Region/Test64built/Debug
-L/Users/Alex/Sources/ITK_J2K_Region/ItkXCode_Debug/bin/Debug
-L/Users/Alex/Sources/ITK_J2K_Region/ItkXCode_Debug/bin
-F/Users/Alex/Sources/ITK_J2K_Region/Test64built/Debug -filelist
/Users/Alex/Sources/ITK_J2K_Region/Test64built/Test64.build/Debug/Test64.build/Objects-normal/x86_64/Test64.LinkFileList
-arch x86_64 -Wl,-Y,1455 -headerpad_max_install_names -lITKCommon
-lITKBasicFilters -lITKAlgorithms -lITKNumerics -lITKFEM -lITKIO
-lITKStatistics -lITKMetaIO -litkpng -litkzlib -lITKBasicFilters
-lITKNrrdIO -litkgdcm -litkjpeg12 -litkjpeg16 -litktiff -litkjpeg8
-litkopenjpeg -lITKSpatialObject -lITKNumerics -lITKMetaIO
-lITKDICOMParser -lITKEXPAT -lITKniftiio -lITKznz -litkzlib
-lITKCommon -litkvnl_inst -litkvnl_algo -litkv3p_netlib -litkvnl
-litkvcl -lm -lpthread -lm -litksys
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)
On 7/9/07, Alex Lisovich <alex.lisovich at gmail.com> wrote:
> Yes, I do, and it's actually using gcc/g++ 4.0
>
> Well, life of mortals is difficult...
>
> Alex
>
> On 7/9/07, Sean McBride <sean at rogue-research.com> wrote:
> > On 7/6/07 5:52 PM, Alex Lisovich said:
> >
> > >Thank you very much for your patch! The warning about AppKit and
> > >Carbon issue are gone.
> >
> > Glad it helped.
> >
> > >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.
> >
> > hmmm, not sure about this one... Are you specifying the 10.4u SDK with
> > CMAKE_OSX_SYSROOT?
> >
> > --
> > ____________________________________________________________
> > 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