[Pythonmac-SIG] No arbitrary precison math on Mac-tel say it ain't so!

Daniel Lord daniellord at mac.com
Sun Apr 23 01:06:55 CEST 2006


On Apr 22, 2006, at 14:51, Alex Martelli wrote:

>
> On Apr 22, 2006, at 1:51 PM, Daniel Lord wrote:
>    ...
>> So the answer, IMHO and I could be wrong since I am very new to  
>> this, is one of two choices:
>> 1) use 'ld' to produce two separate builds and then use 'lipo' to  
>> weld them together as a 'FAT' dylib or
>> 2) To use 'cc' to build the dylibs and it takes care of teh  
>> seprate building and 'lipo-ing'
>>
>> Or maybe I have this wrong and the errros only seem the same and  
>> they are really dissimilar.
>
> I'm pretty new at this too -- I've owned an intel Mac for less than  
> a month, and it's been a busy time, little chance to learn or tweak  
> much yet; and in particular I've not yet been able to build a fat- 
> binary .so Python extension with the Universal MacPython 2.4.3 and  
> any simple "python setup.py build_ext -i" approach.  Ronald may  
> hopefully understand these issues (and what if anything needs to be  
> tweaked in distutils) a bit better...

I just bought my Macbook Pro about 2 weeks ago so I am twice the  
newbie ;-)

I just now wrote a quick and dirty test of making static 'FAT' lib  
that succeeded...

At first I got these errors similar to what we've been seeing:

[daniello at mercury.local]$ make -f Makefile
cc -O2 -fno-common   -c answer1.c
cc -O2 -fno-common   -c answer2.c
ar crv libanswer.a answer1.o answer2.o
a - answer1.o
a - answer2.o
ranlib libanswer.a
cc -arch ppc -arch i386 -Wl,-syslibroot,/Developer/SDKs/ 
MacOSX10.4u.sdk -o static static.o -L. -lanswer
/usr/bin/ld: for architecture ppc
/usr/bin/ld: warning static.o cputype (7, architecture i386) does not  
match cputype (18) for specified -arch flag: ppc (file not loaded)
rch flag: ppc (can't load from it)
/usr/bin/ld: Undefined symbols:
_main
collect2: ld returned 1 exit status
lipo: can't open input file: /var/tmp//ccEO7pnk.out (No such file or  
directory)
make: *** [static] Error 1


Then poking around the docs and "Advanced OSX Programming", I found  
something to try:

LDFLAGS = -arch ppc -arch i386 -Wl,-syslibroot,/Developer/SDKs/ 
MacOSX10.4u.sdk

And that did it. Try it an let me know if that solves your  
problem...more later after I figure out the details



More information about the Pythonmac-SIG mailing list