[Pythonmac-SIG] building universal binaries

Bob Ippolito bob at redivi.com
Thu Feb 2 02:16:25 CET 2006


On Jan 27, 2006, at 8:31 AM, Ronald Oussoren wrote:

>
> On 27-jan-2006, at 16:38, bear wrote:
>
>> Ronald Oussoren wrote:
>>>
>>> On 27-jan-2006, at 4:22, bear wrote:
>>>
>>>> Ronald Oussoren wrote:
>>>>> That part is easy enough. If you want a framework build you'll  
>>>>> have to patch Makefile.pre.in because it contains a hardcoded '- 
>>>>> arch ppc' in the section that builds that actual framework.  
>>>>> Otherwise it should just build (assuming you have an intel mac  
>>>>> of course, cross-building from PPC to Intel will be hard  
>>>>> because the build process assumes you'll do a native build).
>>>> ok, I found the relevant part in configure (and cofigure.in)  
>>>> that was putting -arch_only ppc into the Makefile and I've re- 
>>>> run configure and it seems happy - heck, even the compiling ran  
>>>> error free.
>>>>
>>>> But when it got to the link part - I get the following error:
>>>
>>> You must replace the -arch ppc part by -arch i386. If you want to  
>>> build a universal binary you'll have to replace the call to  
>>> libtool by something more complex. I'll see if I can produce a  
>>> patch later today.
>> Coolness - I was able to get a clean build of python for the i386  
>> arch just now.  I did have to apply a patch to Lib/plat-mac/ 
>> applesingle.py so that it would run without errors.  I got the  
>> required patch from http://www.opensource.apple.com/darwinsource/ 
>> tarballs/other/python-16.tar.gz that Kevin mentioned in an earlier  
>> post to this thread.
>>
>> Now to build the rest of our app and see how it fairs ;)
>>
>
> From my Makefile.pre.in:
--
> This is very ugly. As you have noted you can't just drop -arch ppc  
> because libtool than assumes that you want to do a 3-way universal  
> build. Probably because libSystem contains a ppc64 binary.
>
> I hope to have a script for building a "batteries included"  
> universal build of python by the end of this weekend.

Speaking of "batteries included"... the WASTE 2.1 library used by the  
ancient PythonIDE (and maybe other old junk?) is not x86 compatible  
and isn't open source.  It would need its Info.plist modified so that  
it runs under Rosetta if it's distributed at all.

-bob



More information about the Pythonmac-SIG mailing list