[vtk-developers] New build error in 64 bits
sean at rogue-research.com
Mon Jun 18 17:37:17 EDT 2007
On 6/18/07 4:15 PM, Jeff Baumes said:
>Are you saying that vtkTypeInt64 is typedef-ed to long while
>vtkTypeInt64Array's superclass is vtkLongLongArray?
>If this is indeed
>the case, please provide more details on your system so I can see if I
>can replicate it. The parallel logic in vtkType.h and
>Common\CMakeLists.txt seems like it would avoid this type of behavior.
> Here is the relevant cmake script. VTK_TYPE_NATIVE_Int64 determines
>the superclass of vtkTypeInt64.
We are using a pre-release version of Mac OS X 10.5 Leopard, and
building VTK as a 4-way Universal Binary (ppc32, ppc64, intel32,
intel64). We have a nightly build of this configuration, but it is not
on the public kitware dashboard because of the pre-release nature of the OS.
We'll look at this more tomorrow, but our suspicion is that your recent
changes are not 'cross-compilation friendly'. Universal Binaries are
essentially a form of cross compilation.
If you take a look at vtkConfigure.h.in you'll see we did the following
some months ago:
# define VTK_SIZEOF_CHAR @VTK_SIZEOF_CHAR@
# define VTK_SIZEOF_SHORT @VTK_SIZEOF_SHORT@
# define VTK_SIZEOF_INT @VTK_SIZEOF_INT@
# define VTK_SIZEOF_LONG @VTK_SIZEOF_LONG@
# define VTK_SIZEOF_FLOAT @VTK_SIZEOF_FLOAT@
# define VTK_SIZEOF_DOUBLE @VTK_SIZEOF_DOUBLE@
# define VTK_SIZEOF_CHAR 1
# define VTK_SIZEOF_SHORT 2
# define VTK_SIZEOF_INT 4
# if defined(__LP64__) && __LP64__
# define VTK_SIZEOF_LONG 8
# define VTK_SIZEOF_LONG 4
# define VTK_SIZEOF_FLOAT 4
# define VTK_SIZEOF_DOUBLE 8
This was needed because anything that does introspection of the
compiling machine is a no-no for cross-compilation. In our build, the
compiler does 4 passes, one for each architecture, and each time the
size of some fundamental types change.
We suspect that those vtkTypeFooArray classes are somehow autogenerated,
right? If so, when does that happen? Our guess is that it only happens
once, and thus the problem...
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 vtk-developers