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

Alex Lisovich alex.lisovich at gmail.com
Thu Jul 19 12:26:22 EDT 2007


Sean, Luis,

It seems it's not possible to compile CableSwig in 64 bit mode on Mac
by definition.
The error ioccurs in ../GCC/gcc/real.h of CableSwig:

"error: size of array 'test_real_width' is negative"

The source of the error is in the file ../GCC/gcc/auto-host.h in
CableSwig build directory which is generated automatically by CMake.
There is a definition in this file for the size of a long type:

/* The number of bytes in type long */
#define SIZEOF_LONG 4

which naturally leads to the compilation failure above for 64 bits.
When I changed the SIZEOF_LONG to 8, CableSwig compiled fine. The
problem is, this file is generated at the very beginning of ccmake
session (after your hit "configure" the first time), when there is no
means to specify the architecture! This looks like a serious Mac
specific problem to me (Windows is OK because of using long longs),
which will persist for any future version of OS X unless fixed at
CMake logic level. Is there any way to easily fix it now without
manual editing of auto-host.h?


Thank you,

Alex



On 7/18/07, Alex Lisovich <alex.lisovich at gmail.com> wrote:
> Hi Sean,
>
> You are right, we did not. In message #8 there is a log from building
> using the xcodebuild ("And in case of using xcodebuild
> ARCHS="x86_64":...") which seem to indicate that ITKBasicFilters
> library was included twice, so maybe CMakeLists.txt for testing
> dublicates it through some implicit chain? I did not investigate it
> farther as I am right in the middle of  64 bit ITK/Python building
> nightmare.
>
> Alex
>
> On 7/18/07, Sean McBride <sean at rogue-research.com> wrote:
> > On 7/10/07 2:26 PM, Alex Lisovich said:
> >
> > >   Interestingly, the 64 bit build of the ITK core fails as well if
> > >the BUILD_TESTING is turned ON, so I quess there is some violation of
> > >the rules within the ITK CMakeLists hierarchy itself.
> > >
> > > *SNIP*
> > >
> > >Linking CXX executable ../../../bin/itkNumericsHeaderTest
> > >ld64-62.1 failed: duplicate symbol
> > >itk::Object::SetGlobalWarningDisplay(bool) in
> > >/Users/Alex/Sources/ITKCVS/Insight_built/bin/libITKCommon.a(itkObject.o)
> > >and /Users/Alex/Sources/ITKCVS/Insight_built/bin/libITKCommon.a(itkObject.o)
> >
> > Luis, Alex,
> >
> > After this thread, I updated our dashboard to build universal i386 and
> > ppc64.  The patch to remove Carbon/AppKit dependencies has been checked
> > in, and now I am seeing exactly the above link error:
> >
> > <http://www.itk.org/Testing/Sites/RogueResearch2/MacOSXTiger-univ/
> > 20070718-0100-Nightly/BuildError.html>
> >
> > I've reviewed the messages in this thread, but I don't believe we ever
> > figured this out.  Anyone have any ideas?
> >
> > Thanks,
> >
> > --
> > ____________________________________________________________
> > 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