From leo.zovic at gmail.com Sun Oct 23 16:23:32 2011 From: leo.zovic at gmail.com (Leo Zovic) Date: Sun, 23 Oct 2011 12:23:32 -0400 Subject: [cl-gd-devel] FFI error (I assume) Message-ID: 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 (#) Backtrace: 0: (SB-KERNEL::UNDEFINED-ALIEN-FUNCTION-ERROR) 1: ("foreign function: #x422520") 2: (GD-IMAGE-CREATE-FROM-JPEG-FILE "/my/image.path.jpg" #) 3: (CREATE-IMAGE-FROM-FILE # 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 #) 9: (SWANK::CALL-WITH-RETRY-RESTART "Retry SLIME REPL evaluation request." #) 10: (SWANK::CALL-WITH-BUFFER-SYNTAX NIL #) 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") #) 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 # #) 18: ((FLET SWANK-BACKEND:CALL-WITH-DEBUGGER-HOOK) # #) 19: (SWANK::CALL-WITH-BINDINGS ((*STANDARD-OUTPUT* . #) (*STANDARD-INPUT* . #) (*TRACE-OUTPUT* . #) (*ERROR-OUTPUT* . #) (*DEBUG-IO* . #) (*QUERY-IO* . #) ...) #) 20: (SWANK::HANDLE-REQUESTS # NIL) 21: (SWANK::CALL-WITH-BINDINGS NIL #) 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: From jeffrey at jkcunningham.com Sun Oct 23 16:23:47 2011 From: jeffrey at jkcunningham.com (Jeffrey Cunningham) Date: Sun, 23 Oct 2011 09:23:47 -0700 Subject: [cl-gd-devel] FFI error (I assume) In-Reply-To: References: Message-ID: Have you compiled the glue library? If not, go inside the cl-gd source directory and run make. It should produce cl-gd-glue.so. If it complains, look close - you probably don't have all the dependencies built. You need the gd library 2.x and it has requirements of its own. Jeff On Sun, 23 Oct 2011 09:23:32 -0700, Leo Zovic wrote: > 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 (# 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" > ##X7FFFF37AFFF0 :TYPE (* > (SB-ALIEN:SIGNED 32))>) > 3: (CREATE-IMAGE-FROM-FILE # 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 #) > 9: (SWANK::CALL-WITH-RETRY-RESTART "Retry SLIME REPL evaluation > request." #{1004B731E9}>) > 10: (SWANK::CALL-WITH-BUFFER-SYNTAX NIL # {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") #) > 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 # SWANK:SWANK-DEBUGGER-HOOK> #(LAMBDA #) {10032F3139}>) > 18: ((FLET SWANK-BACKEND:CALL-WITH-DEBUGGER-HOOK) # SWANK:SWANK-DEBUGGER-HOOK> >#) > 19: (SWANK::CALL-WITH-BINDINGS ((*STANDARD-OUTPUT* . #) > (*STANDARD-INPUT* . #) (*TRACE-OUTPUT* . #) >(*ERROR-OUTPUT* . #) > (*DEBUG-IO* . #) (*QUERY-IO* . #) ...) # {10032F3159}>) > 20: (SWANK::HANDLE-REQUESTS # NIL) > 21: (SWANK::CALL-WITH-BINDINGS NIL #) > 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: