Subject: [clisp-list] module with new package bug & work-around (was: def-call-in probl em)

From: "Hoehle, Joerg-Cyril" <[email-masked]>
Date: Wed Apr 3 07:37:32 2002

Hi,

DEF-CALL-IN is not at fault (cf. Peter Wood's bug report). It's the object initialization of modules which has a bug.

A work-around is not to use an unknown package. Unknown means one which is not yet known in the .mem file that is being initialized from.

Thus, 2 possible work-around paths:
1. generate a new .mem, using
(defpackage "TESTCI" (:use "FFI" "LISP"))
(saveinitmem)
then
lisp.exe -M foo.mem
(load "alpha.lisp")

2. use lispinit.mem from the distribution, but don't use unknown packages. Put interface symbols in package USER or wherever.
That's probably why people reported that clg (whatever that is) could still be built while Peter Wood's example failed.

The failure to handle unknown packages is strange since I can remember something about this issue when module functionality was added to CLISP around seven years ago.
I haven't looked at the spvw*.d etc. CLISP code yet.

BTW, if you look at the generated alpha.c file you could try:
#if 0
  { "TESTCI::DECIDER" },
#else
  { "DECIDER" },
#endif

Regards,
	Jorg Hohle.

---

From: Peter Wood <[email-masked]>
Date: Wed Apr 3 11:58:15 2002

Hi,

> DEF-CALL-IN is not at fault (cf. Peter Wood's bug report). It's the object initialization of modules which has a bug.

Why does it only break when the module has a def-call-in?
 
> (defpackage "TESTCI" (:use "FFI" "LISP"))

That works nicely, for now.  Thanks.

> I haven't looked at the spvw*.d etc. CLISP code yet.

I compiled old clisp releases back to 1997 trying to find one that
worked with the example in impnotes.  None did.  
 
Regards,
Peter