From: Sam S. <sd...@gn...> - 2006-12-07 02:20:21
|
> * Wim Oudshoorn <jbhqfubb@kf4nyy.ay> [2006-12-07 00:33:29 +0100]: > Sam Steingold <sd...@gn...> writes: >> Wim Oudshoorn wrote: >>> Sam Steingold <sd...@gn...> writes: >> >>> ;; Loaded file /Users/woudshoo/.clisprc >>> ;; Compiling file /Users/woudshoo/lisp/monotone-experiment.lisp ... >>> *** - READ from #<INPUT BUFFERED FILE-STREAM CHARACTER #P"/Users/woudshoo/lisp/monotone-experiment.lisp" @6>: there is no package with >>> name "CLSQL" >>> >>> 0 errors, 0 warnings >> >> you need to load CLSQL before compiling monotone-experiment.lisp > > Hm, how do I do that? e.g., (require 'clsql) or (asdf load "clsql"). > There are some concepts I am apparantly not grasping. > And I can't seem to findd the right place in the documentation > to enlighten me. So any pointers appreciated. > > Question/Problem 1: > > in the directory ~/lisp/ I have the files asdf.lisp, asdf.fas and asdf.lib > And if I do the following: > > nelly:~/lisp woudshoo$ clisp -q -norc > [1]> (require 'asdf) > > *** - LOAD: A file with name ASDF does not exist > The following restarts are available: > ABORT :R1 ABORT > Break 1 [2]> > > I expected require to look for asdf.fas or asdf.lisp, but > it seems not to find it. So what does require exactly do? > in the CLHS it says that how require finds its files > is implementation dependend so why does this not work. http://clisp.cons.org/impnotes/system-dict.html#require http://clisp.cons.org/impnotes/system-dict.html#loadfile http://clisp.cons.org/impnotes/system-dict.html#load-paths > Question/Problem 2: > > I created a file test-load.lisp with the following content: > > (load "asdf") > (setf asdf:*central-registry* > '(*default-pathname-defaults* > #p"~/lisp-asdf/")) > (asdf:operate 'asdf:load-op 'clsql) > > > Now if I load the file it works: > > clisp -q -norc test-load.lisp > ============================================ > nelly:~/lisp woudshoo$ clisp -q -norc test-load.lisp > ; loading system definition from /Users/woudshoo/lisp-asdf/clsql.asd into #<PACKAGE ASDF0> > ; loading system definition from /Users/woudshoo/lisp-asdf/cffi.asd into #<PACKAGE ASDF1> > ; registering #<SYSTEM CFFI #x1A982445> as CFFI > 0 errors, 0 warnings > ; loading system definition from /Users/woudshoo/lisp-asdf/cffi-uffi-compat.asd into #<PACKAGE ASDF1> > ; registering #<SYSTEM CFFI-UFFI-COMPAT #x1A9C2E55> as CFFI-UFFI-COMPAT > WARNING: The generic function #<STANDARD-GENERIC-FUNCTION CFFI:FOREIGN-TYPE-SIZE> is being modified, but has already been called. > 0 errors, 0 warnings > ; registering #<SYSTEM UFFI #x1A9A8079> as UFFI > ; registering #<SYSTEM CLSQL #x1A9A98C5> as CLSQL > WARNING: The generic function #<STANDARD-GENERIC-FUNCTION PERFORM> is being modified, but has already been called. > WARNING: DEFUN/DEFMACRO: redefining macro LOOP-FINISH in /Users/woudshoo/lisp-asdf/clsql-3.7.8/sql/ansi-loop.fas, was defined in > /Users/woudshoo/src/clisp-2.41/src/loop.fas > WARNING: DEFUN/DEFMACRO: redefining macro LOOP in /Users/woudshoo/lisp-asdf/clsql-3.7.8/sql/ansi-loop.fas, was defined in > /Users/woudshoo/src/clisp-2.41/src/loop.fas > 0 errors, 0 warnings > =========================================== > > > But if I compile the file > > clisp -q -norc -c test-load.lisp > =========================================== > nelly:~/lisp woudshoo$ clisp -q -norc -c test-load.lisp > ;; Compiling file /Users/woudshoo/lisp/test-load.lisp ... > *** - READ from #<INPUT BUFFERED FILE-STREAM CHARACTER #P"/Users/woudshoo/lisp/test-load.lisp" @3>: there is no package with name "ASDF" > > 0 errors, 0 warnings > =========================================== > you need something like (eval-when (:compile :load-tople) (load "asdf") (asdf load "clsql")) in general, I think it would be a good idea for you to create an image that contains asdf and clsql and always use it. -- Sam Steingold (http://sds.podval.org/) on Fedora Core release 5 (Bordeaux) http://dhimmi.com http://ffii.org http://memri.org http://jihadwatch.org http://pmw.org.il http://thereligionofpeace.com Microsoft: announce yesterday, code today, think tomorrow. |