[matplotlib-devel] Segmentation fault from fresh OSX snow leopard build

2009-11-29 Thread Matthew Brett
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

--
Let Crystal Reports handle the reporting - Free Crystal Reports 2008 30-Day 
trial. Simplify your report design, integration and deployment - and focus on 
what you do best, core application coding. Discover what's new with
Crystal Reports now.  http://p.sf.net/sfu/bobj-july
___
Matplotlib-devel mailing list
Matplotlib-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/matplotlib-devel


Re: [matplotlib-devel] Segmentation fault from fresh OSX snow leopard build

2009-11-29 Thread Matthew Brett
> 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

--
Let Crystal Reports handle the reporting - Free Crystal Reports 2008 30-Day 
trial. Simplify your report design, integration and deployment - and focus on 
what you do best, core application coding. Discover what's new with
Crystal Reports now.  http://p.sf.net/sfu/bobj-july
___
Matplotlib-devel mailing list
Matplotlib-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/matplotlib-devel


Re: [matplotlib-devel] Segmentation fault from fresh OSX snow leopard build

2009-11-29 Thread Jouni K . Seppänen
Matthew Brett  writes:

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

Can you get a backtrace in gdb? 

-- 
Jouni K. Seppänen
http://www.iki.fi/jks


--
Let Crystal Reports handle the reporting - Free Crystal Reports 2008 30-Day 
trial. Simplify your report design, integration and deployment - and focus on 
what you do best, core application coding. Discover what's new with
Crystal Reports now.  http://p.sf.net/sfu/bobj-july
___
Matplotlib-devel mailing list
Matplotlib-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/matplotlib-devel


Re: [matplotlib-devel] Segmentation fault from fresh OSX snow leopard build

2009-11-29 Thread Matthew Brett
Hi,

On Sun, Nov 29, 2009 at 1:30 AM, Jouni K. Seppänen  wrote:
> Matthew Brett  writes:
>
>> I am rashly building matplotlib from source on Snow Leopard, and
>> getting a segmentation fault as soon as I try and do a plot.
>
> Can you get a backtrace in gdb?

(gdb) run scipybuild/matplotlib/examples/pylab_examples/simple_plot.py

...

Reading symbols for shared libraries . done
Reading symbols for shared libraries . done
Reading symbols for shared libraries . done

Program received signal EXC_BAD_ACCESS, Could not access memory.
Reason: 13 at address: 0x
0x000102d96ffb in py_to_agg_transformation_matrix
(obj=0x102d794d0, errors=false) at src/agg_py_transforms.cpp:21
21  matrix = (PyArrayObject*) PyArray_FromObject(obj,
PyArray_DOUBLE, 2, 2);

hum...  I'm running from the latest svn numpy...

Cheers,

Matthew

--
Let Crystal Reports handle the reporting - Free Crystal Reports 2008 30-Day 
trial. Simplify your report design, integration and deployment - and focus on 
what you do best, core application coding. Discover what's new with
Crystal Reports now.  http://p.sf.net/sfu/bobj-july
___
Matplotlib-devel mailing list
Matplotlib-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/matplotlib-devel


Re: [matplotlib-devel] Segmentation fault from fresh OSX snow leopard build

2009-11-29 Thread Matthew Brett
Hi,

>> Can you get a backtrace in gdb?
>
> (gdb) run scipybuild/matplotlib/examples/pylab_examples/simple_plot.py
...
> Program received signal EXC_BAD_ACCESS, Could not access memory.
> Reason: 13 at address: 0x
> 0x000102d96ffb in py_to_agg_transformation_matrix
> (obj=0x102d794d0, errors=false) at src/agg_py_transforms.cpp:21
> 21              matrix = (PyArrayObject*) PyArray_FromObject(obj,
> PyArray_DOUBLE, 2, 2);
>
> hum...  I'm running from the latest svn numpy...

Same outcome with numpy 1.3 though...

Matthew

--
Let Crystal Reports handle the reporting - Free Crystal Reports 2008 30-Day 
trial. Simplify your report design, integration and deployment - and focus on 
what you do best, core application coding. Discover what's new with
Crystal Reports now.  http://p.sf.net/sfu/bobj-july
___
Matplotlib-devel mailing list
Matplotlib-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/matplotlib-devel


