#4991: GDB is broken on OSX due to ipython's readline detection
----------------------+-----------------------------------------------------
Reporter: mabshoff | Owner: mabshoff
Type: defect | Status: new
Priority: critical | Milestone: sage-3.3
Component: packages | Keywords:
----------------------+-----------------------------------------------------
Running Sage under gdb is broken on OSX at the moment:
{{{
(gdb) r
Starting program:
/Users/michaelabshoff/Desktop/sage-3.2.3-64bit/local/bin/python
/Users/michaelabshoff/Desktop/sage-3.2.3-64bit/tmp/.doctest_ell_finite_field.py
warning: posix_spawn failed, trying execvp, error: 86
Traceback (most recent call last):
File
"/Users/michaelabshoff/Desktop/sage-3.2.3-64bit/tmp/.doctest_ell_finite_field.py",
line 2, in <module>
from sage.all_cmdline import *;
File "/Users/michaelabshoff/Desktop/sage-3.2.3-64bit/local/lib/python2.5
/site-packages/sage/all_cmdline.py", line 14, in <module>
from sage.all import *
File "/Users/michaelabshoff/Desktop/sage-3.2.3-64bit/local/lib/python2.5
/site-packages/sage/all.py", line 64, in <module>
from sage.misc.all import * # takes a while
File "/Users/michaelabshoff/Desktop/sage-3.2.3-64bit/local/lib/python2.5
/site-packages/sage/misc/all.py", line 16, in <module>
from sage_timeit_class import timeit
File "sage_timeit_class.pyx", line 3, in sage.misc.sage_timeit_class
(sage/misc/sage_timeit_class.c:603)
File "/Users/michaelabshoff/Desktop/sage-3.2.3-64bit/local/lib/python2.5
/site-packages/sage/misc/sage_timeit.py", line 12, in <module>
import timeit as timeit_, time, math, preparser, interpreter
File "/Users/michaelabshoff/Desktop/sage-3.2.3-64bit/local/lib/python2.5
/site-packages/sage/misc/interpreter.py", line 95, in <module>
import IPython.ipapi
File "/Users/michaelabshoff/Desktop/sage-3.2.3-64bit/local/lib/python2.5
/site-packages/IPython/__init__.py", line 57, in <module>
__import__(name,glob,loc,[])
File "/Users/michaelabshoff/Desktop/sage-3.2.3-64bit/local/lib/python2.5
/site-packages/IPython/ipstruct.py", line 22, in <module>
from IPython.genutils import list2dict2
File "/Users/michaelabshoff/Desktop/sage-3.2.3-64bit/local/lib/python2.5
/site-packages/IPython/genutils.py", line 118, in <module>
import IPython.rlineimpl as readline
File "/Users/michaelabshoff/Desktop/sage-3.2.3-64bit/local/lib/python2.5
/site-packages/IPython/rlineimpl.py", line 37, in <module>
(status, result) = commands.getstatusoutput( "otool -L %s | grep
libedit" % _rl.__file__ )
File
"/Users/michaelabshoff/Desktop/sage-3.2.3-64bit/local/lib/python2.5/commands.py",
line 54, in getstatusoutput
text = pipe.read()
IOError: [Errno 4] Interrupted system call
Program exited with code 01.
}}}
The above problem is caused by the IPython import. The problem goes away
if we disable the following libedit import test in rlineimpl.py
{{{
uses_libedit = False
if sys.platform == 'darwin' and have_readline:
import commands
(status, result) = commands.getstatusoutput( "otool -L %s | grep
libedit" % _rl.__file__ )
if status == 0 and len(result) > 0:
# we are bound to libedit - new in Leopard
_rl.parse_and_bind("bind ^I rl_complete")
print "Leopard libedit detected."
uses_libedit = True
}}}
This can be done without side effects since we link against the real
readline. The issue has been reported to the IPython mailing list.
spkg is coming up.
Cheers,
Michael
--
Ticket URL: <http://trac.sagemath.org/sage_trac/ticket/4991>
Sage <http://sagemath.org/>
Sage - Open Source Mathematical Software: Building the Car Instead of
Reinventing the Wheel
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups
"sage-trac" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/sage-trac?hl=en
-~----------~----~----~----~------~----~------~--~---