[cl-gd-devel] FFI error (I assume)

Leo Zovic leo.zovic at gmail.com
Sun Oct 23 16:23:32 UTC 2011


Not sure whether this is a bug, or I don't have a required library set up.
Whenever I try to do

(with-image-from file (img "/my/image/path.jpg")
    (image-size img))

I get an UNDEFINED-ALIEN-FUNCTION-ERROR

trace follows

Attempt to call an undefined alien function.
   [Condition of type SB-KERNEL::UNDEFINED-ALIEN-FUNCTION-ERROR]

Restarts:
 0: [RETRY] Retry SLIME REPL evaluation request.
 1: [*ABORT] Return to SLIME's top level.
 2: [TERMINATE-THREAD] Terminate this thread (#<THREAD "repl-thread" RUNNING
{10032E9BA1}>)

Backtrace:
  0: (SB-KERNEL::UNDEFINED-ALIEN-FUNCTION-ERROR)
  1: ("foreign function: #x422520")
  2: (GD-IMAGE-CREATE-FROM-JPEG-FILE "/my/image.path.jpg"
#<SB-ALIEN-INTERNALS:ALIEN-VALUE :SAP #X7FFFF37AFFF0 :TYPE (*
(SB-ALIEN:SIGNED 32))>)
  3: (CREATE-IMAGE-FROM-FILE #<unavailable argument> NIL)
  4: ((LAMBDA ()))
  5: (SB-INT:SIMPLE-EVAL-IN-LEXENV ..)
  6: (SWANK::EVAL-REGION "(with-image-from-file (img
\"/my/image.path.jpg\")\n   (image-size img))\n")
  7: ((LAMBDA ()))
  8: (SWANK::TRACK-PACKAGE #<CLOSURE (LAMBDA #) {1004B732C9}>)
  9: (SWANK::CALL-WITH-RETRY-RESTART "Retry SLIME REPL evaluation request."
#<CLOSURE (LAMBDA #) {1004B731E9}>)
 10: (SWANK::CALL-WITH-BUFFER-SYNTAX NIL #<CLOSURE (LAMBDA #) {1004B731B9}>)
 11: (SWANK::REPL-EVAL "(with-image-from-file (img \"/my/image.path.jpg\")\n
(image-size img))\n")
 12: (SB-INT:SIMPLE-EVAL-IN-LEXENV (SWANK:LISTENER-EVAL
"(with-image-from-file (img \"/my/image.path.jpg\")\n   (image-size
img))\n") #<NULL-LEXENV>)
 13: (SWANK::EVAL-FOR-EMACS (SWANK:LISTENER-EVAL "(with-image-from-file (img
\"/my/image.path.jpg\")\n   (image-size img))\n") "CL-GD" 172)
 14: (SWANK::PROCESS-REQUESTS NIL)
 15: ((LAMBDA ()))
 16: ((LAMBDA ()))
 17: (SWANK-BACKEND::CALL-WITH-BREAK-HOOK #<FUNCTION
SWANK:SWANK-DEBUGGER-HOOK> #<CLOSURE (LAMBDA #) {10032F3139}>)
 18: ((FLET SWANK-BACKEND:CALL-WITH-DEBUGGER-HOOK) #<FUNCTION
SWANK:SWANK-DEBUGGER-HOOK> #<CLOSURE (LAMBDA #) {10032F3139}>)
 19: (SWANK::CALL-WITH-BINDINGS ((*STANDARD-OUTPUT* . #) (*STANDARD-INPUT* .
#) (*TRACE-OUTPUT* . #) (*ERROR-OUTPUT* . #) (*DEBUG-IO* . #) (*QUERY-IO* .
#) ...) #<CLOSURE (LAMBDA #) {10032F3159}>)
 20: (SWANK::HANDLE-REQUESTS #<SWANK::CONNECTION {1002E87B91}> NIL)
 21: (SWANK::CALL-WITH-BINDINGS NIL #<CLOSURE (LAMBDA #) {10032F30F9}>)
 22: ((FLET #:WITHOUT-INTERRUPTS-BODY-[BLOCK369]374))
 23: ((FLET SB-THREAD::WITH-MUTEX-THUNK))
 24: ((FLET #:WITHOUT-INTERRUPTS-BODY-[CALL-WITH-MUTEX]300))
 25: (SB-THREAD::CALL-WITH-MUTEX ..)
 26: (SB-THREAD::INITIAL-THREAD-FUNCTION)
 27: ("foreign function: #x422520")
 28: ("foreign function: #x419227")

I've tried it running SBCL 1.0.40 from the Debian repos, as well as 1.0.52
from the official SBCL site. I'm using the copy of cl-gb from the latest
quicklisp release, and I've tried it on both a 32 bit and 64 bit system (the
included stack trace is from the 64-bit SBCL 1.0.40).

Any ideas?
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://mailman.common-lisp.net/pipermail/cl-gd-devel/attachments/20111023/b9007493/attachment.html>


More information about the Cl-gd-devel mailing list