jmadams@... (John M. Adams) writes:
> Dear Friends,
> I recently installed Linux on my ps2. I thought I would see if I
> could get sbcl going there. I built clisp and did make.sh 'clisp -c'.
Ah. I'm afraid that this is probably unlikely to work, unless you
have an extremely finely-tuned old CVS version of clisp.
In recent history (i.e. since I first got sbcl to build under clisp
about 8 months ago) the buildability from clisp has twice broken.
Once was because sbcl started using advanced DEFSTRUCT features
(:include and :conc-name combined) which clisp did not implement
correctly; a patch for this was included in clisp at some point in
September. The second time is more persistent: the implementation of
pretty-printing in clisp used to be flaky, but worked enough for
bootstrapping purposes; that is, it printed compiler warnings and the
like during cross-compilation, not perfectly formatted, but good
enough. With the release of clisp-2.32 (and a little while before it)
the format engine no longer lets these dubiously-implemented
pretty-print directives through, but signals an error immediately.
> I had to delete LISP_FEATURE_X86 from config.h.
This is the first signal that something has gone wrong.
src/runtime/genesis/config.h is a generated file, made at the end of
the first compilation stage ("make-host-1.sh"). If, however, the
host compiler exits due to a Lisp error before getting to this stage,
you will have whatever previous version of config.h you (or maybe the
source distributor) had. We detect this if the host lisp is
well-behaved enough to exit with a Unix error code in this
circumstance, but sadly clisp is not one of these.
> Then, make.sh 'clisp -c' compiles a few files and then gives:
> mips-arch.c:204: `trap_AfterBreakpoint' undeclared (first use in this function)
> I couldn't find any definition for trap_AfterBreakpoint.
So after the first Lisp compilation stage, make-host-1, runs
make-target-1.sh, which builds the C runtime, using some constant
definitions that have been written out by the previous stage. The
definition of trap_AfterBreakpoint is somewhat circuitous, but comes
(defenum (:suffix -trap :start 8)
so I'd expect trap_AfterBreakpoint to have a value of 14. If the
first stage of the build completes correctly, this should be written
out (along with #define LISP_FEATURE_MIPS :-) to
> I'd like to find out how hard it would be to get sbcl going on the
I don't think it's likely to be very hard -- it shouldn't be
noticeably different from an "ordinary" Mips machine running Linux.
What I suggest you do is follow the cross-compilation instructions on
<http://sbcl-internals.cliki.net/Build>, which are probably still
mostly current. The major thing to be wary of is being sure that the
contents of local-target-features.lisp-expr is correct on both
machines, the one with the Lisp host compiler _and_ the one with the C
compiler (the eventual target); make-config.sh needs to be run on both
machines (one with SBCL_ARCH=mips as a prefix), but also the target's
local-target-features needs to be copied across. This is of
particular importance in this case, because we run a program in the
configuration stage to determine the endianness of the mips machine.
The instructions as given won't build contrib modules, but if you get
that far it's not hard to do that.
I'm sure I'm forgetting something, but since I've forgotten it I can't
work out what it is. Of course, if you hit another snag, do let us
Thanks for your interest!
http://www-jcsu.jesus.cam.ac.uk/~csr21/ +44 1223 510 299/+44 7729 383 757
(set-pprint-dispatch 'number (lambda (s o) (declare (special b)) (format s b)))
(defvar b "~&Just another Lisp hacker~%") (pprint #36rJesusCollegeCambridge)