Re: sbcl 0.9.15.13 compile issues

Espen S Johnsen <[email protected]> 08 Aug 2006 09:43:31 +0200
Newsgroups gmane.lisp.clg.devel
Message-ID <[email protected]>
Yves Vandriessche <[email protected]> writes:

> Updating my sbcl caused this compile-error:
> 
> ; file: /home/yvdriess/dev/clg/glib/gtype.lisp
> ; in: DEFBINDING %TYPE-REGISTER-STATIC
> ;     (GFFI:DEFBINDING GLIB::%TYPE-REGISTER-STATIC NIL GLIB:TYPE-NUMBER
> ;                    (GLIB::PARENT-TYPE GLIB:TYPE-NUMBER) (GLIB::NAME 
> STRING)
> ;                    (GLIB::INFO GLIB::TYPE-INFO) (0 GFFI:UNSIGNED-INT))
> ;
> ; caught ERROR:
> ;   (during macroexpansion of (DEFBINDING %TYPE-REGISTER-STATIC ...))
> ;   The slot SB-PCL::%CLASS-PRECEDENCE-LIST is unbound in the object 
> #<STRUCT-CLASS TYPE-INFO>.
> 
> 
> It seems to be an MoP error, quoting Xof:
> <Xof> Beef_: at a guess, your trusty lib uses the MOP introspection, and 
> doesn't call finalize-inheritance
> 
> Earlier sbcl version compiled clg without problems, so I am a bit at a loss.

Hi

This entry from the SBCL 0.9.15 news explains why it fails:

o minor incompatible change: SB-MOP:FINALIZE-INHERITANCE is now called
  later in a class's lifetime, possibly as late as when the first instance
  of the class is created. Previously, SB-MOP:FINALIZE-INHERITANCE was
  called by the system as soon as a class became finalizeable.

As this is the same behavior as CLisp has, I believe the following patch
should fix the problem (but I haven't had time to test it):

--- gffi/interface.lisp.~1.2.~  2006-04-26 21:19:14.000000000 +0200
+++ gffi/interface.lisp 2006-08-07 22:28:34.000000000 +0200
@@ -423,7 +423,7 @@
             (lookup-method (type-spec)
               (if (and (symbolp type-spec) (find-class type-spec nil))
                   (let ((class (find-class type-spec)))
-                    #+clisp
+                    #?(or (sbcl>= 0 9 15) (featurep :clisp))
                     (unless (class-finalized-p class)
                       (finalize-inheritance class))
                     (search-method-in-cpl-order


-- 
Espen

-------------------------------------------------------------------------
Using Tomcat but need to do more? Need to support web services, security?
Get stuff done quickly with pre-integrated technology to make your job easier
Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642