I have been using the Lisp Linear Algebra package (LLA) for about a year.
It provides a Common Lisp interface to the BLAS and LAPACK libraries using
CFFI. I use SBCL on Windows and have been loading the BLAS and LAPACK
libraries from Cygwin64.
A couple of days ago I updated my Cygwin installation (because of the
Shellshock vulnerability) and now when I load these libraries, my SBCL
process crashes after a second or two.
CL-USER> (ql:quickload "cffi")
To load "cffi":
Load 1 ASDF system:
cffi
; Loading "cffi"
; Loading system definition for alexandria from
C:/Users/Dad/quicklisp/dists/quicklisp/software/alexandria-20140826-git/alexandria.asd
; Registering #<SYSTEM "alexandria">
; Loading system definition for trivial-features from
C:/Users/Dad/quicklisp/dists/quicklisp/software/trivial-features-20130312-git/trivial-features.asd
; Registering #<SYSTEM "trivial-features">
; Loading system definition for babel from
C:/Users/Dad/quicklisp/dists/quicklisp/software/babel-20140713-git/babel.asd
; Registering #<SYSTEM "babel">
.
("cffi")
CL-USER> (cffi:load-foreign-library "CYGBLAS-0.DLL")
#<CFFI:FOREIGN-LIBRARY CYGBLAS-0.DLL-872 "CYGBLAS-0.DLL">
(crashed)
The two libraries I load (CYGBLAS-0.DLL and CYGLAPACK-0.DLL) have not
changed in about a year. Other libraries (such as the DLLs found in
Windows/System32) load without a problem. The Lapack libraries in the
Cygwin32 distribution are not recognized as valid Win32 applications by
CFFI. I've tried older versions of SBCL and CFFI with no success.
I've replicated the problem exactly on a second machine. It should be easy
to test: Install SBCL, install Cygwin64, install CFFI, and then try
(cffi:load-foreign-library
"CYGBLAS-0.DLL"). You may have to provide the full path. Sometimes it
takes a short while for the process to crash.
I'm very baffled by the problem, and I hope someone on this list will have
a fix or some ideas on how to debug the situation. I'd also appreciate it
if someone would see if the problem replicates on their machine. Also, if
someone has a source for alternate DLLs for BLAS and LAPACK that CFFI can
load on Windows, I could try those to see if they have the same problem.
Thanks!
Scott Turner