[IPython-user] Bus error
zpincus at stanford.edu
Wed Apr 12 16:05:30 CDT 2006
> Patched with the current four patches from ftp://ftp.cwru.edu/pub/
> bash/readline-5.1-patches, and rebuilt... still get the same error.
You are building shared libraries for readline, right? Because if you
built a static readline, and then built python against the static
readline, it might still be using the old bad readline. In that case,
you may need to rebuild python.
> When I say 'rebuilt', I did
> make uninstall
> make clean
> make distclean
> Then started over with configure.
Just to make sure, you did *apply* the patches with the patch
command, and patch gave no complaints?
Here are the instructions I give to people for building readline 5.1
curl -O ftp://ftp.cwru.edu/pub/bash/readline-5.1.tar.gz
tar -xzf readline-5.1.tar.gz
curl -O ftp://ftp.cwru.edu/pub/bash/readline-5.1-patches/readline51-001
curl -O ftp://ftp.cwru.edu/pub/bash/readline-5.1-patches/readline51-002
curl -O ftp://ftp.cwru.edu/pub/bash/readline-5.1-patches/readline51-003
curl -O ftp://ftp.cwru.edu/pub/bash/readline-5.1-patches/readline51-004
cat readline51* | patch
sudo make install
If you did just that, and the problems persist, there are several
options. For one, you might try using an older and better-tested
version of readline. I think 4.2 is thought to be really solid.
Other options are outlined below.
> I'm not familiar with gdb, but running python under it didn't seem
> to work:
> ~ $ gdb python
> GNU gdb 6.1-20040303 (Apple version gdb-434) (Wed Nov 2 17:28:16
> GMT 2005)
> (gdb) run
> Starting program: /usr/local/bin/python
> Reading symbols for shared libraries . done
> Program received signal SIGTRAP, Trace/breakpoint trap.
> 0x8fe0100c in __dyld__dyld_start ()
Umm, OK. That's odd. The internet thinks it might be related to a gdb
bug. Your best bet (and something you should do anyway) is to get the
latest Apple dev tools download ( https://connect.apple.com/cgi-bin/
fileID=20179&source=XCODE_2_2_FY06&code=XCODE_2.2_NEX ). This
includes a newer version of gcc and gdb that have less issues.
For now, you could also do the following before the 'run' command
handle SIGTRAP ignore
handle SIGTRAP nostop
and see if that helps.
Now, did you build your own python, or is this a packaged version? If
you built your own, you'll want to get the new dev tools, rebuild
readline as above, and rebuild python.
If you got a packaged version of python, it is possible that the
package has a (bad) static version of readline linked in, causing
problems a la the above.
My standard MO is to build my own readline and python and everything.
It takes a little more time, but after that things work rather well.
Here are step-by-step instructions I wrote for some folks in my
degree program on installing python/ipython/numpy/scipy etc. from
source on OS X 10.4. Maybe they'll help: http://
> Thanks for your help, I still suspect readline....
More information about the IPython-user