Menu

#3909 --disable-readline does not disable GCL's editline support

None
open
nobody
5
2022-11-09
2022-01-02
No

It appears that sometime recently, GCL has switched to using libedit / editline [1]. If run with GCL compiled with editline, the --disable-readline option no longer works. This is significant because it causes other code that talks to maxima through stdin/stdout to fail, e.g. this here:

https://github.com/inducer/pymbolic/blob/main/pymbolic/interop/maxima.py

Sagemath has similar code, though I am unsure whether they are still using it. Code analogous to these lines

https://github.com/andrejv/maxima/blob/b11405d303f657766060c6d725474ccdcacf9c2a/src/init-cl.lisp#L456-L457

but with s/readline/editline seems to fix this. Probably, --disable-readline should disable editline as well.

[1] https://www.thrysoee.dk/editline/

Discussion

  • Andreas Kloeckner

    Correction: It's still (si::readline-off), not (si::editline-off).

     
  • Robert Dodier

    Robert Dodier - 2022-01-04

    Thanks for the report. I see in src/init-cl.lisp, lines 466ff, that Maxima looks for :readline in *features* before calling si::readline-off. I guess that's to detect GCL compiled with readline. What is the value of *features* in GCL on the system of interest?

     
  • Andreas Kloeckner

    (%i1) :lisp *features*
    
    (GCL-WORKING-PROCLAIMS CL MK-DEFSYSTEM COMPILER NUMLIB PCL-STRUCTURES
        PORTABLE-COMMONLOOPS PCL TURBO-CLOSURE-ENV-SIZE TURBO-CLOSURE
        SDEBUG DEFPACKAGE ANSI-CL COMMON-LISP GNU-LD XGCL UNEXEC
        NATIVE-RELOC EDITLINE TRUNCATE_USE_C CLX-LITTLE-ENDIAN BSD GNU
        LINUX X86_64 SGC IEEE-FLOATING-POINT UNIX GMP GCL AKCL COMMON KCL)
    (%i1) 
    
     
  • Robert Dodier

    Robert Dodier - 2022-01-07

    Andreas, thanks for the additional info. From that I think I see how to fix up Maxima.

    Let me take this opportunity to please note that https://github.com/andrejv/maxima IS NOT the official repo and it is several years out of date, so, please refer to https://sourceforge.net/p/maxima/code/ instead.

     
  • Robert Dodier

    Robert Dodier - 2022-11-03
    • labels: --> gcl, readline
     
  • Robert Dodier

    Robert Dodier - 2022-11-03

    Not sure where this one stands; should review to see if it got fixed.

     
  • Camm Maguire

    Camm Maguire - 2022-11-09

    Greetings! Just checked, forthcoming 2.6.13 --disable-readline does disable editline as well. maxima need only check for either :readline or :editline in features and (si::readline-off) as desired.

     
  • Camm Maguire

    Camm Maguire - 2022-11-09

    This one should be closed, IMHO, but I don't seem to have permissions to do it.

     

Log in to post a comment.