1

I'm trying to use quicklisp with SBCL 1.0.55.0.debian on xubuntu. So far, it's been slow going. About half of the time, I can load a library with, e.g., (ql:quickload "cl-ppcre").

But the other half of the time, I'm getting this error instead (while trying to load hunchentoot-cgi, libxml2, and a few others):

The function :NICKNAMES is undefined.
[Condition of type UNDEFINED-FUNCTION]

I've tried all of the restarts except for 2 (accept). This happens both in emacs/SLIME and at the REPL. I don't know exactly where the source file for, say, 'sb-kernel' is, but I'm not sure I'd even know how to fix it if I did. Any suggestions?

(UPDATE: The line (:use :cl) was directly below the (:nicknames :alexandria) line in package.lisp; swapping their places fixed the problem, but I'm curious as to how it got that way in the first place.)

The full trace (for hunchentoot-cgi) is:

The function :NICKNAMES is undefined.
   [Condition of type UNDEFINED-FUNCTION]

Restarts:
 0: [TRY-RECOMPILING] Recompile package and try loading it again
 1: [RETRY] Retry loading FASL for #<CL-SOURCE-FILE "alexandria" "package">.
 2: [ACCEPT] Continue, treating loading FASL for #<CL-SOURCE-FILE "alexandria" "package"> as having been successful.
 3: [ABORT] Give up on "hunchentoot-cgi"
 4: [RETRY] Retry SLIME REPL evaluation request.
 5: [*ABORT] Return to SLIME's top level.
 --more--

Backtrace:
  0: (SB-KERNEL:%COERCE-CALLABLE-TO-FUN :NICKNAMES)
  1: (SB-FASL::FOP-FUNCALL)
  2: (SB-FASL::LOAD-FASL-GROUP ..)
  3: ((FLET SB-THREAD::WITH-RECURSIVE-LOCK-THUNK :IN SB-FASL::LOAD-AS-FASL))
  4: ((FLET #:WITHOUT-INTERRUPTS-BODY-88923 :IN SB-THREAD::CALL-WITH-RECURSIVE-LOCK))
  5: (SB-THREAD::CALL-WITH-RECURSIVE-LOCK ..)
  6: (SB-FASL::LOAD-AS-FASL ..)
  7: ((FLET SB-FASL::LOAD-STREAM :IN LOAD) ..)
  8: (LOAD ..)
  9: (SB-IMPL::%MAP-FOR-EFFECT-ARITY-1 ..)
 10: ((SB-PCL::FAST-METHOD ASDF:PERFORM (ASDF:LOAD-OP ASDF:CL-SOURCE-FILE)) ..)
 11: ((SB-PCL::EMF ASDF:PERFORM) #<unavailable argument> #<unavailable argument> #<ASDF:LOAD-OP (:VERBOSE NIL) {10ABFD01}> #<ASDF:CL-SOURCE-FILE "alexandria" "package">)
 12: ((SB-PCL::FAST-METHOD ASDF::PERFORM-WITH-RESTARTS (ASDF:LOAD-OP ASDF:CL-SOURCE-FILE)) ..)
 13: ((SB-PCL::FAST-METHOD ASDF::PERFORM-WITH-RESTARTS :AROUND (T T)) ..)
 14: ((LAMBDA () :IN ASDF::PERFORM-PLAN))
 15: ((FLET SB-THREAD::WITH-RECURSIVE-LOCK-THUNK :IN SB-C::%WITH-COMPILATION-UNIT))
 16: ((FLET #:WITHOUT-INTERRUPTS-BODY-88923 :IN SB-THREAD::CALL-WITH-RECURSIVE-LOCK))
 17: (SB-THREAD::CALL-WITH-RECURSIVE-LOCK ..)
 18: ((FLET SB-C::WITH-IT :IN SB-C::%WITH-COMPILATION-UNIT))
 19: ((SB-PCL::FAST-METHOD ASDF::PERFORM-PLAN (LIST)) ..)
 20: ((LAMBDA () :IN ASDF:OPERATE))
 21: (ASDF::CALL-WITH-SYSTEM-DEFINITIONS #<CLOSURE (LAMBDA # :IN ASDF:OPERATE) {108EF07D}>)
 22: ((SB-PCL::FAST-METHOD ASDF:OPERATE (T T)) #<unused argument> #<unused argument> ASDF:LOAD-OP "hunchentoot-cgi" :VERBOSE NIL)
 23: ((SB-PCL::EMF ASDF:OPERATE) #<unused argument> #<unused argument> ASDF:LOAD-OP "hunchentoot-cgi" :VERBOSE NIL)
 24: (QUICKLISP-CLIENT::CALL-WITH-MACROEXPAND-PROGRESS #<CLOSURE (LAMBDA # :IN QUICKLISP-CLIENT::APPLY-LOAD-STRATEGY) {108EEE4D}>)
 25: (QUICKLISP-CLIENT::AUTOLOAD-SYSTEM-AND-DEPENDENCIES "hunchentoot-cgi" :PROMPT NIL)
 26: ((SB-PCL::FAST-METHOD QL-IMPL-UTIL::%CALL-WITH-QUIET-COMPILATION (T T)) ..)
 27: ((SB-PCL::FAST-METHOD QL-IMPL-UTIL::%CALL-WITH-QUIET-COMPILATION :AROUND (QL-IMPL:SBCL T)) ..)
 28: ((SB-PCL::FAST-METHOD QUICKLISP-CLIENT:QUICKLOAD (T)) #<unused argument> #<unused argument> #<unavailable argument> :PROMPT NIL :VERBOSE NIL)
 29: (QL-DIST::CALL-WITH-CONSISTENT-DISTS #<CLOSURE (LAMBDA # :IN QUICKLISP-CLIENT:QUICKLOAD) {108CD455}>)
 30: (SB-INT:SIMPLE-EVAL-IN-LEXENV (QUICKLISP-CLIENT:QUICKLOAD "hunchentoot-cgi") #<NULL-LEXENV>)
 31: (EVAL (QUICKLISP-CLIENT:QUICKLOAD "hunchentoot-cgi"))
 32: (SWANK::EVAL-REGION "(ql:quickload \"hunchentoot-cgi\")\n")
 33: ((LAMBDA () :IN SWANK::REPL-EVAL))
 34: (SWANK::TRACK-PACKAGE #<CLOSURE (LAMBDA # :IN SWANK::REPL-EVAL) {108CD12D}>)
 35: (SWANK::CALL-WITH-RETRY-RESTART "Retry SLIME REPL evaluation request." #<CLOSURE (LAMBDA # :IN SWANK::REPL-EVAL) {108CD0BD}>)
 36: (SWANK::CALL-WITH-BUFFER-SYNTAX NIL #<CLOSURE (LAMBDA # :IN SWANK::REPL-EVAL) {108CD0A5}>)
 37: (SWANK::REPL-EVAL "(ql:quickload \"hunchentoot-cgi\")\n")
 38: (SB-INT:SIMPLE-EVAL-IN-LEXENV (SWANK:LISTENER-EVAL "(ql:quickload \"hunchentoot-cgi\")\n") #<NULL-LEXENV>)
 39: (EVAL (SWANK:LISTENER-EVAL "(ql:quickload \"hunchentoot-cgi\")\n"))
 40: (SWANK:EVAL-FOR-EMACS (SWANK:LISTENER-EVAL "(ql:quickload \"hunchentoot-cgi\")\n") "COMMON-LISP-USER" 144)
 41: (SWANK::PROCESS-REQUESTS NIL)
 42: ((LAMBDA () :IN SWANK::HANDLE-REQUESTS))
 43: ((LAMBDA () :IN SWANK::HANDLE-REQUESTS))
 44: (SWANK-BACKEND::CALL-WITH-BREAK-HOOK #<FUNCTION SWANK:SWANK-DEBUGGER-HOOK> #<CLOSURE (LAMBDA # :IN SWANK::HANDLE-REQUESTS) {D2420C5}>)
 45: ((FLET SWANK-BACKEND:CALL-WITH-DEBUGGER-HOOK :IN "/home/amperry/.emacs.d/slime-2.7/swank-sbcl.lisp") #<FUNCTION SWANK:SWANK-DEBUGGER-HOOK> #<CLOSURE (LAMBDA # :IN SWANK::HANDLE-REQUESTS) {D2420C5}>)
 46: (SWANK::CALL-WITH-BINDINGS ..)
 47: (SWANK::HANDLE-REQUESTS #<SWANK::MULTITHREADED-CONNECTION {CBAE9B1}> NIL)
 48: ((FLET #:WITHOUT-INTERRUPTS-BODY-223578 :IN SB-THREAD:MAKE-THREAD))
 49: ((FLET SB-THREAD::WITH-MUTEX-THUNK :IN SB-THREAD:MAKE-THREAD))
 50: ((FLET #:WITHOUT-INTERRUPTS-BODY-88894 :IN SB-THREAD::CALL-WITH-MUTEX))
 51: (SB-THREAD::CALL-WITH-MUTEX ..)
 52: (SB-THREAD::INITIAL-THREAD-FUNCTION)
 53: ("foreign function: call_into_lisp")
 54: ("foreign function: funcall0")
 55: ("foreign function: new_thread_trampoline")
 56: ("foreign function: #xB7FA6D4C")
4
  • I hesitate to chime in since I'm new to Common Lisp, but it looks like you're having a problem with the Alexandria package, which is probably a dependency. Is it installed and/or can you reinstall it? Commented Jun 7, 2014 at 12:58
  • 2
    The error comes from the package.lisp file of alexandria. That file begins with (defpackage :alexandria.0.dev (:nicknames :alexandria) ...; my guess is that the first line is either missing or corrupted, leading the compiler to interpret the second line as a function call to :nicknames. Check that file; it's located in the path ~/quicklisp/dists/quicklisp/software/alexandria-20130128-git/ or something like that. Commented Jun 7, 2014 at 16:54
  • 4
    That kind of error happens when (defpackage foo (:nicknames bar)) is evaluated when the active package does not use CL. In that case it reads as SOMEPACKAGE::DEFPACKAGE, is treated as a function, and it tries to evaluate the arguments per a normal function call. Commented Jun 7, 2014 at 20:13
  • 2
    SBCL maintainers thought it was a good idea to introduce an incompatibility with common practice (though not the standard): packages by default don't inherit from the CL package. Commented Jun 8, 2014 at 9:22

1 Answer 1

1

As Xach pointed out, the active package did not (:use :cl) by the time (:nicknames :alexandria) was called. Swapping the order of those two lines fixed the issue, although I have no idea why they were in that sequence to begin with.

Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.