From: Michael Goffioul <michael.goffioul@im...> - 2004-05-26 08:37:19
I defined a set of foreign functions located in a shared library. The problem
is that this library is not located in a standard place. So I looked at the
code and found that (under UNIX) ffi:foreign-library uses "dlopen" such that I
should be able to solve the problem by changing LD_LIBRARY_PATH variable.
So I used somthing like:
(string-concat "./lib:" (ext::getenv "LD_LIBRARY_PATH")))
(ffi:def-call-out myfun (:library "libmyfun.so") ...)
which change the environment variable before defining my foreign function.
However, it doesn't change anything and foreign-library still complains it
cannot find my library. If I change the variable before starting clisp (and
remove the "setenv" LISP call), it works fine. Is this normal?
Note: I'm using clisp-2.33 (RPM compiled for RH9, used under Mandrake-9.2)
From: Michael Goffioul <michael.goffioul@im...> - 2004-05-26 09:04:34
Michael Goffioul <michael.goffioul <at> imec.be> writes:
> cannot find my library. If I change the variable before starting clisp (and
> remove the "setenv" LISP call), it works fine. Is this normal?
Forget it. It looks like this is how LINUX works. I tried something
similar in plain C, and got the same error.