Subject: Re: "telnet clx", "portable CLX", and the various Lisps
From: (Rob Warnock)
Date: Mon, 19 Dec 2005 23:23:39 -0600
Newsgroups: comp.lang.lisp
Message-ID: <>
C Y <> wrote:
| It didn't seem to work right off "out of the box" but I don't think it
| will be too terribly difficult to get it working, once I figure out a
| little more detail about how cmucl implements require ...

The quick & dirty version: To make (REQUIRE :FOO) work in CMUCL,
assuming CMUCL has been installed in "/usr/local/{bin,lib}/":

0. Make sure the file named, say, "/usr/home/YOU/lib/lisp/foo.lisp",
   contains a (PROVIDE :FOO) somewhere in it at the top level, so it
   will be executed when it loads.

1. FILE-COMPILE it, producing "/usr/home/YOU/lib/lisp/foo.x86f".
   [This is not strictly necessary, but if you don't compile it
   then change all ".x86f" below into ".lisp".]

2. Create the symlink "/usr/local/lib/cmucl/lib/subsystems/foo-library.x86f"
   pointing to "/usr/home/YOU/lib/lisp/foo.x86f". That is:

      $ ln -s /usr/home/YOU/lib/lisp/foo.x86f \

   Note that the symlink *MUST* be named "foo-library", not just "foo".
   [Long story. Don't ask.]

3. Run "/usr/local/bin/lisp" or "/usr/local/bin/cmucl" or whatever,
   then try the following:

      * *modules*

      ("ASDF" "LOOP")
      * (require :foo)

      ; Loading #p"/usr/home/YOU/lib/lisp/foo.x86f".
      * *modules*

      ("FOO" "ASDF" "LOOP")
      * (require :foo)


Note that the second (REQUIRE :FOO) does nothing [as expected],
since the (PROVIDE :FOO) pushed "FOO" onto *MODULES*.


p.s. If that doesn't work for you [probably because you have
CMUCL installed differently], I'll go into a longer explication
of the #p"modules:" and #p"library:" "search lists", but it ain't
pretty!  :-{  Hint: Type this in and try to grok what it tells you:

  (loop for k being each hash-key in lisp::*search-lists*
	      using (hash-value v)
    when (lisp::search-list-defined v)
      collect (cons k (lisp::search-list-expansions v)))

Rob Warnock			<>
627 26th Avenue			<URL:>
San Mateo, CA 94403		(650)572-2607