[Pythonmac-SIG] building universal binaries
bob at redivi.com
Fri Jan 27 09:45:54 CET 2006
On Jan 27, 2006, at 12:06 AM, Ronald Oussoren wrote:
> On 27-jan-2006, at 4:02, Bob Ippolito wrote:
>> On Jan 26, 2006, at 6:28 PM, Kevin Ollivier wrote:
>>> On Jan 26, 2006, at 12:48 AM, Ronald Oussoren wrote:
>>>> I'm (very slowly) playing around with adding '-arch ppc -arch i386'
>>>> to the build flags and building on an intel host. That way you
>>>> have to use SDKs, which makes it less likely that configure
>>>> picks up
>>>> other information than the actual compile (not that there should be
>>>> any differences if you use the 10.4u SDK).
>>>> With some effort it should be possible to build a version of python
>>>> that will run on 10.3 as well. As far as python is concerned the
>>>> differences between 10.3 and 10.4 seem to be fairly small. The
>>>> I'd like to do this instead of merging a build-on-10.3 PPC version
>>>> and a build-on-10.4 intel version is that the latter would contain
>>>> small incompatibilities between the intel and ppc version (some
>>>> scripts would work on intel but not on ppc).
>>> IMHO, what would be cool is to allow the user to pass the SDK in as
>>> some sort of configure flag or maybe a shell variable, something
>>> ./configure <flags> MACOSX_SDK=/my/path/to/SDK
>>> This, along with the addition of the -arch i386 -arch ppc flags
>>> be enough to enable someone to write a script to create a Panther-
>>> compatible Universal build. Which I'm pretty sure someone will do
>>> sooner or later. :-)
>> No, it wouldn't actually. The 10.3 SDK is ppc only, and a Panther-
>> compatible build (well, something compatible with 10.3.8 and
>> below) must use GCC 3.3, but an x86 compatible build must use GCC 4.
> The compiler issue really is a problem, although we could probably
> hack around this using a script that runs the actual compilers and
> then using lipo to merge the result. As I said before, it should be
> possible to build a 10.3.0 compatible build using the 10.4 SDK.
> This does require patching several modules (posixmodule.c is one of
> them) because 10.4 has several functions that are not available on
> earlier editions of the OS. I seem to have removed that patch from
> my system, but recreating it shouldn't be very hard now that I know
> how to do it. Getting it accepted into the Python repository might
> be a different story.
> The advantage of building on 10.4 is that the Intel and PPC
> versions will have the same features when run on a Tiger system.
Yeah, you probably could build something functional on Mac OS X
10.3.0 against the 10.4 SDK if you were very careful, and you were
using gcc 3.3 to build the PPC arch of the project.
I'll play around with it next week when I have access to an x86 box
again... but the 10.3.0 stuff I can't do because I don't think I have
any 10.3 machines to test on.
More information about the Pythonmac-SIG