Re: slime + clisp + emacs: server disconnects

Pascal Bourguignon <[email protected]> Tue, 23 Jul 2019 18:49:50 +0200
Newsgroups gmane.lisp.slime.devel
Message-ID <[email protected]>
--Apple-Mail=_38D043A9-F6C1-48B6-9D6C-F9DEB9A8DBD6
Content-Transfer-Encoding: quoted-printable
Content-Type: text/plain;
	charset=utf-8



> On 23 Jul 2019, at 15:29, Stuart Little <[email protected]> wrote:
>=20
> I am running
>=20
> - emacs 26.2
> - slime 2.24
> - clisp 2.49
>=20
> on Linux.
>=20

Works for me with
- emacs 26.1
- slime 2.23
- clisp 2.49.93+

on Darwin and on Linux.

> Running M-x slime in emacs with 'inferior-lisp-program' set to 'clisp' =
starts slime fine. I can usually run one evaluation (like say (+ 2 3)), =
whereupon any other action (pressing 'enter', say) will result in a =
disconnect:
>=20
> Lisp connection closed unexpectedly: connection broken by remote peer
>=20


Add a ~/.swank.lisp file with a line such as:

#+clisp (defparameter swank:*use-dedicated-output-stream*  nil)


>=20
> (a) rlwrap clisp

rlwrap shouldn=E2=80=99t be needed with clisp, since it can be compiled =
with readline. This is the reason why clisp is GPL!

> (b) (load =
"~/quicklisp/dists/quicklisp/software/slime-v2.24/swank-loader.lisp")
> (c) (swank-loader::init :reload t)
> (d) (swank:create-server :port 7000)
> (e) from within emacs: M-x slime-connect with localhost and port 7000
>=20
> Same behavior as before: I get connected, get to make a few =
evaluations, get disconnected.
>=20
> This time around rlwrap tells me (in the terminal where I started =
clisp):
>=20
> rlwrap: warning: clisp crashed, killed by SIGSEGV

This should not occur.



Since you don=E2=80=99t seem to have readline compiled in, perhaps you =
don=E2=80=99t have libsigsegv compiled in either?
I would advise you to recompile clisp with those essential libraries!

Have a look at the script I currently use to compile and install clisp =
from sources:
=
https://github.com/informatimago/install/blob/master/install-pjb-environme=
nt#L399
Don=E2=80=99t use this script indiscriminately, it installs a lot of =
things!!! Instead, copy and paste what you need.



--=20
__Pascal J. Bourguignon__





--Apple-Mail=_38D043A9-F6C1-48B6-9D6C-F9DEB9A8DBD6
Content-Transfer-Encoding: quoted-printable
Content-Type: text/html;
	charset=utf-8

<html><head><meta http-equiv=3D"Content-Type" content=3D"text/html; =
charset=3Dutf-8"></head><body style=3D"word-wrap: break-word; =
-webkit-nbsp-mode: space; line-break: after-white-space;" class=3D""><br =
class=3D""><div><br class=3D""><blockquote type=3D"cite" class=3D""><div =
class=3D"">On 23 Jul 2019, at 15:29, Stuart Little &lt;<a =
href=3D"mailto:[email protected]" =
class=3D"">[email protected]</a>&gt; wrote:</div><br =
class=3D"Apple-interchange-newline"><div class=3D""><div class=3D"">I am =
running<br class=3D""><br class=3D"">- emacs 26.2<br class=3D"">- slime =
2.24<br class=3D"">- clisp 2.49<br class=3D""><br class=3D"">on =
Linux.<br class=3D""><br class=3D""></div></div></blockquote><div><br =
class=3D""></div>Works for me with<div class=3D""><blockquote =
type=3D"cite" class=3D""></blockquote>- emacs 26.1<br =
class=3D""><blockquote type=3D"cite" class=3D""></blockquote>- slime =
2.23<br class=3D"">- clisp&nbsp;2.49.93+</div><div class=3D""><br =
class=3D""></div><div class=3D"">on Darwin and on Linux.</div><div =
class=3D""><br class=3D""></div><blockquote type=3D"cite" class=3D""><div =
class=3D""><div class=3D"">Running M-x slime in emacs with =
'inferior-lisp-program' set to 'clisp' starts slime fine. I can usually =
run one evaluation (like say (+ 2 3)), whereupon any other action =
(pressing 'enter', say) will result in a disconnect:<br class=3D""><br =
class=3D"">Lisp connection closed unexpectedly: connection broken by =
remote peer<br class=3D""><br class=3D""></div></div></blockquote><div><br=
 class=3D""></div><div><br class=3D""></div><div>Add a ~/.swank.lisp =
