[clfswm-devel] clfswm in different environments

Desmond O. Chang dochang at gmail.com
Fri Mar 4 03:20:44 UTC 2011


On Sat, Feb 26, 2011 at 00:02, Philippe Brochard
<pbrochard at common-lisp.net> wrote:
> Desmond O. Chang writes:
>
>> On Tue, Feb 22, 2011 at 20:11, Philippe Brochard
>> <pbrochard at common-lisp.net> wrote:
>>> Maybe you have to clear all .fas and .lib files built with the old
>>> clisp. You may have to do the same with the directory ~/.cache/common-lisp/...
>>> before building clx and clfswm.
>>> In all cases, when something goes wrong with CLX, start with a fresh
>>> source directory and clear your cache.
>>
>> I think I know why.  The fas files compiled with new clx cannot be
>> used with portable clx and vice versa.  Is it a bug?
>>
> Yes that's right. And it's even worse with a mix between ecl and clisp
> because they share the same .fas extension but the file format is
> completely different.
> And I don't think it's a bug. More a lose of feature. It's just that
> asdf can't know when you've changed your implementation. We can't even
> know which clx we are using while clisp is running. So clear your cache
> each time you change your clx.

That means if new-clx not loaded before loading clfswm, the portable
one will be loaded.  Then if the fas files was compiled with new-clx,
clfswm fails to start.  I have to choose the version of clx before I
load clfswm.

I can put (REQUIRE "clx") in .clisprc.lisp but this causes clisp loads
clx every time even I don't need it.  A bad solution.

Finally I decide to configure ASDF.  I put the function
SYSDEF-FIND-CLX in my config.lisp (I symlink .sbclrc, .clisprc.lisp,
etc. to ~/.config/common-lisp/config.lisp).  This function also works
in cmucl.

#+(or clisp cmu)
(progn
  (defun sysdef-find-clx (name)
    (let* ((x #+clisp (asdf::find-symbol*
'#:*module-provider-functions* :custom)
              #+cmu 'ext:*module-provider-functions*)
           (syms (and x (list x)))
           (vals (and x (list (remove 'asdf::module-provide-asdf
(symbol-value x))))))
      (progv syms vals
        (require #+clisp "clx" #+cmu :clx)))
    (asdf::find-system-fallback name "clx"))
  (pushnew 'sysdef-find-clx asdf:*system-definition-search-functions*))

Maybe ASDF could provide a better mechanism for it.  I'll ask the
author on ASDF's maillist.

------

Another question here.  Could you tell me why does the source code
work with either new or portable clx, but the compiled files not?  Is
it repairable?




More information about the clfswm-devel mailing list