Segmentation fault from fresh OSX snow leopard build

Hi,

I am rashly building matplotlib from source on Snow Leopard, and
getting a segmentation fault as soon as I try and do a plot.

me $ python -c 'import pylab; pylab.plot(range(10))'
Segmentation fault

I've built python myself with:

export MACOSX_DEPLOYMENT_TARGET=10.6
./configure --prefix=/Users/mb312/usr/local

Then numpy using the usual procedure (tests look good)

For matplotlib, I've hacked the make.osx file so the top looks like:

---- begin make.osx snippet ----
PYVERSION=2.6
PYTHON=python${PYVERSION}
ZLIBVERSION=1.2.3
PNGVERSION=1.2.40
FREETYPEVERSION=2.3.11
MACOSX_DEPLOYMENT_TARGET=10.6
OSX_SDK_VER=10.6
ARCH_FLAGS=

## You shouldn't need to configure past this point

PKG_CONFIG_PATH="${PREFIX}/lib/pkgconfig"
CFLAGS="${ARCH_FLAGS} -I${PREFIX}/include
-I${PREFIX}/include/freetype2 -isysroot
/Developer/SDKs/MacOSX${OSX_SDK_VER}.sdk"
LDFLAGS="${ARCH_FLAGS} -L${PREFIX}/lib
-syslibroot,/Developer/SDKs/MacOSX${OSX_SDK_VER}.sdk"

--- end make.osx snippet ---

This builds correctly but then causes the segfault above. I've tried
with the original make.osx package versions of freetype and libpng
with the same outcome.

Running simple_script.py:

blair:~ mb312$ python
scipybuild/matplotlib/examples/pylab_examples/simple_plot.py
--verbose-helpful
$HOME=/Users/mb312
CONFIGDIR=/Users/mb312/.matplotlib
matplotlib data path
/Users/mb312/usr/local/lib/python2.6/site-packages/matplotlib/mpl-data
loaded rc file /Users/mb312/usr/local/lib/python2.6/site-packages/matplotlib/mpl-data/matplotlibrc
matplotlib version 1.0.svn
verbose.level helpful
interactive is False
units is False
platform is darwin
Using fontManager instance from /Users/mb312/.matplotlib/fontList.cache
backend MacOSX version unknown
Segmentation fault

gcc version is i686-apple-darwin10-gcc-4.2.1

Did I take a mis-step somewhere in the build process? Any advice very
gratefully received...

Thanks a lot,

Matthew

I am rashly building matplotlib from source on Snow Leopard, and
getting a segmentation fault as soon as I try and do a plot.

me $ python -c 'import pylab; pylab.plot(range(10))'
Segmentation fault

Sorry - here the is top of the build output:

export PKG_CONFIG_PATH="/Users/mb312/usr/local/lib/pkgconfig" &&\
  export MACOSX_DEPLOYMENT_TARGET=10.6 &&\
  export CFLAGS=" -I/Users/mb312/usr/local/include
-I/Users/mb312/usr/local/include/freetype2 -isysroot
/Developer/SDKs/MacOSX10.6.sdk" &&\
  export LDFLAGS=" -L/Users/mb312/usr/local/lib
-syslibroot,/Developer/SDKs/MacOSX10.6.sdk" &&\
  python2.6 setup.py install --prefix=/Users/mb312/usr/local

···

============================================================================
BUILDING MATPLOTLIB
            matplotlib: 1.0.svn
                python: 2.6.4 (r264:75706, Nov 29 2009, 00:03:57) [GCC
                        4.2.1 (Apple Inc. build 5646) (dot 1)]
              platform: darwin

REQUIRED DEPENDENCIES
                 numpy: 1.4.0.dev7803
             freetype2: found, but unknown version (no pkg-config)
                        * WARNING: Could not find 'freetype2' headers in any
                        * of '.', './freetype2'.

OPTIONAL BACKEND DEPENDENCIES
                libpng: found, but unknown version (no pkg-config)
                        * Could not find 'libpng' headers in any of '.'
               Tkinter: Tkinter: 73770, Tk: 8.5, Tcl: 8.5
              wxPython: no
                        * wxPython not found
                  Gtk+: no
                        * Building for Gtk+ requires pygtk; you must be able
                        * to "import gtk" in your build/install environment
       Mac OS X native: yes
                    Qt: no
                   Qt4: no
                 Cairo: no

OPTIONAL DATE/TIMEZONE DEPENDENCIES
              datetime: present, version unknown
              dateutil: matplotlib will provide
                  pytz: 2008c

OPTIONAL USETEX DEPENDENCIES
                dvipng: no
           ghostscript: /bin/sh: gs: command not found
                 latex: no

Thanks a lot,

Matthew