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

Ronald Oussoren ronaldoussoren at mac.com
Sat Apr 22 22:29:12 CEST 2006

On 22-apr-2006, at 18:50, Alex Martelli wrote:

> Once this idiocy is solved, there is another problem: I STILL can't
> link gmpy.so beause I can't make libgmp.a to build properly for
> linkage into a -bundle.  Specifically (with gmpy.sf.net's current CVS
> contents):
> brain:~/alex/gmpy alex$ python setup.py build_ext -i
> running build_ext
> building 'gmpy' extension
> creating build/temp.macosx-10.4-fat-2.4
> creating build/temp.macosx-10.4-fat-2.4/src
> gcc -arch ppc -arch i386 -isysroot /Developer/SDKs/MacOSX10.4u.sdk -
> fno-strict-aliasing -Wno-long-double -no-cpp-precomp -mno-fused-madd -
> fno-common -dynamic -DNDEBUG -g -O3 -I./src -I/usr/local/include -I/
> Library/Frameworks/Python.framework/Versions/2.4/include/python2.4 -c
> src/gmpy.c -o build/temp.macosx-10.4-fat-2.4/src/gmpy.o
> gcc -arch ppc -arch i386 -isysroot /Developer/SDKs/MacOSX10.4u.sdk -g
> -bundle -undefined dynamic_lookup build/temp.macosx-10.4-fat-2.4/src/
> gmpy.o -L/usr/local/lib -lgmp -o gmpy.so
> /usr/bin/ld: for architecture i386
> /usr/bin/ld: /usr/local/lib/libgmp.a(add_n.o) has local relocation
> entries in non-writable section (__TEXT,__text)

On other platforms I'd say that gmp should be compiled with -fPIC in  
the compiler flags. On OSX however this should be the default. It  
could be a problem in an assembly file. Given the .asm files and  
configure script I'd guess that it might help to add '--with-pic' to  
the configure line.


More information about the Pythonmac-SIG mailing list