[Pythonmac-SIG] bdist_mpkg issues

Russell E. Owen rowen at uw.edu
Thu Sep 16 22:43:46 CEST 2010


In article <nad-989199.17402014092010 at news.gmane.org>,
 Ned Deily <nad at acm.org> wrote:

> In article <rowen-F3834D.12565414092010 at news.gmane.org>,
>  "Russell E. Owen" <rowen at uw.edu> wrote:
> > I'm having some surprising issues with bdist_mpkg and I wondered if 
> > anyone had advice.
> > 
> > Problem building a PIL 1.1.7 binary installer for Mac OS X 10.3.9 and 
> > later:
> > * The PIL binary for Python 2.6 does not work on 10.3.9 or 10.4: the 
> > _imaging C library cannot be loaded.
> > * The Python 2.5 PIL does not have this problem - it works fine on 
> > 10.3.9.
> > * There are no problems on 10.5 and 10.6.
> > 
> > 
> > Problem building a matplotlib 1.0.0 installer for Mac OS X 10.3.9 and 
> > later:
> > * The resulting matplotlib segfaults on Mac OS X 10.3.9 for both Python 
> > 2.5 and 2.6.
> > * The Python 2.6 version has incorrect permissions for some data files.  
> > I know how to work around this but am puzzled why it is necessary.
> > * The Python 2.5 version has no permission problems.
> > 
> > 
> > My setup:
> > - Mac OS X 10.5.8 Intel system
> > - Python 2.5.2 and Python 2.6.6 both from python.org
> > - bdist_mpkg 0.4.4 (installed using pip)
> > - Build instructions for matplotlib:
> > <http://www.astro.washington.edu/users/rowen/BuildingMatplotlibForMac.htm
> > l> (the procedure for PIL is similar).
> > 
> > I tried building on 10.3.9, but the gcc is so old that I get buffer 
> > overflow vulnerability warnings so I'm not keen to go this route. I'll 
> > have a 10.4 machine in a few weeks and I'll try that.
> 
> Quick thoughts without any testing: the python.org 2.6.6 uses a 
> MACOSX_DEPLOYMENT_TARGET=10.3.  Make sure you set it when building all 
> your dependent libraries, too.   Make sure you use CC=gcc-4.0 (default 
> on 10.5 but not 10.6) for all building.  Don't bother trying to build on 
> 10.3.9.  In theory, you should be able to make this work.  A standard 
> python installer can be built these days on any of 10.4, 10.5, and 10.6 
> that will work on 10.3.9 through 10.6 so there's a good chance that PIL 
> should be able to be built similarly.  No experience with matplotlib or 
> bdist_mpkg.

It is nice to think that a binary installer could be built on 10.5 or 
10.6 but I sure don't know how to do it.

I built the original installers using MACOSX_DEPLOYMENT_TARGET=10.4 and 
gcc 4.0.1.

At your suggestion I built new universal unix libraries using 
MACOSX_DEPLOYMENT_TARGET=10.3. As always, I deleted the dylibs so only 
the static libraries remained (so they would be included in the final 
binary) and I verified that the libraries contained both ppc and intel 
code. I then used bdist_mpkg to build a matplotlib installer. 
Unfortunately I see the same problem as before: when I try to import 
pylab on a 10.3.9 PPC computer I get a segfault.

-- Russell



More information about the Pythonmac-SIG mailing list