[Pythonmac-SIG] Building Python 2.7 with ppc64
Ned Deily
nad at acm.org
Mon May 7 07:30:54 CEST 2012
In article
<1336304827.59161.YahooMailNeo at web120705.mail.ne1.yahoo.com>,
Chris Calderon <calderon.christian760 at yahoo.com> wrote:
> Hello All! This is my first time using this mailing list yay!
I am having a
> problem building Python 2.7 for my quad G5 PowerMac, and I was wondering if
> anyone has any experience doing this? I don't want a 32-bit build, because I
> have 8 gigs of RAM I want to be able to use. My os is Mac OS x 10.5.8, and I
> have Xcode 3.1 installed. I tried to build and install like this:
> ./configure --enable-framework --enable-universalsdk=/
> --with-universal-archs=64-bit
make
make install
This installed python,
> supposedly, but didn't build tkinter or sqlite3, and lots of other stuff
> didn't build all the way. What should I do
Ýto get this to install
> correctly? are their other libraries I need to install first? Has anyone
> successfully built python 2.7 for ppc64?
The Python project has no OS X ppc64 buildbots so we make no claims to
test Mac G5 platforms. I've never had a G5 to attempt executing a ppc64
architecture. I have built 4-way (ppc, ppc64, i386, x86_64) framework
builds in the past for some versions but not recently. That said, we
hope that ppc64 works and try not to break it.
There are a few known gotchas, though. Tkinter support for ppc64 is not
available out of the box. The Tcl/Tk 8.4 supplied by Apple with OS X
10.5 is a Carbon Aqua version which supports 32-bit (ppc or i386) only.
This is also true of the more up-to-date ActiveState's ActiveTcl 8.4.
ActiveState supplies a Cocoa Tcl/Tk 8.5 for 10.5+ but only for i386 and
x86_64. If you really need Tkinter, your best bets are probably either
to build a 64-bit version of the X11-based Tcl/Tk 8.5 and link with that
when building a 64-bit Python; or, build a 32-bit/64-bit universal
Python (--with-universal-arch=all
--enable-universal-sdk=/Developer/SDKs/MacOSX10.5.sdk) and run in 32-bit
mode when needing Tkinter. On 10.5 32-bit-mode is preferred by default
so you would have to force 64-bit mode when launching a 32-/64- bit
Python by using something like this:
arch -ppc64 python2.7 ...
Or look into modifying the framework Python.app plist to change the
order of preferred archs.
The problem with the sqlite extension not building is likely the problem
documented here: http://bugs.python.org/issue14572. The best workaround
for that is probably to build a universal version of libsqlite3 and link
Python with that; the version supplied with 10.5 is quite old. You
might be able to tweak the Python installer build script
(Mac/BuildScript/build-installer.py) to do that for you; currently, it
only builds its own version of sqlite3 if the deployment target is less
than 10.5.
Once you have built a Python, I would highly recommend that you run the
full Python test suite, perhaps:
python2.7 -m test.regrtest -w -uall,-largefile
Good luck!
--
Ned Deily,
nad at acm.org
More information about the Pythonmac-SIG
mailing list