[cl-prevalence-devel] problem with sbcl and cmucl

Nicolas Lamirault lam at tuxfamily.org
Tue Aug 9 09:50:55 UTC 2005


hi,
i  try to  load cl-prevalence  under sbcl  and cmucl  but i  have some
problems

i put s-xml and  cl-prevalence in asdf:*central-registry*, and load-op
cl-prevalence
the output error :


; compilation finished in 0:00:00
; compiling                                                        file
; "/home/nicolas/src/cl-prevalence/src/managed-prevalence.lisp"
; (written 14 FEB 2005 09:20:02 PM):
; compiling (IN-PACKAGE :CL-PREVALENCE)
; compiling (DEFMACRO EXECUTE-TRANSACTION ...)
; compiling (DEFCLASS OBJECT-WITH-ID ...)
; compiling (DEFGENERIC GET-ID ...)
; compiling (DEFUN GET-OBJECTS-ROOT-NAME ...)
; compiling (DEFUN GET-OBJECTS-SLOT-INDEX-NAME ...)
; compiling (DEFGENERIC FIND-ALL-OBJECTS ...)
; compiling (DEFMETHOD FIND-ALL-OBJECTS ...)
; compiling (DEFGENERIC FIND-OBJECT-WITH-ID ...)
; compiling (DEFMETHOD FIND-OBJECT-WITH-ID ...)
; compiling (DEFGENERIC FIND-OBJECT-WITH-SLOT ...);
; caught ERROR:
;   (during macroexpansion of (DEFGENERIC FIND-OBJECT-WITH-SLOT ...))
;   invalid (TEST #'EQUALP)
;   in the generic function lambda list (SYSTEM CLASS
;                                               SLOT
;                                               VALUE
;                                               &OPTIONAL
;                                               (TEST #'EQUALP))
;   See also:
;     The ANSI Standard, Section 3.4.2

; compiling (DEFMETHOD FIND-OBJECT-WITH-SLOT ...)
; compiling (DEFUN TX-CREATE-OBJECTS-SLOT-INDEX ...)
; compiling (DEFUN TX-REMOVE-OBJECTS-SLOT-INDEX ...)
; compiling (DEFUN ADD-OBJECT-TO-SLOT-INDEX ...)
; compiling (DEFUN REMOVE-OBJECT-FROM-SLOT-INDEX ...)
; compiling (DEFUN INDEX-ON ...)
; compiling (DEFUN DROP-INDEX-ON ...)
; compiling (DEFUN SLOT-VALUE-CHANGED-P ...)
; compiling (DEFUN TX-CREATE-OBJECT ...)
; compiling (DEFUN TX-DELETE-OBJECT ...)
; compiling (DEFUN TX-CHANGE-OBJECT-SLOTS ...)
; compiling (DEFUN TX-CREATE-ID-COUNTER ...)
; compiling (DEFMETHOD NEXT-ID ...)
; compiling (DEFGENERIC GET-PREFERENCE ...)
; compiling (DEFMETHOD GET-PREFERENCE ...)
; compiling (DEFUN TX-SET-PREFERENCE ...)
; compiling (DEFGENERIC ALL-PREFERENCES-KEYS ...)
; compiling (DEFMETHOD ALL-PREFERENCES-KEYS ...)

; /home/nicolas/src/cl-prevalence/src/managed-prevalence.fasl written
; compilation finished in 0:00:00
WARNING:
   COMPILE-FILE warned while performing #<COMPILE-OP NIL {9C2FCB9}> on
   #<CL-SOURCE-FILE "managed-prevalence" {9C30119}>.

debugger invoked on a ASDF:COMPILE-FAILED in thread 13489:
  erred while invoking #<COMPILE-OP NIL {9C2FCB9}> on
  #<CL-SOURCE-FILE "managed-prevalence" {9C30119}>

Type HELP for debugger help, or (SB-EXT:QUIT) to exit from SBCL.

restarts (invokable by number or by possibly-abbreviated name):
  0: [RETRY ] Retry performing #<ASDF:COMPILE-OP NIL {9C2FCB9}> on
              #<ASDF:CL-SOURCE-FILE "managed-prevalence" {9C30119}>.
  1: [ACCEPT] Continue, treating #<ASDF:COMPILE-OP NIL {9C2FCB9}> on
              #<ASDF:CL-SOURCE-FILE "managed-prevalence" {9C30119}> as
  having
              been successful.
  2: [ABORT ] Exit debugger, returning to top level.

((SB-PCL::FAST-METHOD           ASDF:PERFORM          (ASDF:COMPILE-OP
ASDF:CL-SOURCE-FILE))
 #<unavailable argument>
 #<unavailable argument>
 #<ASDF:COMPILE-OP NIL {9C2FCB9}>
 #<ASDF:CL-SOURCE-FILE "managed-prevalence" {9C30119}>)
0] 



so problems comes from this function :

(defgeneric find-object-with-slot (system class slot value &optional test) 
  (:documentation "Find and return the  object in system of class with
  slot equal to value, null if not found")) 
                                                                                                                                                              
(defmethod  find-object-with-slot  ((system  prevalence-system)  class
slot value &optional (test #'equalp)) 
  "Find and  return the object in  system of class with  slot equal to
  value, null if not found" 
  (let* ((index-name (get-objects-slot-index-name class slot)) 
         (index (get-root-object system index-name))) 
    (if index 
        (find-object-with-id system class (gethash value index)) 
      (find value (find-all-objects system class) 
            :key  #'(lambda (object)  (slot-value object  slot)) :test
            test)))) 


by changing the defgeneric method in :

(defgeneric find-object-with-slot (system class slot value &optional test)
  (:documentation "Find and return the object in system of class with 
  slot equal to value, null if not found"))

problems is solved

after this there is no problems when i load-op cl-prevalence in SLIME
But in a unix shell :

; /home/nicolas/src/cl-prevalence/src/debug-prevalence.fasl written
; compilation finished in 0:00:00
; compiling                                                        file
; "/home/nicolas/src/cl-prevalence/src/managed-prevalence.lisp"
; (written 09 AUG 2005 11:10:13 AM):
; compiling (IN-PACKAGE :CL-PREVALENCE)
; compiling (DEFMACRO EXECUTE-TRANSACTION ...)
; compiling (DEFCLASS OBJECT-WITH-ID ...)
; compiling (DEFGENERIC GET-ID ...)
; compiling (DEFUN GET-OBJECTS-ROOT-NAME ...)
; compiling (DEFUN GET-OBJECTS-SLOT-INDEX-NAME ...)
; compiling (DEFGENERIC FIND-ALL-OBJECTS ...)
; compiling (DEFMETHOD FIND-ALL-OBJECTS ...)
; compiling (DEFGENERIC FIND-OBJECT-WITH-ID ...)
; compiling (DEFMETHOD FIND-OBJECT-WITH-ID ...)
; compiling (DEFGENERIC FIND-OBJECT-WITH-SLOT ...)
; compiling (DEFMETHOD FIND-OBJECT-WITH-SLOT ...)
; compiling (DEFUN TX-CREATE-OBJECTS-SLOT-INDEX ...)
; compiling (DEFUN TX-REMOVE-OBJECTS-SLOT-INDEX ...)
; compiling (DEFUN ADD-OBJECT-TO-SLOT-INDEX ...)
; compiling (DEFUN REMOVE-OBJECT-FROM-SLOT-INDEX ...)
; compiling (DEFUN INDEX-ON ...)
; compiling (DEFUN DROP-INDEX-ON ...)
; compiling (DEFUN SLOT-VALUE-CHANGED-P ...)
; compiling (DEFUN TX-CREATE-OBJECT ...)
; compiling (DEFUN TX-DELETE-OBJECT ...)
; compiling (DEFUN TX-CHANGE-OBJECT-SLOTS ...)
; compiling (DEFUN TX-CREATE-ID-COUNTER ...)
; compiling (DEFMETHOD NEXT-ID ...)
; compiling (DEFGENERIC GET-PREFERENCE ...)
; compiling (DEFMETHOD GET-PREFERENCE ...)
; compiling (DEFUN TX-SET-PREFERENCE ...)
; compiling (DEFGENERIC ALL-PREFERENCES-KEYS ...)
; compiling (DEFMETHOD ALL-PREFERENCES-KEYS ...)

; /home/nicolas/src/cl-prevalence/src/managed-prevalence.fasl written
; compilation finished in 0:00:01
; compiling   file  "/home/nicolas/src/cl-prevalence/src/sysdeps.lisp"
; (written 28 JUN 2004 01:54:49 PM):
; compiling (IN-PACKAGE  :CL-PREVALENCE)compilation aborted because of
; fatal error:
                                         READ failure in COMPILE-FILE:
                                           READER-ERROR  at  924 (line
; 26,     column    69)     on     #<SB-SYS:FD-STREAM    for     "file
; \"/home/nicolas/src/cl-prevalence/src/sysdeps.lisp\"" {95B6A41}>:
package "SB-BSD-SOCKETS" not found

; /home/nicolas/src/cl-prevalence/src/sysdeps.fasl written
; compilation finished in 0:00:00
WARNING:
   COMPILE-FILE warned while performing #<COMPILE-OP NIL {9C2FD39}> on
   #<CL-SOURCE-FILE "sysdeps" {918FDB9}>.

debugger invoked on a ASDF:COMPILE-FAILED in thread 17853:
  erred while invoking #<COMPILE-OP NIL {9C2FD39}> on
  #<CL-SOURCE-FILE "sysdeps" {918FDB9}>

Type HELP for debugger help, or (SB-EXT:QUIT) to exit from SBCL.

restarts (invokable by number or by possibly-abbreviated name):
  0: [RETRY ] Retry performing #<ASDF:COMPILE-OP NIL {9C2FD39}> on
              #<ASDF:CL-SOURCE-FILE "sysdeps" {918FDB9}>.
  1: [ACCEPT] Continue, treating #<ASDF:COMPILE-OP NIL {9C2FD39}> on
              #<ASDF:CL-SOURCE-FILE  "sysdeps"  {918FDB9}>  as  having
  been
              successful.
  2: [ABORT ] Exit debugger, returning to top level.

((SB-PCL::FAST-METHOD           ASDF:PERFORM          (ASDF:COMPILE-OP
ASDF:CL-SOURCE-FILE))
 #<unavailable argument>
 #<unavailable argument>
 #<ASDF:COMPILE-OP NIL {9C2FD39}>
 #<ASDF:CL-SOURCE-FILE "sysdeps" {918FDB9}>)
0] 


add  dependencies  about  sb-bsd-sockets  in  asd  file  resolved  the
problems :

:depends-on (:sb-bsd-sockets :s-xml))


i have this problem only under SBCL
so perhaps, add #+sbcl in ASD file ... i don't know ...




-- 
Nicolas Lamirault



More information about the Cl-prevalence-devel mailing list