[vtkusers] Re: OSX universal binaires for VTK, cmake , ITK

Dan White dan at chalkie.org.uk
Tue Jan 30 15:07:29 EST 2007


Hi Sean and Robert,

On 30 Jan 2007, at 21:48, Sean McBride wrote:

> Dan,
>
> Please don't crosspost, it makes things complicated for people not on
> both lists.  I am replying to the VTK list only.
>

ah, yes, i guess it does... apologies.

>> so i wanted to ask you how you have been getting on with building
>> universal binaires -arch ppc;i386
>> and also very fat binaries  -arch ppc;ppc64;i386;x86_64
>> for VTK, CMake etc (we are also building ITK)
>>
>> Previously i thought there was a problem in CMake that prevented the
>> proper generation of universal binaries ppc;i386
>> because it made the assumption that the build arch was the same as
>> the arch for execution of the binaries generated.
>> So a PPC could make i386 binaries, but they wouldn't run properly?
>>
>> I might have misunderstood the situation...?
>> Is this, or was it ever an issue?
>>
>> Can we just use
>> CMAKE_OSX_ARCHITECTURES ppc;ppc64;i386;x86_64
>>
>> or do we have to set the -arch ppc;ppc64;i386;x86_64
>> in the CFLAGS and CXXFLAGS and linker flags?
>>
>> any info on the current state of affairs and how to do this the right
>> way would be very welcome!
>
> CMAKE_OSX_ARCHITECTURES ppc;ppc64;i386;x86_64 "works" in theory, from
> the CMake point of view. But:
>
> - even specifying just ppc;i386 will not really work.  It will  
> build as
> universal, but the "other half" won't work properly.  So if you  
> build on
> a PPC, the code won't run properly on intel, and vice versa.  This is
> due to TRY_RUN use by VTK.  VTK tests the endianness of the building
> machine and then uses that for both the ppc and intel builds, so it's
> always wrong for one half. (bug 3059)

ok, so it was a problem with VTK not CMake.... didn't remember that.

> - building VTK as 64 bit in OS 10.4 can only be done if you turn off
> VTK_USE_RENDERING, as Carbon/Cocoa are not available as 64 bit in  
> 10.4.

Yes, indeed thats true.... but what about 10.5? Fully 64 bit right?

> - building VTK (with VTK_USE_CARBON) as 64 bit in OS 10.5 is  
> impossible
> because QuickDraw is used (and no longer available) (bug 4001)

yes, no more quickdraw in 10.5... so that means CARBON can't be used  
anymore at all?
What would be needed to use CARBON? QuickDraw is replaced by some  
newer core library in OSX 105 isnt it?

> - building VTK (with VTK_USE_COCOA) as 64 bit in OS 10.5 almost works.
> You have to stub out freetype (bug 3670).  I suspect there will be
> runtime bugs even then.

So it is sensible to use cocoa from now on?
(to be honest I dont really know what the difference between cocoa  
and carbon is.... i though carbon was the more modern one?

> - CMake itself does not build as 64 bit (bug 4348)

I guess it will do sometime...

> - I've never used ITK, so I have no idea there

probably similar situation to VTK, but might be different.. must  
investigate...
>
> So basically, you need to build for ppc on a ppc, for intel on an  
> intel,
> then use 'lipo' to put them together.  64 bit builds basically  
> don't work.
>
> So there is a A LOT of work to be done!  Care to help? :)


We will help as much as we can.
I myself am not a programmer, I'm a biologist,
but we do have Kalle , a computer scientist who is starting a phd soon
and we are hiring another programmer....

We have a large demand for an OSX version of BioImageXD, and if  
making universal 32 and 64 bit fat binaries
was possible, it would make ours and everyone else's life very much  
easier.

Maybe Robert Kehrer from Apple could comment on the carbon / cocoa  
and quickdraw issues for 10.5

cheers for the info Sean,
very much appreciated!

Dan and the BioImageXD team.

Dr. Daniel James White BSc. (Hons.) PhD
Bioimaging Coordinator
Nanoscience Centre and Department of Biological and Environmental  
Sciences
Division of Molecular Recognition
Ambiotica C242
PO Box 35
University of Jyväskylä
Jyväskylä
FIN 40014
Finland

+358 14 260 4183 (work)
+358 468102840 (mobile)
http://www.bioimagexd.net
http://www.chalkie.org.uk
dan at chalkie.org.uk
white at cc.jyu.fi






More information about the vtkusers mailing list