[Gsll-devel] The price of progress: sbcl1.0.37 and gsl1.14

Mirko Vukovic mirko.vukovic at gmail.com
Fri Apr 16 21:29:22 UTC 2010


The following is my experience on 64-bit RedHat Enterprise Linux and
emacs 23.1.  I am slowly learning the meaning of `bleeding edge'
hardware & software.

*64-bit*

I cannot link to 64-bit libraries.  I had to use the 32-bit versions
of gsl and ffi libraries.  I don't think I had this problem with
sbcl1.0.34.  I am not sure what is the root cause of this.  I suspect
something with cffi and latest sbcl1.037.  But I don't know how to
test this.

(btw, to compile gsl for 32 bit, I used the configure switch
`./configure -CFLAGS=-m4')

*gsll/mathematical/complex.lisp*

The file fails to compile.  The error is:

  warning:
    Asserted type SB-SYS:SYSTEM-AREA-POINTER conflicts with derived type
    (VALUES (COMPLEX DOUBLE-FLOAT) &OPTIONAL).

I guess SBCL is picky about something, but I really wish I understood
what was going under GSLL's hood (those macros are huge).

But that is only part of the story.  I can evaluate a `defmfun' form
(such as (defmfun cx-add ...)), but I cannot execute it.  For example,
(gsl::cx-add #C(1d0 2d0) #C(3d0 4d0)) will throw an error:

The value #C(1.0d0 2.0d0)
is not of type
  SB-SYS:SYSTEM-AREA-POINTER.
   [Condition of type TYPE-ERROR]

I looked at fsbv/examples.lisp (see complex-add), and don't understand
why one works and the other does not.

*testing*

Testing produces more failures with the 32-bit version than with the
64-bit one.  The testing results can be improved somewhat by doing:
(let ((lisp-unit:*epsilon* 1d-6))
       (lisp-unit:run-tests))

resulting in TOTAL: 1432 assertions passed, 29 failed, 9 execution errors.

Admittedly, this is a dubious way of improving the testing score :-)
So caveat emptor :-)

*fsbv init.lisp*

Here is a little patch to load libraries.  Notice the missing 64-bit
locations.  These are banished for now.

(cffi:define-foreign-library libffi
  (:darwin
     (:or "/opt/local/lib/libffi.dylib" "/sw/lib/libffi.dylib"
	  "/usr/local/lib/libffi.dylib"))
  (:unix (:or "/usr/local/lib/libffi.so.0" "/usr/local/lib/libffi.so"
	      "/usr/lib/libffi.so.0" "/usr/lib/libffi.so"))
  (t (:default "libffi")))

(cffi:use-foreign-library libffi)

(I cannot push patches to git as I am behind the firewall, and even
the http protocol does not work)

Cheers,

Mirko




More information about the gsll-devel mailing list