Overview
I'm trying to run a simplified version of this code, that needs the cxml
and klacks
library for XML parsing. (The concrete code is Chapter 47 of the book "The Art of Postgresql".)
Since I know very little about (Common) Lisp/ASDF/Quicklisp, I don't know how to properly install the required cxml
/klacks
library.
System
In case that matters, I'm using SBCL 1.5.5.debian
under Ubuntu (For the records, I had tried clisp
previously, but I found that it comes with a very outdated version of ASDF.)
Steps I did so far
In bash:
sudo apt-get install cl-cxml
(Indeed /usr/share/common-lisp/source/cxml/
and /usr/share/common-lisp/source/cxml/klacks/
are now present on my system.)
In sbcl REPL:
(ql:quickload :cxml)
Result: a long error message, whose gist seems to be Component "cxml/dom" not found
. (Even though /usr/share/common-lisp/source/cxml/dom
does exist, but I'm not sure it matters.) See complete error message at the end.
(ql:quickload :klacks)
Result: another long error, whose gist is System "klacks" not found
(even though, again, the directory is present on the system).
Remark
Using qucikload
for other libraries works, e.g.:
(ql:quickload :postmodern)
(ql:quickload :zip)
(ql:quickload :yason)
Questions
In short: what is the proper way of getting cxml
and klacks
installed on the above system?
Besides the solution to this concrete issue, I'd like to understand a bit better what is going on, in particular:
Can all dependencies be installed with
quicklisp
, or are there some that support it and some that don't? (And in this case, iscxml
a dependency that does not supportquicklisp
? How can I know which packages do support it?)Does
quciklisp
look at the local installation (i.e./usr/share/common-lisp/source/cxml/
) at all, or does it work only from an online repository? (In other words: does it matter that I installedcl-xml
via apt-get?)If it takes the local path into account, then why doesn't it find
cxml/dom
andcxml/klacks
?Since
klacks
is a subpackage ofcxml
, do I need to import it separately or not? By browsing the mentioned source code, especially package.lisp and pubnames.asd, I don't see it explicitly imported. Still it is used in the code, e.g. here. So I guess what is needed is to importcxml
explicitly, and then all subpackages (includingklacks
) get also imported, automatically prefixed with the proper namespace?
Detailed error messages
* (ql:quickload :cxml)
;;; Checking for wide character support... WARNING: Lisp implementation doesn't use UTF-16, but accepts surrogate code points.
yes, using code points.
To load "cxml":
Load 1 ASDF system:
cxml
; Loading "cxml"
;;; Checking for wide character support... WARNING: Lisp implementation doesn't use UTF-16, but accepts surrogate code points.
yes, using code points.
.
;;; Checking for wide character support... WARNING: Lisp implementation doesn't use UTF-16, but accepts surrogate code points.
yes, using code points.
;;; Checking for wide character support... WARNING: Lisp implementation doesn't use UTF-16, but accepts surrogate code points.
yes, using code points.
;;; Building Closure with CHARACTER RUNES
To load "cxml/dom":
Load 3 ASDF systems:
closure-common puri trivial-gray-streams
Install 1 Quicklisp release:
cxml
; Loading "cxml/dom"
;;; Checking for wide character support... WARNING: Lisp implementation doesn't use UTF-16, but accepts surrogate code points.
yes, using code points.
.
debugger invoked on a ASDF/FIND-COMPONENT:MISSING-COMPONENT in thread
#<THREAD "main thread" RUNNING {10005504C3}>:
Component "cxml/dom" not found
Type HELP for debugger help, or (SB-EXT:EXIT) to exit from SBCL.
restarts (invokable by number or by possibly-abbreviated name):
0: [RETRY ] Retry ASDF operation.
1: [CLEAR-CONFIGURATION-AND-RETRY] Retry ASDF operation after resetting the
configuration.
2: Retry ASDF operation.
3: Retry ASDF operation after resetting the
configuration.
4: [ABORT ] Give up on "cxml/dom"
5: Give up on "cxml"
6: Exit debugger, returning to top level.
((:METHOD ASDF/OPERATE:OPERATE (SYMBOL T)) ASDF/LISP-ACTION:LOAD-OP "cxml/dom" :VERBOSE NIL) [fast-method]
error finding frame source: Bogus form-number: the source file has probably
changed too much to cope with.
source: NIL
0]
* (ql:quickload :klacks)
debugger invoked on a QUICKLISP-CLIENT:SYSTEM-NOT-FOUND in thread
#<THREAD "main thread" RUNNING {10005504C3}>:
System "klacks" not found
Type HELP for debugger help, or (SB-EXT:EXIT) to exit from SBCL.
restarts (invokable by number or by possibly-abbreviated name):
0: [CONTINUE] Try again
1: [ABORT ] Give up on "klacks"
2: Exit debugger, returning to top level.
((LABELS QUICKLISP-CLIENT::RECURSE :IN QUICKLISP-CLIENT::COMPUTE-LOAD-STRATEGY) "klacks")
source: (CERROR "Try again" 'SYSTEM-NOT-FOUND :NAME NAME)