[cells-gtk-devel] SBCL/CFFI compability problems

Lynbech Christian christian.lynbech at tieto.com
Wed Feb 25 09:42:04 UTC 2009


I have been playing a little with cells-gtk and have run into some
problems between SBCL and CFFI.

I was using CFFI 0.9.2 but this triggers a package lock violation with
SBCL 1.0.22 (on x86 linux) so I upgraded to the most recent CFFI version
(0.10.4), but then cells-gtk stopped working.

The error I get when trying to run a little simple demo is this:

        The value of STRING is #(71 85 73 32 68 101 109 111), 
        which is not of type STRING.

ultimately coming from a call to GTK-FFI:GTK-WINDOW-SET-TITLE with a
string argument ("GUI Demo").

Presumably CFFI used to accept octet sequences as string arguments but
doesn't anymore.

Anyway, if I then disable the sbcl code specific code in 'lisp-to-utf-8'
and 'utf-8-to-lisp' in "gtk-ffi/gtk-ffi-impl.lisp", then our little demo
works again.

I have attached the stack trace and a diff for the aforementioned
disabling to illustrate what I have done.

I am however unsure as to what the proper solution is. I suspect that
code was invented for a reason, but it is unclear to me if those reasons
remain valid in the face of the newer CFFI and what we may lose by
disabling it.

I should perhaps also mention that I am running with this in my .sbclrc:

        (setq sb-impl::*default-external-format* :latin-1)

in case that makes a difference.


------------------------+-----------------------------------------------------
Christian Lynbech       | christian #\@ defun #\. dk
------------------------+-----------------------------------------------------
Hit the philistines three times over the head with the Elisp reference manual.
                                        - petonic at hal.com (Michael A. Petonic)

-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
Name: stack-trace.txt
URL: <https://mailman.common-lisp.net/pipermail/cells-gtk-devel/attachments/20090225/a64c12c1/attachment.txt>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: sbcl.diff
Type: text/x-patch
Size: 1242 bytes
Desc: not available
URL: <https://mailman.common-lisp.net/pipermail/cells-gtk-devel/attachments/20090225/a64c12c1/attachment.bin>


More information about the cells-gtk-devel mailing list