On Tue, Feb 19, 2008 at 9:54 AM, Reini Urban rurban@x-ray.at wrote:
2008/2/18, Mirko Vukovic mirko.vukovic@gmail.com:
On Mon, Feb 18, 2008 at 2:18 PM, Luís Oliveira luismbo@gmail.com wrote:
On 18/02/2008, Mirko Vukovic mirko.vukovic@gmail.com wrote:
CFFI-USER> (setf *target* #p"/bin/cyggsl-0.dll") #P"/bin/cyggsl-0.dll" CFFI-USER> (probe-file *target*) #P"/bin/cyggsl-0.dll" CFFI-USER> (cffi:load-foreign-library *target*)
and the error message:
Unable to load foreign library (NIL). FFI::FOREIGN-LIBRARY: Cannot open library "/bin/cyggsl-0.dll": "No such file or directory" [Condition of type LOAD-FOREIGN-LIBRARY-ERROR]
I'm out of ideas, sorry. It works for me on Cygwin:
[3]> (cffi:load-foreign-library "/bin/cyggsl-0.dll") #<CFFI::FOREIGN-LIBRARY #x1030C799>
[4]> (lisp-implementation-version) "2.44 (2008-02-02) (built on reini [192.168.1.7])" [5]> (software-version) "GNU C 3.4.4 (cygming special, gdc 0.12, using dmd 0.125)"
--
Luís Oliveira http://student.dei.uc.pt/~lmoliv/
Well, in one sense, that is good news: it can work. I just need to look harder to see where it is failing on my machine.
Can you just tell me what are the permission settings of the dll's that you have? (I'm grasping at straws here)
What does $ cygcheck cyggsl-0.dll return for you? This should be your problem. As I said I suspect lapack is not in your path, or there is some problem loading the blas dll.
$ cygcheck cyggsl-0.dll Found: d:\cygwin\bin\cyggsl-0.dll d:\cygwin\bin\cyggsl-0.dll d:\cygwin\lib\lapack\cygblas.dll d:\cygwin\bin\cygwin1.dll
C:\WINDOWS\system32\ADVAPI32.DLL C:\WINDOWS\system32\ntdll.dll C:\WINDOWS\system32\KERNEL32.dll C:\WINDOWS\system32\RPCRT4.dll C:\WINDOWS\system32\Secur32.dll
-- Reini Urban http://phpwiki.org/ http://murbreak.at/ http://spacemovie.mur.at/ http://helsinki.at/
Reini, I get the identical output to cygcheck as you. I don't know if I emailed to you, but I did write a little C program and linked it against the cyggsl-0.dll, and it worked.
I'm a bit puzzled by the error message: it is identical to the one if I give it a non-existant file name. Here is with an existing cyggsl-0.dll: Unable to load foreign library (NIL). FFI::FOREIGN-LIBRARY: Cannot open library "/bin/cyggsl-0.dll": "No such file or directory" [Condition of type LOAD-FOREIGN-LIBRARY-ERROR]
And here when loading cyggsl-0.dlla which does not exist: Unable to load foreign library (NIL). FFI::FOREIGN-LIBRARY: Cannot open library "/bin/cyggsl-0.dlla": "No such file or directory" [Condition of type LOAD-FOREIGN-LIBRARY-ERROR]
To my untrained eyes, it is almost that it really does not see the file.
I think that I need to play a bit in the debugger stack. I see that the -helper and -path functions are involved. Time to finally learn how to use slime's debugging features.
Thanks for staying with me this long :-)
Mirko
BTW, I keep replying to both you and and Luis directly, as well as to the cffi-devel. If direct emails are annoying, let me know.