kovisoft / slimv

Official mirror of Slimv versions released on vim.org
454 stars 60 forks source link

Getting started: Simple evaluation crashes swank server #62

Closed sgharms closed 7 years ago

sgharms commented 7 years ago

Hello

SYSTEM:

➜ ctci sbcl --version SBCL 1.0.55.0.debian

with Vim 8.x

CONFIG:

" SLIMV Lisp interpretation
let g:slimv_swank_cmd = '! tmux new-window -d -n REPL-SBCL "sbcl --load ~/.vim/pack/my-plugins/start/slimv/slime/start-swank.lisp"'

INPUT:

(print "hello")

ERROR OUTPUT:

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.
;
; compilation aborted because of fatal error:
;   The symbol "HOST-ENT-ADDRESS-TYPE" is not external in the SB-BSD-SOCKETS package.
;
;     Line: 117, Column: 76, File-Position: 3633
;
;     Stream: #<SB-SYS:FD-STREAM
;               for "file /home/sgharms/.vim/pack/my-plugins/start/slimv/slime/swank/sbcl.lisp"
;               {C538C89}>
;
;;
;; Error compiling /home/sgharms/.vim/pack/my-plugins/start/slimv/slime/swank/sbcl.lisp:
;;   COMPILE-FILE returned NIL.
;;

debugger invoked on a SIMPLE-ERROR in thread
#<THREAD "initial thread" RUNNING {AAF2A31}>:
  COMPILE-FILE returned NIL.

I then enter the expression and ,e. This stalls for a few moments. I'm using a TMUX-based mode on a remote workstation.

That's all the information I have, sadly. I'm still new to Lisp programming and don't have the chops to debug this very well, I'm sorry to say. Is there something I should try? I got this working on my mac, but was hoping to start working on this ubuntu system.

Thanks!

Steven

sgharms commented 7 years ago

Here's an addendum. If I CONTINUE from the first restart (hope I'm using that term right ;)), I get this second error:

; compilation unit aborted
;   caught 2 fatal ERROR conditions

; file: /home/sgharms/.vim/pack/my-plugins/start/slimv/slime/start-swank.lisp
; in: SWANK:CREATE-SERVER :PORT
;     (SWANK:CREATE-SERVER :PORT (PARSE-INTEGER (MY-GETENV "SWANK_PORT" "4005"))
;      :DONT-CLOSE T)
;
; caught STYLE-WARNING:
;   undefined function: SWANK:CREATE-SERVER
;
; compilation unit finished
;   Undefined function:
;     SWANK:CREATE-SERVER
;   caught 1 STYLE-WARNING condition

debugger invoked on a UNDEFINED-FUNCTION in thread
#<THREAD "initial thread" RUNNING {AAF2A31}>:
  The function SWANK:CREATE-SERVER is undefined.

Type HELP for debugger help, or (SB-EXT:QUIT) to exit from SBCL.

Which would seem to indicate that the essential function for loading a server hasn't been defined .I can see a lot of things going wrong if that's the case. :)

I saw that Tamas had posted on SO post that there might be some load-order dependency.

For completeness...

If i try: vim -U NONE -N foo.lisp And do :scriptnames

 41: ~/.vim/pack/my-plugins/start/slimv/plugin/paredit.vim
 42: ~/.vim/pack/my-plugins/start/slimv/ftdetect/clojure.vim
 43: ~/.vim/pack/my-plugins/start/slimv/syntax/lisp/slimv-syntax-lisp.vim
 44: ~/local/share/vim/vim80/syntax/lisp.vim
 45: ~/.vim/pack/my-plugins/start/slimv/ftplugin/lisp/slimv-lisp.vim
 46: ~/.vim/pack/my-plugins/start/slimv/ftplugin/slimv.vim
 47: ~/local/share/vim/vim80/ftplugin/lisp.vim
 48: ~/.vim/pack/my-plugins/start/slimv/indent/lisp.vim
 49: ~/local/share/vim/vim80/indent/lisp.vim

It definitely looks like i'm loading slimv. Evaluating the line blows up in the same way.

sgharms commented 7 years ago

Oh, it might matter that I'm using Vim 8.x using its built in plugin loader v. pathogen or something similar.

sgharms commented 7 years ago

After some reconfiguring and recompiling, I upgraded SBCL to the latest version and things seem to work. Further investigation is probably unwarranted since I was on an old ubuntu system whose LTS status has moved out of service.

kovisoft commented 7 years ago

Sorry for the late response but I was on vacation. You are right, the problem was that your SBCL was outdated. This issue also occurred on my old ubuntu system with SBCL version 1.0.55 and disappeared when I upgraded SBCL to version 1.3.1.