Hello,
This is a follow up on a question I posted several months ago, when I was unable to link to the GNU Scientific Library from clisp (while others could).
I did a bit more digging, and I narrowed down the problem, but I am still looking for a solution.
I am running clisp built on cygwin on windows. I mainly run clisp through slime on top of emacs_nt (emacs built for windows).
I can link to the library, cyggsl from clisp, meaning, I start an x-terminal, start clisp and execute:
(cffi:load-foreign-library "/bin/cyggsl-0.dll")
But if I do that from slime, then the load fails: Unable to load foreign library (NIL). FFI:OPEN-FOREIGN-LIBRARY: Cannot open library "/bin/cyggsl-0.dll": "No such file or directory" [Condition of type LOAD-FOREIGN-LIBRARY-ERROR]
The problem seems to lie with slime and emacs_nt. I had a similar problem already, because these two would not export the DISPLAY variable needed by some other applications. The problem is not universal, because I can load other libraries via slime: cyggslcblas-0.dll for example.
I could not figure out what is it that the windows version of emacs+slime is causing cffi not no see the library. Anyone else has a clue?
Thanks, (and happy holidays),
Mirko
"Mirko Vukovic" mirko.vukovic@gmail.com writes:
But if I do that from slime, then the load fails: Unable to load foreign library (NIL). FFI:OPEN-FOREIGN-LIBRARY: Cannot open library "/bin/cyggsl-0.dll": "No such file or directory" [Condition of type LOAD-FOREIGN-LIBRARY-ERROR]
Not sure how to start debugging that one. What does (probe-file "/bin/cyggsl-0.dll") return in both situations? Or, how about (probe-file "c:/cygwin/bin/cyggsl-0.dll") when you're running CLISP within Emacs?
On Fri, Dec 26, 2008 at 8:51 PM, Luis Oliveira luismbo@gmail.com wrote:
"Mirko Vukovic" mirko.vukovic@gmail.com writes:
But if I do that from slime, then the load fails: Unable to load foreign library (NIL). FFI:OPEN-FOREIGN-LIBRARY: Cannot open library "/bin/cyggsl-0.dll": "No such file or directory" [Condition of type LOAD-FOREIGN-LIBRARY-ERROR]
Not sure how to start debugging that one. What does (probe-file "/bin/cyggsl-0.dll") return in both situations? Or, how about (probe-file "c:/cygwin/bin/cyggsl-0.dll") when you're running CLISP within Emacs?
-- Luís Oliveira http://student.dei.uc.pt/~lmoliv/
cffi-devel mailing list cffi-devel@common-lisp.net http://common-lisp.net/cgi-bin/mailman/listinfo/cffi-devel
Luis,
In my reply to Daniel I noted that I `fixed' the problem, by loading another library before cyggsl: /lib/lapack/cygblas.dll, since cyggsl depends on cygblas.
The curious thing is that when I do this from within clisp, I do not need to preload the /lib/lapack/cygblas.dll. Only when I am running clisp from within a windows' version of emacs & slime do I need to do that.
In the latter setup, I am accessing cygwin's clisp from the windows side. Usually the problem with this is that some environment variable is not properly set (PATH, DISPLAY): Emacs inherits the windows' environment variables, and passes them on to its sub-processes (clisp). I looked at PATH, and it `seems' OK.
Since I have a working solution, I am going to let it be for now.
Thanks,
Mirko