Emacs+Slime inferior-lisp exited abnormally with code 5

I try to install slime in emacs. I follow many manuals and got one oucome.

"M-x slime" trow exeption "process inferior-lisp exited abnormally with code 5"

My .emacs file text

(setq inferior-lisp-program "C:/SBCL/sbcl.exe") 
(add-to-list 'load-path "C:/slime/") 
(require 'slime) 

Following the comment, I tried to understand where the installation falls

-(load #P"C:/slime/swank-loader")
-T
-(swank-loader::init :reload t)
-WARNING: redefining EMACS-INSPECT (#(SB-PCL:SYSTEM-CLASS COMMON-LISP:T)) in DEFMETHOD
NIL 
-(swank:create-server :port 7777)

;;Swank started at port:7777

In Emacs
-M-x slime-connect
Host: localhost
Port: 7777

-Lisp connection closed unexpectedly: connection broken by remote peer

In other topics where i saw that error message, peoples run complex sourcecode with mistakes. The problem was solved by correcting errors. It seems like different situation or i don't understand something.

Upvotes: 2

Views: 438

Answers (2)

Alexander Artemenko
Alexander Artemenko

Reputation: 22746

Oleg, try to give ip address 127.0.0.1 instead of localhost when doing slime-connect. I have similar problem on OSX when connecting to a remote SLIME server.

Upvotes: 1

coredump
coredump

Reputation: 38789

This is too long for a comment.

You need to find out at which layer the problem occurs. Try for example to run SBCL in a shell with the same command-line (e.g. C:/SBCL/sbcl.exe); if it works, in the REPL:

CL-USER> (load #P"C:/slime/swank-loader")

If that works, you can manually init the swank backend (the Common Lisp part of the Slime/Swank protocol).

CL-USER> (swank-loader::init :reload t)

Then, try to start a server (the port value is arbitrary):

CL-USER> (swank:create-server :port 7777)

If a server starts, you can try to run slime-connect from Emacs, using the localhost port and the same port.

Upvotes: 1

Related Questions