Re: [matplotlib-devel] Segmentation fault from fresh OSX snow leopard build

2009-11-29 Thread Jouni K . Seppänen
Matthew Brett 
writes:

>> Can you get a backtrace in gdb?
>
> Program received signal EXC_BAD_ACCESS, Could not access memory.
> Reason: 13 at address: 0x
> 0x000102d96ffb in py_to_agg_transformation_matrix
> (obj=0x102d794d0, errors=false) at src/agg_py_transforms.cpp:21
> 21matrix = (PyArrayObject*) PyArray_FromObject(obj,
> PyArray_DOUBLE, 2, 2);

Can you type "bt" in gdb at this point to see the whole call stack?

-- 
Jouni K. Seppänen
http://www.iki.fi/jks


--
Let Crystal Reports handle the reporting - Free Crystal Reports 2008 30-Day 
trial. Simplify your report design, integration and deployment - and focus on 
what you do best, core application coding. Discover what's new with
Crystal Reports now.  http://p.sf.net/sfu/bobj-july
___
Matplotlib-devel mailing list
Matplotlib-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/matplotlib-devel


Re: [matplotlib-devel] Segmentation fault from fresh OSX snow leopard build

2009-11-29 Thread Matthew Brett
On Sun, Nov 29, 2009 at 9:49 AM, Jouni K. Seppänen  wrote:
> Matthew Brett 
> writes:
>
>>> Can you get a backtrace in gdb?
>>
>> Program received signal EXC_BAD_ACCESS, Could not access memory.
>> Reason: 13 at address: 0x
>> 0x000102d96ffb in py_to_agg_transformation_matrix
>> (obj=0x102d794d0, errors=false) at src/agg_py_transforms.cpp:21
>> 21            matrix = (PyArrayObject*) PyArray_FromObject(obj,
>> PyArray_DOUBLE, 2, 2);
>
> Can you type "bt" in gdb at this point to see the whole call stack?

Sorry - yes - here:

