> 2010/3/23 François Bissey <f.r.bis...@massey.ac.nz>: > > Hi, > > Hi, > > > I am trying to find the root of some test failure with the maxima > > interface on the port of sage of Gentoo and I have just read the content > > of maxima-noreadline: > > #!/bin/sh > > SAGE_CLISP_DISABLE_READLINE_HACK="yes"; export > > SAGE_CLISP_DISABLE_READLINE_HACK > > exec "$SAGE_LOCAL"/bin/maxima "$@" > > -------------- > > > > Considering that sage has switched to ecl, is this still relevant? > > It should not be, and certainly is not for a clisp not built using > the sage spkg. > > I used a different approach in the mandriva package. Instead of using the > SAGE_CLISP_DISABLE_READLINE_HACK environment variable, I changed > a bit the behavior of the clisp -I option (patch credit to Sam Steingold, > after asking in clisp-devel): > http://svn.mandriva.com/cgi-bin/viewvc.cgi/packages/cooker/clisp/current/SO > URCES/clisp-noreadline.patch?revision=418280&view=markup > > And added this change to the maxima script, to pass -I to clisp if > --disable-readline > is used: > http://svn.mandriva.com/cgi-bin/viewvc.cgi/packages/cooker/maxima/current/S > OURCES/maxima-5.19.1-clisp-noreadline.patch?revision=421784&view=markup > > Since you say you are searching for the cause of problems in sage's > interface to > maxima, this patch to allow building ecl backend may also be useful: > http://svn.mandriva.com/cgi-bin/viewvc.cgi/packages/cooker/maxima/current/S > OURCES/maxima-5.20.1-ecl-ldflags.patch?revision=514331&view=markup > > And this sagemath patch to actually allow using also clisp and gcl > backends, and > passing all doctests: > http://svn.mandriva.com/cgi-bin/viewvc.cgi/packages/cooker/sagemath/current > /SOURCES/sage-4.3.3-maxima.patch?revision=524719&view=markup > > The problem with clisp and gcl is that, because the pexpect > interface used by sage > allocates a pty, it causes the lisp interface to consider it is > running in an interactive > mode, and redirects stderr to stdout. The solution for clisp was easier, > but gcl required sending a ":lisp <form>" command. > > But the sage interface appears to still be somewhat fragile, as if > one mistakingly adds > two ";", it will hang any lisp backend, due to the pexpect interface > loosing sync. > Hi Paulo,
I found the source of my test failures it is not related to clisp or ecl building. It was in fact down to the fact that I have maxima installed with both ecl and sbcl backend. By default maxima uses the sbcl backend over the ecl one. So we changed the calls in local/lib/python2.6/site-packages/sage/interfaces/maxima.py from maxima-noreadline to maxima -l ecl We don't use or ship the maxima-noreadline at all. What we missed is another call to maxima (maxima --very-quiet....) later on in the script. If you have both backends, sbcl is called. In the result of the later call the first three lines of output are shaved off to remove ecl startup info output, these are not present if you use sbcl. So if sbcl, and probably other lisp engines, is used the output of the call to that command is truncated leading to tests failures in sage -t -force_lib "devel/sage/sage/interfaces/maxima.py" My comment was more of the kind: "Hey, sage ship this file that looks useless now that sage uses ecl by default. Shouldn't it be removed?" Francois -- To post to this group, send an email to sage-devel@googlegroups.com To unsubscribe from this group, send an email to sage-devel+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/sage-devel URL: http://www.sagemath.org To unsubscribe from this group, send email to sage-devel+unsubscribegooglegroups.com or reply to this email with the words "REMOVE ME" as the subject.