Bus error on Mac OS 10.3.9

Hi folks,

I've just installed MacPy 2.4.1, the latest numpy & scipy, and
mpl-0.87.2 on a colleague's Panther PowerBook. numpy & scipy
installed fine and passed all tests. For mpl, we installed
zlib from source, and initially installed Freetype2 and libpng
via the i-Installer. mpl built and installed fine, but gave
a bus error when trying to plot ("import matplotlib" would
work fine, but "import pylab" would give the error).

The .matplotlib/matplotlibrc file we're using does have TkAgg
and numpy specified, and we've verified that Tkinter is
working via a "Hello World" test script.

Suspecting one of the libraries, we then installed Freetype2
and libpng from source. We deleted all the mpl stuff in
site-packages and the mpl build directory, and built and
installed mpl again from scratch. We still get a bus error
from pylab. I am stumped as to what to try next. I've
copied verbose output below; I hope someone can offer us
some clues.

Thanks,
Tom Loredo

$ pythonw simple_plot.py --verbose-debug-annoying
matplotlib data path
/Library/Frameworks/Python.framework/Versions/2.4/lib/python2.4/site-packages/matplotlib/mpl-data
$HOME=/Users/bill
CONFIGDIR=/Users/bill/.matplotlib
loaded rc file /Users/bill/.matplotlib/matplotlibrc
matplotlib version 0.87.2
verbose.level debug-annoying
interactive is False
platform is darwin
loaded modules: ['pylab', '_bisect', '__future__', 'copy_reg',
'sre_compile', 'distutils', 'itertools', '_sre', '__main__', 'site',
'__builtin__', 'datetime', 'matplotlib.re', 'matplotlib.tempfile',
'encodings', 'pytz.datetime', 'shutil', 'distutils.string',
'dateutil', 'matplotlib.datetime', 'posixpath', '_random',
'tempfile', 'errno', 'matplotlib.warnings', 'binascii',
'encodings.codecs', 'sre_constants', 're', 'matplotlib.md5',
'os.path', 'pytz.sys', '_codecs', 'distutils.sysconfig',
'encodings.exceptions', 'pytz.sets', 'math', 'fcntl', 'stat',
'zipimport', 'string', 'warnings', 'encodings.types', 'UserDict',
'encodings.ascii', 'matplotlib.sys', 'matplotlib', 'distutils.os',
'sys', 'pytz.tzinfo', 'pytz', 'matplotlib.__future__', 'codecs',
'distutils.re', 'matplotlib.pytz', 'types', 'md5',
'matplotlib.dateutil', 'matplotlib.os', 'thread', 'sre', 'bisect',
'matplotlib.distutils', 'signal', 'distutils.errors', 'random',
'linecache', 'matplotlib.shutil', 'posix', 'encodings.aliases',
'sets', 'exceptions', 'sre_parse', 'pytz.bisect', 'distutils.sys',
'os', 'strop']
numerix numpy 0.9.6
Bus error

···

-------------------------------------------------
This mail sent through IMP: http://horde.org/imp/

You may double check to see that MPL is finding the correct versions of Freetype. There is a version in Apple's X11 that does not work with MPL -- make sure you are not picking up this one by mistake. Otherwise, the build method you described has worked for me. It seems like you are doing all the right things.

-Rob.

···

On Mar 22, 2006, at 12:17 PM, Tom Loredo wrote:

Hi folks,

I've just installed MacPy 2.4.1, the latest numpy & scipy, and
mpl-0.87.2 on a colleague's Panther PowerBook. numpy & scipy
installed fine and passed all tests. For mpl, we installed
zlib from source, and initially installed Freetype2 and libpng
via the i-Installer. mpl built and installed fine, but gave
a bus error when trying to plot ("import matplotlib" would
work fine, but "import pylab" would give the error).

The .matplotlib/matplotlibrc file we're using does have TkAgg
and numpy specified, and we've verified that Tkinter is
working via a "Hello World" test script.

