How to compile on OS X PPC? was: Re: [RELEASED] Python 3.2

Ned Deily nad at acm.org
Wed Feb 23 02:15:09 CET 2011


In article <4d640175$0$81482$e4fe514c at news.xs4all.nl>,
 Irmen de Jong <irmen at -NOSPAM-xs4all.nl> wrote:
> However, I'm having trouble compiling a framework build from source on 
> Mac OS 10.5.8 on PowerPC.  No matter what I try (gcc 4.0, gcc 4.2, 
> different compiler options), the compilation aborts with the following 
> error:
> 
> Undefined symbols:
>    "___fixdfdi", referenced from:
>        _rlock_acquire in libpython3.2m.a(_threadmodule.o)
>        _lock_PyThread_acquire_lock in libpython3.2m.a(_threadmodule.o)
>    "___moddi3", referenced from:
>        _PyThread_acquire_lock_timed in libpython3.2m.a(thread.o)
>        _acquire_timed in libpython3.2m.a(_threadmodule.o)
>    "___divdi3", referenced from:
>        _PyThread_acquire_lock_timed in libpython3.2m.a(thread.o)
>        _acquire_timed in libpython3.2m.a(_threadmodule.o)
> ld: symbol(s) not found
> /usr/bin/libtool: internal link edit command failed

Unfortunately, this is a variation of an old issue that hasn't yet been 
fixed (http://bugs.python.org/issue1099).  The simplest workaround is to 
include the --enable-universalsdk option to configure, so something like 
this:

./configure --enable-framework --enable-universalsdk=/

That has the side effect of causing a universal build (ppc and i386).  
If you don't want to have that, you could go in an manually edit 
Makefile.pre.in and eliminate the "test" and else clause starting at 
line 487, in other words, always use gcc to make the framework library 
and not libtool, and then rerun configure.  I'll make sure the issue 
gets resolved.

Another solution is to use the 3.2 32-bit installer for Mac OS X from 
python.org:
   http://www.python.org/download/releases/3.2/

-- 
 Ned Deily,
 nad at acm.org




More information about the Python-list mailing list