[Cffi-devel] Pre-populate cffi:*foreign-library-directories* by OS

Luís Oliveira luismbo at gmail.com
Sun Apr 6 10:56:13 UTC 2014


On Sat, Apr 5, 2014 at 9:50 PM, Liam Healy <lnp at healy.washington.dc.us> wrote:
> I hadn't thought about the secondary library problem, that is a good point.
> I thought though that we were required to list all libraries needed (even
> dependent ones) explicitly, or is that just for SBCL? Nevertheless, my point
> stands: if this is a problem for my proposed solution, it is a problem as
> things are now, which absolute paths defined in projects that use CFFI.

As long as dlopen's search paths are properly setup, I don't think you
need to load dependent libraries explicitly in any Lisp.

How about providing this search as an interactive restart when loading
via plain dlopen() fails?

BTW, loading libraries via absolute paths is usually wrong, since it
defeats dlopen()'s search capabilities. This is something we should
probably warn about in the User Manual. Created an issue to track
that: <https://bugs.launchpad.net/cffi/+bug/1303302>.

-- 
Luís Oliveira
http://kerno.org/~luis/




More information about the cffi-devel mailing list