lispcommon-lispsbclquicklisp

Why does Quicklisp fail to load log4cl on MacOS


On MacOS: When I try to load log4cl I get a compile error:

CL-USER> (ql:quickload "log4cl")
To load "log4cl":
  Load 1 ASDF system:
    log4cl
; Loading "log4cl"
.
; 
; caught ERROR:
;   READ error during COMPILE-FILE:
;   
;     Lock on package SB-C violated when interning LAMBDA-PARENT while in package
;     LOG4CL-IMPL.
;   See also:
;     The SBCL Manual, Node "Package Locks"
;   
;     (in form starting at line: 99, column: 0, position: 3779)

 COMPILE-FILE-ERROR while
compiling #<CL-SOURCE-FILE "log4cl" "src" "naming-sbcl">
   [Condition of type UIOP/LISP-BUILD:COMPILE-FILE-ERROR]

On Ubuntu: I do not see that error and log4cl loads without problem. What could be the cause of this?


Solution

  • Like said by coredump :

    "Log4cl is trying to access an implementation symbol named sb-c::lambda-parent but this symbol probably does not exist on your version of sbcl on MacOS, and as such Lisp is trying to add this symbol to the SB-C package; but since the package is locked, this is forbidden."

    And now I add my little two cents :

    LAMBDA-PARENT has been removed from SBCL 3 years ago, with the following message :

    "Remove LAMBDA-PARENT.
    
    LAMBDA-LEXENV already has it."
    

    Now the question is : what is the version of your log4cl library, and where does it come from ?

    Mine is coming from Quicklisp and it works fine with version 2.3.2 of SBCL, it is http://beta.quicklisp.org/archive/log4cl/2021-12-09/log4cl-20211209-git.tgz

    Maybe you should update Quicklisp :

    To get updated software, use:

    (ql:update-dist "quicklisp")
    

    Software updates are usually available about once per month.

    To update the Quicklisp client, use:

    (ql:update-client)