[cffi-devel] trouble loading libraries on debian
James Bielman
jamesjb at jamesjb.com
Mon Apr 24 23:49:46 UTC 2006
hbabcockos1 at mac.com writes:
> I'm having trouble loading libraries using CFFI 0.9.0 on debian. Example:
>
> The test script:
>
> (defpackage #:test
> (:use #:common-lisp
> #:cffi))
>
> (in-package #:test)
>
> (defun load-library ()
> (define-foreign-library libc
> (t (:default "libc")))
> (use-foreign-library libc)
> (format t "libc loaded~%"))
>
> (load-library)
>
> Gives:
> Unable to load foreign library: libc.so
> [Condition of type LOAD-FOREIGN-LIBRARY-ERROR]
Taking a guess here, but I'd bet that your /usr/lib/libc.so is
actually a linker script. I'm not sure what dlopen is defined to do
in this case, but you are probably better off loading "libc.so.6"
instead (although in practice I doubt you would ever need to really do
this since the Lisp implementation is likely to have already loaded
libc to begin with..)
James
More information about the cffi-devel
mailing list