file with a line such as:</div><div><br class=3D""></div><div>#+clisp =
(defparameter swank:*use-dedicated-output-stream* =
&nbsp;nil)</div><div><br class=3D""></div><div><br =
class=3D""></div><blockquote type=3D"cite" class=3D""><div class=3D""><div=
 class=3D""><br class=3D"">(a) rlwrap clisp<br =
class=3D""></div></div></blockquote><div><br class=3D""></div>rlwrap =
shouldn=E2=80=99t be needed with clisp, since it can be compiled with =
readline. This is the reason why clisp is GPL!</div><div><br =
class=3D""><blockquote type=3D"cite" class=3D""><div class=3D""><div =
class=3D"">(b) (load =
"~/quicklisp/dists/quicklisp/software/slime-v2.24/swank-loader.lisp")<br =
class=3D"">(c) (swank-loader::init :reload t)<br class=3D"">(d) =
(swank:create-server :port 7000)<br class=3D"">(e) from within emacs: =
M-x slime-connect with localhost and port 7000<br class=3D""><br =
class=3D"">Same behavior as before: I get connected, get to make a few =
evaluations, get disconnected.<br class=3D""><br class=3D"">This time =
around rlwrap tells me (in the terminal where I started clisp):<br =
class=3D""><br class=3D"">rlwrap: warning: clisp crashed, killed by =
SIGSEGV<br class=3D""></div></div></blockquote><br =
class=3D""></div><div>This should not occur.</div><div><br =
class=3D""></div><div><div class=3D""><br class=3D""></div><div =
class=3D""><br class=3D""></div></div><div>Since you don=E2=80=99t seem =
to have readline compiled in, perhaps you don=E2=80=99t have libsigsegv =
compiled in either?</div><div>I would advise you to recompile clisp with =
those essential libraries!</div><div><br class=3D""></div><div>Have a =
look at the script I currently use to compile and install clisp from =
sources:</div><div><a =
href=3D"https://github.com/informatimago/install/blob/master/install-pjb-e=
nvironment#L399" =
class=3D"">https://github.com/informatimago/install/blob/master/install-pj=
b-environment#L399</a></div><div class=3D"">Don=E2=80=99t use this =
script indiscriminately, it installs a lot of things!!! Instead, copy =
and paste what you need.</div><div class=3D""><br class=3D""></div><div =
class=3D""><br class=3D""></div><div class=3D""><br class=3D""><div =
class=3D"">
<div style=3D"color: rgb(0, 0, 0); letter-spacing: normal; text-align: =
start; text-indent: 0px; text-transform: none; white-space: normal; =
word-spacing: 0px; -webkit-text-stroke-width: 0px; word-wrap: =
break-word; -webkit-nbsp-mode: space; line-break: after-white-space;" =
class=3D""><div style=3D"color: rgb(0, 0, 0); letter-spacing: normal; =
text-align: start; text-indent: 0px; text-transform: none; white-space: =
normal; word-spacing: 0px; -webkit-text-stroke-width: 0px; word-wrap: =
break-word; -webkit-nbsp-mode: space; line-break: after-white-space;" =
class=3D""><div style=3D"color: rgb(0, 0, 0); letter-spacing: normal; =
text-align: start; text-indent: 0px; text-transform: none; white-space: =
normal; word-spacing: 0px; -webkit-text-stroke-width: 0px; word-wrap: =
break-word; -webkit-nbsp-mode: space; line-break: after-white-space;" =
class=3D"">--&nbsp;<br class=3D"">__Pascal J. Bourguignon__</div><div =
style=3D"color: rgb(0, 0, 0); letter-spacing: normal; text-align: start; =
text-indent: 0px; text-transform: none; white-space: normal; =
word-spacing: 0px; -webkit-text-stroke-width: 0px; word-wrap: =
break-word; -webkit-nbsp-mode: space; line-break: after-white-space;" =
class=3D""><br class=3D""><br class=3D""><br class=3D""></div></div></div>=

</div>
<br class=3D""></div></body></html>=

--Apple-Mail=_38D043A9-F6C1-48B6-9D6C-F9DEB9A8DBD6--