[Pythonmac-SIG] First experiences with the python24-fat tree.

Bob Ippolito bob at redivi.com
Sun Feb 5 04:57:25 CET 2006


On Feb 4, 2006, at 1:16 PM, Ronald Oussoren wrote:

>
> On 4-feb-2006, at 21:26, Ronald Oussoren wrote:
>
>>
>> On 4-feb-2006, at 21:02, Ronald Oussoren wrote:
>>>
>>> What I don't quite understand is that the latter patch doesn't  
>>> quite work: the i386 contains weak links to fstatvfs and other  
>>> 10.4-only symbols, but the ppc version does not. A small test  
>>> program does work correctly.
>>
>> I hope nobody noticed this e-mail :-(. You have to set  
>> MACOSX_DEPLOYMENT_TARGET=10.4 (or any value except 10.1) before  
>> building, else gcc ignores weak linking instructions for ppc  
>> builds. I've solved this more permantently by adding these lines  
>> to Makefile.pre.in (just after settings CONFIGURE_MACOSX_DEPLOYMENT):
>>
>> #
>> # Ensure that the deployment target doesn't change between  
>> configure and
>> # build time.
>> MACOSX_DEPLOYMENT_TARGET=@CONFIGURE_MACOSX_DEPLOYMENT_TARGET@
>
> Arghh, this doesn't help. Modules/posixmodule.o gets build with  
> weak linking enabled, but the creation of $(BUILDPYTHON) ignores  
> the MACOSX_DEPLOYMENT_TARGET setting in the Makefile and you must  
> once again set it while running make.
>
> It must be an off night for me, it's quite obvious why this doesn't  
> work: make variables are not the same as environment variables.   
> GNU make has a feature to export variables to the environment, but  
> the toplevel makefile should only contain portable code. Oh well,  
> you win some an you loose some.
>
>>
>> This ensures that make and distutils will use the same setting of  
>> MACOSX_DEPLOYMENT_TARGET. A better fix might be to drop  
>> CONFIGURE_MACOSX_DEPLOYMENT_TARGET entirely, I'll do that later.
>
> But not unless I find a way to use the value that configure  
> calculated in the makefile.

CONFIGURE_MACOSX_DEPLOYMENT_TARGET=@CONFIGURE_MACOSX_DEPLOYMENT_TARGET@
ifneq ($(CONFIGURE_MACOSX_DEPLOYMENT_TARGET),"")
SHELL=/usr/bin/env MACOSX_DEPLOYMENT_TARGET=$ 
(CONFIGURE_MACOSX_DEPLOYMENT_TARGET) /bin/sh
endif

Your patches and this fix are in the branch.

-bob



More information about the Pythonmac-SIG mailing list