On Sun, Feb 03, 2002 at 05:29:38PM -0500, Dave MacDonald wrote:
> Here are two patches to bring SBCL closer to being compilable by CLISP (from CVS).
[snip snip snip]
Thank you, I've merged them in sbcl-0.7.1.17.
> The second patch contains a bug somewhere because with these changes
> SBCL compilation fails as soon as it hits warm init, with internal
> error #23.
> * %DEF-REFFER, %DEF-SETTER, and %DEF-ALLOC use setf-accessors for
> structure FUN-INFO before that structure is defined, and CLISP
> complains about (SETF FUN-INFO-IR2-CONVERT) being undefined at some
> point later. Rather than change the build order, I used (SETF
> SLOT-VALUE) here; not sure if this is portable.
> The last time I tried (in August) to figure out what was wrong, real
> life intervened before any patches got to the list. So, I'm attaching
> my broken patch in the hope that someone can give suggestions.
The internal error is just "undefined function" for SLOT-VALUE, too
early for friendly error-reporting mechanisms to be set up. It happens
because SLOT-VALUE is defined in the PCL code, which isn't compiled
and loaded until fairly late in warm init. Also, you're right that the
use of SLOT-VALUE on structures isn't portable anyway. So I backed out
the SLOT-VALUE stuff in the patch, and changed the build order
Undefined things at cold init are a common problem when you try to
change things (like build order or implementation details). You can
debug them using gdb. I just wrote up a recipe for this:
<http://ww.telent.net/sbcl-internals/gdb for internal errors>
Or if you prefer getting some slightly unreliable automated help
unravelling SBCL's internal data structures, you can try ldb, perhaps
starting with the hints about it at
> An unsolved problem is the fact that src/code/assem.lisp uses
> SYMBOL-MACROLET to bind special variable **CURRENT-SEGMENT**, which is
> not allowed according to the CLHS (see "Exceptional Situations"
> section for SYMBOL-MACROLET), and CLISP does not allow it.
Bummer. I was hoping I'd seen the last of that code from Hell after I
finished bootstrapping SBCL. But no...
William Harold Newman <william.newman@...>
"Gimli stared with wide eyes. 'Durin's Bane!' he cried, and letting
his axe fall he covered his face." -- _The Fellowship of the Ring_
PGP key fingerprint 85 CE 1C BA 79 8D 51 8C B9 25 FB EE E0 C3 E5 7C