Suspecting one of the libraries, we then installed Freetype2
and libpng from source. We deleted all the mpl stuff in
site-packages and the mpl build directory, and built and
installed mpl again from scratch. We still get a bus error
from pylab. I am stumped as to what to try next. I've
copied verbose output below; I hope someone can offer us
some clues.

Thanks,
Tom Loredo

$ pythonw simple_plot.py --verbose-debug-annoying
matplotlib data path
/Library/Frameworks/Python.framework/Versions/2.4/lib/python2.4/site-packages/matplotlib/mpl-data
$HOME=/Users/bill
CONFIGDIR=/Users/bill/.matplotlib
loaded rc file /Users/bill/.matplotlib/matplotlibrc
matplotlib version 0.87.2
verbose.level debug-annoying
interactive is False
platform is darwin
loaded modules: ['pylab', '_bisect', '__future__', 'copy_reg',
'sre_compile', 'distutils', 'itertools', '_sre', '__main__', 'site',
'__builtin__', 'datetime', 'matplotlib.re', 'matplotlib.tempfile',
'encodings', 'pytz.datetime', 'shutil', 'distutils.string',
'dateutil', 'matplotlib.datetime', 'posixpath', '_random',
'tempfile', 'errno', 'matplotlib.warnings', 'binascii',
'encodings.codecs', 'sre_constants', 're', 'matplotlib.md5',
'os.path', 'pytz.sys', '_codecs', 'distutils.sysconfig',
'encodings.exceptions', 'pytz.sets', 'math', 'fcntl', 'stat',
'zipimport', 'string', 'warnings', 'encodings.types', 'UserDict',
'encodings.ascii', 'matplotlib.sys', 'matplotlib', 'distutils.os',
'sys', 'pytz.tzinfo', 'pytz', 'matplotlib.__future__', 'codecs',
'distutils.re', 'matplotlib.pytz', 'types', 'md5',
'matplotlib.dateutil', 'matplotlib.os', 'thread', 'sre', 'bisect',
'matplotlib.distutils', 'signal', 'distutils.errors', 'random',
'linecache', 'matplotlib.shutil', 'posix', 'encodings.aliases',
'sets', 'exceptions', 'sre_parse', 'pytz.bisect', 'distutils.sys',
'os', 'strop']
numerix numpy 0.9.6
Bus error

-------------------------------------------------
This mail sent through IMP: http://horde.org/imp/

-------------------------------------------------------
This SF.Net email is sponsored by xPML, a groundbreaking scripting language
that extends applications into web and mobile media. Attend the live webcast
and join the prime developer group breaking into this new coding territory!
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=110944&bid=241720&dat=121642
_______________________________________________
Matplotlib-users mailing list
Matplotlib-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/matplotlib-users

-----
Rob Hetland, Assistant Professor
Dept of Oceanography, Texas A&M University
p: 979-458-0096, f: 979-845-6331
e: hetland@...760..., w: http://pong.tamu.edu

Hi folks,

I'm just checking in with the solution to my Panther bus error
issue, in case it might help someone else, but also to publicly
thank John for walking me through the diagnosis.

It turns out the problem was due to using an old version of gcc.
The owner of the PowerBook I was installing mpl on hadn't
installed Apple's gcc updaters. He had gcc 3.3, but not Apple's
most recent build, which fixes some C++ issues. As a result,
C and Fortran extensions built fine, but C++ extensions built
with pycxx resulted in bus errors. For example, "import pylab"
produced a bus error, but

import matplotlib.backends._tkagg
import matplotlib.agg

produced no errors, because these extensions are not built
with pycxx. A rebuild after updating gcc led to a working mpl.

John figured this out from the pattern of which modules loaded
and which led to errors. I never would've figured it out on
my own.

numpy and scipy both installed fine with the older gcc and passed
all tests. I wonder if they should be reinstalled. If anyone
knows about this, please let me know. The owner is uncomfortable
installing things from source, and I only have infrequent contact
with him, so if these need fixing I'd like to do it soon.

Cheers,
Tom

···

-------------------------------------------------
This mail sent through IMP: http://horde.org/imp/