From: John H. <jdh...@ac...> - 2005-04-15 05:34:22
|
>>>>> "Olive" == Olive <enc...@ya...> writes: Olive> Hello, I've juste downloaded the last version (0.8) of Olive> matplotlib and successfully built it on SunOS 5.8 with GTK Olive> backend (gcc 3.2.2). "import matplolib" is OK but typing Olive> "from matplotlib.pylab import *" result in a core dumped ! Olive> without any error message or exception... "import gtk", Olive> "import pygtk", and "import wx" works OK. Olive> I've tried with version 0.72, same error : I don't have a lot of good advice for you, but here is how I would go about debugging the problem. You can recompile mpl in verbose mode. rm -rf "site-packages/matplotlib" and your "build" subdir and edit setup.py and set VERBOSE=True and recompile/reinstall. This can sometimes provide information about which extension code function is failing. You also want to create a test script that replicates the problem (in your case it's a one-liner that simply imports matplotlib.pylab) and run it with the --verbose-debug flag > python myscript.py --verbose-debug This prints maximal debug info which can provide helpful information to narrow down the possible culprits. Olive> Python 2.4.1 (#3, Apr 14 2005, 10:58:02) [GCC 3.2.2] on Olive> sunos5 Type "help", "copyright", "credits" or "license" for Olive> more information. >>>> from matplotlib.pylab import * Olive> Bus Error (core dumped) The old-fashioned but effective way to triangulate this kind of segfault is to put a lot of print statements into the module that is segfaulting (in this case site-packages/matplotlib/pylab.py). Space these print statements every 50 lines or so print 'debug 1' ...50 lines of pylab... print 'debug 2' ...50 lines of pylab... print 'debug 3' When you have narrowed the segfault to be between two numbers, say 2 and 3, add more statements between them, maybe with a delimiter such as TAB '\t' print '\t debug 2a' ...5 lines of pylab... print '\t debug 2b' ...5 lines of pylab... print '\t debug 2c' ...5 lines of pylab... and repeat as necessary with a finer grain until you find the actual line causing the segfault. Posting this info will go a long way to actually discovering the bug. I call this "poor man's debugging" or "manual binary search" and it's primitive, ugly, and highly effective. Olive> One more thing is that after importing matplotlib, I got an Olive> error when using help : Don't know if this is related or not... JDH |