Hi,
I try to install slime (HEAD at Thu Jun 24 12:26:02 MDT 2004) on my SGI box. I am running cmucl 18e (see the log below) and it complains about a binding to port 0. As far as I know, the problem comes from swank.lisp where we read:
(defun start-server (port-file &optional (style *communication-style*) dont-close) (setup-server 0 (lambda (port) (announce-server-port port-file port)) style dont-close))
!/ Notice the (setup-server 0 ... !/
and:
(defun setup-server (port announce-fn style dont-close) (declare (type function announce-fn)) (let* ((socket (create-socket *loopback-interface* port)) (port (local-port socket)))
!/ Notice the 'port' use on the first ligne of the let* which here is 0.!/
... and as far as 'create-socket' uses ext:create-inet-listener, i guess that this is the problem.
here goes the log.
hope this helps
----------------------< LOG >----------------------- CMU Common Lisp 18e, running on batou With core: /local/lib/cmucl/lib/lisp.core Dumped on: Thu, 2003-04-10 03:01:10+02:00 on Neptune See http://www.cons.org/cmucl/ for support information. Loaded subsystems: Python 1.1, target SGI CLOS 18e (based on PCL September 16 92 PCL (f)) * ; Loading #p"/usr/people/case/.conf/emacs/slime/swank-loader.lisp". ;; Loading #p"/usr/people/case/.slime/fasl/cmu-18e/swank-backend.sgif". ;; Loading #p"/usr/people/case/.slime/fasl/cmu-18e/nregex.sgif". ;; Loading #p"/usr/people/case/.slime/fasl/cmu-18e/swank-source-path-parser.sgif". ;; Loading #p"/usr/people/case/.slime/fasl/cmu-18e/swank-cmucl.sgif". ;; Loading #p"/usr/people/case/.slime/fasl/cmu-18e/swank.sgif". Warning: These Swank interfaces are unimplemented: (ALL-THREADS INTERRUPT-THREAD RECEIVE RESTART-FRAME RETURN-FROM-FRAME SEND SPAWN WHO-MACROEXPANDS WHO-SPECIALIZES) T *
Error in function CREATE-INET-LISTENER: Error binding socket to port 0: Cannot assign requested address
Restarts: 0: [ABORT] Return to Top-Level.
Debug (type H for help)
(CREATE-INET-LISTENER 0 :STREAM :HOST 2130706433 ...) Source: Error finding source: Error in function DEBUG::GET-FILE-TOP-LEVEL-FORM: Source file no longer exists: target:code/internet.lisp. 0]
case tbcode@yahoo.com writes:
Hi,
I try to install slime (HEAD at Thu Jun 24 12:26:02 MDT 2004) on my SGI box. I am running cmucl 18e (see the log below) and it complains about a binding to port 0. As far as I know, the problem comes from swank.lisp where we read:
(defun start-server (port-file &optional (style *communication-style*) dont-close) (setup-server 0 (lambda (port) (announce-server-port port-file port)) style dont-close))
!/ Notice the (setup-server 0 ... !/
and:
(defun setup-server (port announce-fn style dont-close) (declare (type function announce-fn)) (let* ((socket (create-socket *loopback-interface* port)) (port (local-port socket)))
!/ Notice the 'port' use on the first ligne of the let* which here is 0.!/
Giving zero for the port is intended to mean "use any available port." I thought that was POSIX or the like but maybe it's not portable.
As a temporary workaround I suggest changing '0' to 'default-server-port'. The downside is that if you try to start a second SLIME on the same machine with `C-u M-x slime' then it won't be able to bind the listen socket.
See also the thread started by Stefan Reichör just a now about a similar issue with CMUCL on FreeBSD.
-Luke
Giving zero for the port is intended to mean "use any available port." I thought that was POSIX or the like but maybe it's not portable.
I apologize, the problem was on the :host key side, not on the port 0 side. You previous assumption was right, giving port zero means "use any available poer".
So now everything is good for me too.
thanks a lot.
c.