On Fri, Jun 5, 2009 at 8:44 AM, Patrick Maypjm@spe.com wrote:
I'm having trouble installing swank locally. I had it working by
adding a symbolic link from /usr/local/src/slime/swank.asd to /usr/ local/asdf-install/site-systems/swank.asd, but that required write access to /usr/local/src/slime for temporary files. Is there a way to specify a different directory for those?
I then tried this:
(make-package :swank-loader) (defparameter swank-loader::*source-directory* "/home/pjm/slime/") (defparameter swank-loader::*fasl-directory* "/home/pjm/slime/") (load "/home/pjm/slime/swank-loader.lisp") (setq swank:*use-dedicated-output-stream* nil) (swank:create-server :port 4005 :dont-close t)
But it resulted in:
Error: Reader error on #<BASIC-FILE-CHARACTER-INPUT-STREAM ("/home/
pjm/ccl-init.lisp"/4 ISO-8859-1) #x300040F05A0D>, near position 714, within "etq swank:*use-dedic":
Reference to unknown package "SWANK".
While executing: CCL::SIGNAL-READER-ERROR, in process listener(1).
Two things:
1) Probably best not to define the SWANK-LOADER package yourself, differently from how it's defined in "swank-loader.lisp". But I don't think this is the source of your problem.
2) Loading "swank-loader.lisp" doesn't load Swank. It does define SWANK-LOADER:INIT, which you can call to do the load. So this will likely work in a repl (untested):
(load "/home/pjm/slime/swank-loader.lisp") (setq swank-loader:*source-directory* "/home/pjm/slime/" swank-loader:*fasl-directory* "/home/pjm/slime/") (swank-loader:init) (setq swank:*use-dedicated-output-stream* nil) (swank:create-server :port 4005 :dont-close t)
If you package that up in a function, you'll have to add some ugliness because the SWANK-LOADER package isn't defined until you load "swank-loader.lisp", and the SWANK package isn't defined until you execute (swank-loader:init). Something like (again, untested):
(defun load-swank () (load "/home/pjm/slime/swank-loader.lisp") (set (find-symbol "*SOURCE-DIRECTORY*" :swank-loader) "/home/pjm/slime/" (find-symbol "*FASL-DIRECTORY*" :swank-loader) "/home/pjm/slime/") (funcall (find-symbol "INIT" :swank-loader)) (set (find-symbol "*USE-DEDICATED-OUTPUT-STREAM*" :swank) nil) (funcall (find-symbol "CREATE-SERVER" :swank) :port 4005 :dont-close t))
Is there a way to install via asdf locally?
(Clozure CL 64-bit on CentOS, if that matters.)
(pushnew "/usr/local/src/slime" asdf:*central-registry* :test #'equal) (asdf:oos 'asdf:load-op :swank)