Program received signal EXC_BAD_ACCESS, Could not access memory.
Reason: 13 at address: 0x
0x000102cf703b in py_to_agg_transformation_matrix
(obj=0x102cde590, errors=false) at src/agg_py_transforms.cpp:21
21  matrix = (PyArrayObject*) PyArray_FromObject(obj,
PyArray_DOUBLE, 2, 2);
(gdb) bt
#0  0x000102cf703b in py_to_agg_transformation_matrix
(obj=0x102cde590, errors=false) at src/agg_py_transforms.cpp:21
#1  0x000102cf762c in get_path_iterator (path=0x102cde710,
trans=,
remove_nans=1, do_clip=0, rect=0x7fff5fbf9480,
quantize_mode=QUANTIZE_AUTO, do_simplify=1) at src/path_cleanup.cpp:58
#2  0x000102ce9e90 in GraphicsContext_draw_path (self=0x102cd19d0,
args=) at
src/_macosx.m:881
#3  0x0001000b31d8 in PyEval_EvalFrameEx (f=0x102b65f50,
throwflag=) at
Python/ceval.c:3706
#4  0x0001000b3f30 in PyEval_EvalCodeEx (co=0x102cd0be8,
globals=,
locals=,
args=0x102b61900, argcount=5, kws=0x102b61928, kwcount=0,
defs=0x102cde1a8, defcount=1, closure=0x0) at Python/ceval.c:2968
#5  0x0001000b1f1d in fast_function [inlined] () at
/Users/mb312/stable_trees/Python-2.6.4/Python/ceval.c:3802
#6  0x0001000b1f1d in PyEval_EvalFrameEx (f=0x102b61720,
throwflag=) at
Python/ceval.c:3727
#7  0x0001000b3f30 in PyEval_EvalCodeEx (co=0x10180ceb8,
globals=,
locals=,
args=0x102cae2a8, argcount=2, kws=0x0, kwcount=0, defs=0x0,
defcount=0, closure=0x0) at Python/ceval.c:2968
#8  0x0001000362a5 in function_call (func=0x101839b18,
arg=0x102cae290, kw=0x0) at Objects/funcobject.c:524
#9  0x00016fe2 in PyObject_Call (func=0x101839b18,
arg=0x102cae290, kw=0x0) at Objects/abstract.c:2492
#10 0x0001000ae352 in PyEval_EvalFrameEx (f=0x102b61530,
throwflag=) at
Python/ceval.c:4019
#11 0x0001000b3f30 in PyEval_EvalCodeEx (co=0x1014647b0,
globals=,
locals=,
args=0x102b61100, argcount=2, kws=0x102b61110, kwcount=0, defs=0x0,
defcount=0, closure=0x101825dc0) at Python/ceval.c:2968
#12 0x0001000b1f1d in fast_function [inlined] () at
/Users/mb312/stable_trees/Python-2.6.4/Python/ceval.c:3802
#13 0x0001000b1f1d in PyEval_EvalFrameEx (f=0x102b60f00,
throwflag=) at
Python/ceval.c:3727
#14 0x0001000b3f30 in PyEval_EvalCodeEx (co=0x102c90288,
globals=,
locals=,
args=0x102cae260, argcount=2, kws=0x0, kwcount=0, defs=0x0,
defcount=0, closure=0x0) at Python/ceval.c:2968
#15 0x0001000362a5 in function_call (func=0x102cad1b8,
arg=0x102cae248, kw=0x0) at Objects/funcobject.c:524
#16 0x00016fe2 in PyObject_Call (func=0x102cad1b8,
arg=0x102cae248, kw=0x0) at Objects/abstract.c:2492
#17 0x0001000ae352 in PyEval_EvalFrameEx (f=0x102b607f0,
throwflag=) at
Python/ceval.c:4019
#18 0x0001000b3f30 in PyEval_EvalCodeEx (co=0x1014647b0,
globals=,
locals=,
args=0x102cae218, argcount=2, kws=0x0, kwcount=0, defs=0x0,
defcount=0, closure=0x102c8d6e0) at Python/ceval.c:2968
#19 0x0001000362a5 in function_call (func=0x102cad320,
arg=0x102cae200, kw=0x0) at Objects/funcobject.c:524
#20 0x00016fe2 in PyObject_Call (func=0x102cad320,
arg=0x102cae200, kw=0x0) at Objects/abstract.c:2492
#21 0x00010001905d in instancemethod_call (func=0x102cad320,
arg=0x102cae200, kw=0x0) at Objects/classobject.c:2579
#22 0x00016fe2 in PyObject_Call (func=0x102aa7fa0,
arg=0x100438c90, kw=0x0) at Objects/abstract.c:2492
#23 0x0001a760 in call_function_tail [inlined] () at
/Users/mb312/stable_trees/Python-2.6.4/Objects/abstract.c:2524
#24 0x0001a760 in PyObject_CallMethod (o=, name=, format=0x102cfd504 "O") at
Objects/abstract.c:2601
#25 0x000102ce5653 in -[View drawRect:] (self=0x102b50960,
_cmd=,
rect={origin = {x = 0, y = 0}, size = {width = 640, height = 480}}) at
src/_macosx.m:4517
#26 0x7fff8676afae in -[NSView _drawRect:clip:] ()
#27 0x7fff86769c21 in -[NSView
_recursiveDisplayAllDirtyWithLockFocus:visRect:] ()
#28 0x7fff86769f8b in -[NSView
_recursiveDisplayAllDirtyWithLockFocus:visRect:] ()
#29 0x7fff86769f8b in -[NSView
_recursiveDisplayAllDirtyWithLockFocus:visRect:] ()
#30 0x7fff867682f3 in -[NSView
_recursiveDisplayRectIfNeededIgnoringOpacity:isVisibleRect:rectIsVisibleRectForView:topView:]
()
#31 0x7fff86767e17 in -[NSThemeFrame
_recursiveDisplayRectIfNeededIgnoringOpacity:isVisibleRect:rectIsVisibleRectForView:topView:]
()
#32 0x7fff867646bf in -[NSView
_displayRectIgnoringOpacity:isVisibleRect:rectIsVisibleRectForView:]
()
#33 0x7fff866ddf37 in -[NSView disp