I've run into a puzzling problem using Slime with SBCL on my Windows XP box. Puzzling in one way, because it seems to work fine on my laptop (also a Windows XP box), but not on my desktop machine -- not that I can see any differences in my set up.
I'm running GNU Emacs 23.1.50.1, the latest Slime (3/14), and SBCL 1.0.37 (Win32-x86). My .emacs file looks like this:
(setq temporary-file-directory "C:/unzipped/Tmp") (setenv "temp" temporary-file-directory) (setenv "tmp" temporary-file-directory) (setq inferior-lisp-program "sbcl") (add-to-list 'load-path "C:/Slime") (add-to-list 'load-path "C:/Slime/contrib") (require 'slime) (require 'slime-autoloads) (slime-setup '(slime-repl))
I don't have anything in ~/.slime.lisp
When I start slime (with M-x slime), the *inferior lisp* buffer comes up and loads a bunch of files (compiling the first time) and ends with:
;; Swank started at port: 2856 CL-USER>
As expected. (I'll append the full trace to the bottom of this message.) However, the connection is never made and the *slime-repl* buffer never shows up. A look in *Messages* shows:
Connecting to Swank on port 2856.. [2 times]
If I try to telnet to that port ("telnet 127.0.0.1 2856") I get "Could not open connection..."
If I start SBCL in a separate command shell, I get the same behavior. Appears to start up, but neither Emacs nor telnet can talk to the port.
FWIW, I can use slime & CLisp fine on this machine -- so I don't think it's a problem with a firewall blocking the port or something similar.
It appears to me that for whatever reason, the swank server is not opening the advertised port. I took a look at the swank code but I didn't see any additional debugging I can turn on. I've done some extensive Googling but can't find any solution. Any ideas what's going on or how to get it working?
I'm not a subscriber to this mailing list, so if you can CC me directly in responses it would be appreciated. Thanks for any help you can provide!
-- Scott Turner
(progn (load "c:\Documents and Settings\Turner\My Documents\Dad's Files\Slime\swank-loader.lisp" :verbose t) (funcall (read-from-string "swank-loader:init")) (funcall (read-from-string "swank:start-server") "c:\unzipped\Tmp\slime.6340" :coding-system "iso-latin-1-unix"))
This is SBCL 1.0.37, an implementation of ANSI Common Lisp. More information about SBCL is available at http://www.sbcl.org/.
SBCL is free software, provided as is, with absolutely no warranty. It is mostly in the public domain; some portions are provided under BSD-style licenses. See the CREDITS and COPYING files in the distribution for more information.
This is experimental prerelease support for the Windows platform: use at your own risk. "Your Kitten of Death awaits!" * ; loading #P"c:\Documents and Settings\Turner\My Documents\Dad's Files\Slime\swank-loader.lisp" ; loading #P"C:\.slime\fasl\2011-03-13\sbcl-1.0.37-win32-x86\swank-backend.fasl" ; loading #P"C:\.slime\fasl\2011-03-13\sbcl-1.0.37-win32-x86\swank-source-path-parser.fasl" ; loading #P"C:\.slime\fasl\2011-03-13\sbcl-1.0.37-win32-x86\swank-source-file-cache.fasl" ; loading #P"C:\.slime\fasl\2011-03-13\sbcl-1.0.37-win32-x86\swank-sbcl.fasl" STYLE-WARNING: redefining EMACS-INSPECT (#<BUILT-IN-CLASS T>) in DEFMETHOD ; loading #P"C:\.slime\fasl\2011-03-13\sbcl-1.0.37-win32-x86\swank-gray.fasl" STYLE-WARNING: Implicitly creating new generic function STREAM-READ-CHAR-WILL-HANG-P. ; loading #P"C:\.slime\fasl\2011-03-13\sbcl-1.0.37-win32-x86\swank-match.fasl" ; loading #P"C:\.slime\fasl\2011-03-13\sbcl-1.0.37-win32-x86\swank-rpc.fasl" ; loading #P"C:\.slime\fasl\2011-03-13\sbcl-1.0.37-win32-x86\swank.fasl" WARNING: These Swank interfaces are unimplemented: (BACKGROUND-SAVE-IMAGE DISASSEMBLE-FRAME EXEC-IMAGE INTERRUPT-THREAD RECEIVE-IF SAVE-IMAGE SEND SLDB-BREAK-AT-START SLDB-BREAK-ON-RETURN SPAWN) ;; Swank started at port: 2856. CL-USER>
* Scott Turner [2011-03-23 01:11] writes:
It appears to me that for whatever reason, the swank server is not opening the advertised port. I took a look at the swank code but I didn't see any additional debugging I can turn on. I've done some extensive Googling but can't find any solution. Any ideas what's going on or how to get it working?
I haven't look at this recently, but in the past it didn't work because SBCL's READ-CHAR-NO-HANG doesn't work as on Unix. You probably have to wait until SBCL's thread implementation becomes more mature on Windows.
Helmut
Well, I don't see it as not working : it just works fine on Windows 7, "GNU Emacs 24.0.50.1 (i386-msvc-nt6.1.7601) of 2011-03-10 on ROCKHOPPER" and some not too old slime (2010-12-09). The REPL buffer opens up, and the connection is made. So there is something else preventing it from happening in your case.
Fabrice (progn (load "c:\source\lisp\lib\slime\swank-loader.lisp" :verbose t) (funcall (read-from-string "swank-loader:init")) (funcall (read-from-string "swank:start-server") "c:\Users\Fabrice\AppData\Local\Temp\slime.6528" :coding-system "utf-8-unix"))
This is SBCL 1.0.37, an implementation of ANSI Common Lisp. More information about SBCL is available at http://www.sbcl.org/.
SBCL is free software, provided as is, with absolutely no warranty. It is mostly in the public domain; some portions are provided under BSD-style licenses. See the CREDITS and COPYING files in the distribution for more information.
This is experimental prerelease support for the Windows platform: use at your own risk. "Your Kitten of Death awaits!" * ; loading #P"c:\source\lisp\lib\slime\swank-loader.lisp" ; loading #P"c:\Home\.slime\fasl\2010-12-09\sbcl-1.0.37-win32-x86\swank-backend.fasl" ; loading #P"c:\Home\.slime\fasl\2010-12-09\sbcl-1.0.37-win32-x86\swank-source-path-parser.fasl" ; loading #P"c:\Home\.slime\fasl\2010-12-09\sbcl-1.0.37-win32-x86\swank-source-file-cache.fasl" ; loading #P"c:\Home\.slime\fasl\2010-12-09\sbcl-1.0.37-win32-x86\swank-sbcl.fasl" STYLE-WARNING: redefining EMACS-INSPECT (#<BUILT-IN-CLASS T>) in DEFMETHOD ; loading #P"c:\Home\.slime\fasl\2010-12-09\sbcl-1.0.37-win32-x86\swank-gray.fasl" STYLE-WARNING: Implicitly creating new generic function STREAM-READ-CHAR-WILL-HANG-P. ; loading #P"c:\Home\.slime\fasl\2010-12-09\sbcl-1.0.37-win32-x86\swank-match.fasl" ; loading #P"c:\Home\.slime\fasl\2010-12-09\sbcl-1.0.37-win32-x86\swank-rpc.fasl" ; loading #P"c:\Home\.slime\fasl\2010-12-09\sbcl-1.0.37-win32-x86\swank.fasl" WARNING: These Swank interfaces are unimplemented: (BACKGROUND-SAVE-IMAGE DISASSEMBLE-FRAME EXEC-IMAGE INTERRUPT-THREAD RECEIVE-IF SAVE-IMAGE SEND SLDB-BREAK-AT-START SLDB-BREAK-ON-RETURN SPAWN) ;; Swank started at port: 3485. CL-USER>
On 23 March 2011 03:11, Scott Turner srt19170@gmail.com wrote:
I'm running GNU Emacs 23.1.50.1, the latest Slime (3/14), and SBCL 1.0.37 (Win32-x86). My .emacs file looks like this:
You might want to consider using Anton Kovelenko's tree:
http://www.siftsoft.com/inprogress/sbcl-notes.html
It has a ton of Windows fixes not in the mainline yet -- including threads.
Cheers,
-- Nikodemus
On Thu, Mar 24, 2011 at 6:28 AM, Nikodemus Siivola nikodemus@random-state.net wrote:
You might want to consider using Anton Kovelenko's tree:
http://www.siftsoft.com/inprogress/sbcl-notes.html
It has a ton of Windows fixes not in the mainline yet -- including threads.
First of all, thanks for this recommendation. I'll pull it down and try it.
As to another suggestion that it might be a firewall/av issue -- I doubt it, because CLisp works fine. Presumably whatever was blocking the port for SBCL would do the same to CLisp.
Are there any debug flags/traces/etc. that I can try to get a better idea of where the problem might be...?
-- Scott Turner
* Scott Turner [2011-03-24 12:35] writes:
On Thu, Mar 24, 2011 at 6:28 AM, Nikodemus Siivola nikodemus@random-state.net wrote:
You might want to consider using Anton Kovelenko's tree:
http://www.siftsoft.com/inprogress/sbcl-notes.html
It has a ton of Windows fixes not in the mainline yet -- including threads.
First of all, thanks for this recommendation. I'll pull it down and try it.
As to another suggestion that it might be a firewall/av issue -- I doubt it, because CLisp works fine. Presumably whatever was blocking the port for SBCL would do the same to CLisp.
Are there any debug flags/traces/etc. that I can try to get a better idea of where the problem might be...?
A trace is in the *slime-events* buffer. You can also trace the Lisp side by setting (setq swank::*log-events* t) in ~/.swank.lisp
Helmut
On Fri, Mar 25, 2011 at 4:04 AM, Helmut Eller heller@common-lisp.net wrote:
A trace is in the *slime-events* buffer.
That just shows
(:emacs-rex (swank:connection-info) "COMMON-LISP-USER" t 1)
presumably because it is never able to make the connection and move on.
You can also trace the Lisp side by setting (setq swank::*log-events* t) in ~/.swank.lisp
Thanks, I'll give that a try.
-- Scott
I wanted to report success with my Windows problem. Switching to the Kovelenko executable seems to have done the trick. Thanks for all the help!
-- Scott Turner
Have you tried to turn of windows firewall or antivirus? Those might prevent your slime process from opening connections.
Regards, Marko
On Wed, Mar 23, 2011 at 2:11 AM, Scott Turner srt19170@gmail.com wrote:
I've run into a puzzling problem using Slime with SBCL on my Windows XP box. Puzzling in one way, because it seems to work fine on my laptop (also a Windows XP box), but not on my desktop machine -- not that I can see any differences in my set up.
I'm running GNU Emacs 23.1.50.1, the latest Slime (3/14), and SBCL 1.0.37 (Win32-x86). My .emacs file looks like this:
(setq temporary-file-directory "C:/unzipped/Tmp") (setenv "temp" temporary-file-directory) (setenv "tmp" temporary-file-directory) (setq inferior-lisp-program "sbcl") (add-to-list 'load-path "C:/Slime") (add-to-list 'load-path "C:/Slime/contrib") (require 'slime) (require 'slime-autoloads) (slime-setup '(slime-repl))
I don't have anything in ~/.slime.lisp
When I start slime (with M-x slime), the *inferior lisp* buffer comes up and loads a bunch of files (compiling the first time) and ends with:
;; Swank started at port: 2856 CL-USER>
As expected. (I'll append the full trace to the bottom of this message.) However, the connection is never made and the *slime-repl* buffer never shows up. A look in *Messages* shows:
Connecting to Swank on port 2856.. [2 times]
If I try to telnet to that port ("telnet 127.0.0.1 2856") I get "Could not open connection..."
If I start SBCL in a separate command shell, I get the same behavior. Appears to start up, but neither Emacs nor telnet can talk to the port.
FWIW, I can use slime & CLisp fine on this machine -- so I don't think it's a problem with a firewall blocking the port or something similar.
It appears to me that for whatever reason, the swank server is not opening the advertised port. I took a look at the swank code but I didn't see any additional debugging I can turn on. I've done some extensive Googling but can't find any solution. Any ideas what's going on or how to get it working?
I'm not a subscriber to this mailing list, so if you can CC me directly in responses it would be appreciated. Thanks for any help you can provide!
-- Scott Turner
(progn (load "c:\Documents and Settings\Turner\My Documents\Dad's Files\Slime\swank-loader.lisp" :verbose t) (funcall (read-from-string "swank-loader:init")) (funcall (read-from-string "swank:start-server") "c:\unzipped\Tmp\slime.6340" :coding-system "iso-latin-1-unix"))
This is SBCL 1.0.37, an implementation of ANSI Common Lisp. More information about SBCL is available at http://www.sbcl.org/.
SBCL is free software, provided as is, with absolutely no warranty. It is mostly in the public domain; some portions are provided under BSD-style licenses. See the CREDITS and COPYING files in the distribution for more information.
This is experimental prerelease support for the Windows platform: use at your own risk. "Your Kitten of Death awaits!"
; loading #P"c:\Documents and Settings\Turner\My Documents\Dad's Files\Slime\swank-loader.lisp" ; loading #P"C:\.slime\fasl\2011-03-13\sbcl-1.0.37-win32-x86\swank-backend.fasl" ; loading #P"C:\.slime\fasl\2011-03-13\sbcl-1.0.37-win32-x86\swank-source-path-parser.fasl" ; loading #P"C:\.slime\fasl\2011-03-13\sbcl-1.0.37-win32-x86\swank-source-file-cache.fasl" ; loading #P"C:\.slime\fasl\2011-03-13\sbcl-1.0.37-win32-x86\swank-sbcl.fasl" STYLE-WARNING: redefining EMACS-INSPECT (#<BUILT-IN-CLASS T>) in DEFMETHOD ; loading #P"C:\.slime\fasl\2011-03-13\sbcl-1.0.37-win32-x86\swank-gray.fasl" STYLE-WARNING: Implicitly creating new generic function STREAM-READ-CHAR-WILL-HANG-P. ; loading #P"C:\.slime\fasl\2011-03-13\sbcl-1.0.37-win32-x86\swank-match.fasl" ; loading #P"C:\.slime\fasl\2011-03-13\sbcl-1.0.37-win32-x86\swank-rpc.fasl" ; loading #P"C:\.slime\fasl\2011-03-13\sbcl-1.0.37-win32-x86\swank.fasl" WARNING: These Swank interfaces are unimplemented: (BACKGROUND-SAVE-IMAGE DISASSEMBLE-FRAME EXEC-IMAGE INTERRUPT-THREAD RECEIVE-IF SAVE-IMAGE SEND SLDB-BREAK-AT-START SLDB-BREAK-ON-RETURN SPAWN) ;; Swank started at port: 2856. CL-USER>
slime-devel site list slime-devel@common-lisp.net http://common-lisp.net/mailman/listinfo/slime-devel