I am summarizing the changes I had to make to various pieces of code to get antik to compile and run on clisp+cygwin. I had to make changes in two libraries: fsbv and antik. They are all rather minor.
*FSBV*
You will need to install cygwin's libffi4 package
Two modifications in libffi-unix.lisp:
In the library loading sections, point to cygwin's ``ffi.h'' like this. #+cygwin (include "ffi.h")
We comment out a unix64 section in ``cenum abi'' definition like so:
(cenum abi ((:default-abi "FFI_DEFAULT_ABI")) ((:sysv "FFI_SYSV")) #-cygwin((:unix64 "FFI_UNIX64")))
(Cygwin is not a 32-bit application)
To make sure things are workinig, you will need to modify, compile and load `examples.lisp'. The library section of "examples.lisp" is modified to load the correct cygwin libraries like so: (cffi:load-foreign-library #+(and unix (not cygwin)) "libgslcblas.so" #+cygwin "cyggslcblas-0.dll")
;; note that we load cygblas explicitly. #+cygwin (cffi:load-foreign-library "/usr/lib/lapack/cygblas-0.dll")
(cffi:load-foreign-library #+(and unix (not cygwin)) "libgsl.so" #+cygwin (probe-file "/usr/bin/cyggsl-0.dll"))
Once you have modified fsbv like that, make sure it compiles. The go to examples.lisp, compile and load. Then execute the few examples listed at the beginning of the file
*ANTIK*
In init/package.lisp (defpackage antik) I added the following symbols to be shaddowed:
#:second #:fifth #:tenth #:rem
Now, since CL's `second' is shaddowed, I had to prepend it with `CL:' in a few places. This was necessary in three files in physical-quantities: angle-component, physical-quantities and units.lisp. Here are the instances:
grep "cl:second" *.lisp
angle-component.lisp: (cl:/ (first tangent) (cl:second tangent))) angle-component.lisp: (eql (cl:second (tangent angle)) label)) angle-component.lisp: (setf (cl:second (tangent angle)) run) physical-quantities.lisp: (parse-integer (cl:second prod)) physical-quantities.lisp: (all-same (cl:second mat) :test #'equal) ; all same units physical-quantities.lisp: (cl:second mat)) units.lisp: (or (cl:second (print-name unit)) units.lisp: (pux (cl:second expr) expon) units.lisp: (pux (cl:second expr) (cl:- expon))) ; one argument, invert units.lisp: (pux (cl:second expr) (cl:* expon (third expr)))) units.lisp: (if style (cl:second (print-name unit-sexp)) units.lisp: (mkstr (if (eql (cl:second unit-sexp) 1) units.lisp: (make-pq-string (cl:second unit-sexp) style)) units.lisp: (mkstr (make-pq-string (cl:second unit-sexp) style) units.lisp: (make-pq-string (cl:second units) (nf-option style))
With this, antik should compile cleanly on clisp+cygwin.
HTH,
Mirko