Hi,

I downloaded the latest CVS version of cells-gtk and tried to use it
with either SBCL or OpenMCL. I fixed a few of the problems that I
encountered, only some of which are defects in cells-gtk.

1) The foreign library definitions in GTK-FFI.LISP are broken. Since
   most (all?) Lisp implementations running on OSX have :UNIX as well
   as :DARWIN in *FEATURES*, the :DARWIN clauses have to come
   first. The library names in GTK-FFI.LISP were wrong, too. The
   attached patch fixes these problems.

2) I had problems compiling GTK-ADDS.C. Here the problem seems to be
   my GTK installation (via Fink). In particular PKG-CONFIG is
   hosed. Has anyone solved this?

3) In my case DYLD_LIBRARY_PATH had to be set to /SW/LIB in
   ~/.MacOSX/environment.plist. Don't forget to logout
   afterwards.

4) OpenMCL can't compile GTK-FFI.LISP, because of functions using
   +C-NULL+. Apparently it can't dump +C-NULL+ to FASLs. Providing a
   MAKE-LOAD-FORM method as described in
   http://www.clozure.com/pipermail/openmcl-devel/2004-January/001310.html
   is supposed to fix this, but I couldn't get it to work. I'll ask on
   the OpenMCL list, if nobody beats me to it.

5) OpenMCL doesn't understand the (DECLARE (VALUES ...)) declarations
   in POD-UTILS/UTILS.LISP. The spec doesn't seem to require it,
   either. I didn't change anything, since I'm not sure if
   removing them or using a #-openmcl is better.

6) The current show stopper is GTK-INIT-CHECK. It always returns NIL,
   which might have to do with my screwed-up GTK installation, even
   though I doubt it. Other GTK applications work fine. I'm not
   sure how to find out what went wrong. I even tried to feed it
   proper ARGC and ARGV using CFFI:WITH-FOREIGN-OBJECT and friends but
   to no avail.

7) What does 'pod' mean in the context of this project? For now I'll
   go with *P*ost *O*rgasmic *D*isgust. See
   http://acronyms.thefreedictionary.com/Post-Orgasmic+Disgust for a
   fine selection of alternative interpretations.


Kai

*** /tmp/ediff29919jmG	Sat Aug 26 17:32:51 2006
--- /Users/kai/Projekte/cells-gtk-root/gtk-ffi/gtk-ffi.lisp	Sat Aug 26 17:19:06 2006
***************
*** 84,118 ****
  
  (eval-when (:compile-toplevel :load-toplevel :execute)
  (cffi:define-foreign-library :gobject
    (cffi-features:unix "libgobject-2.0.so")
!   (cffi-features:windows "libgobject-2.0-0.dll")
!   (cffi-features:darwin "libgobject-2.0-0.dylib"))
  
  (cffi:define-foreign-library :glib
    (cffi-features:unix "libglib-2.0.so")
!   (cffi-features:windows "libglib-2.0-0.dll")
!   (cffi-features:darwin "libglib-2.0-0.dylib"))
  
  (cffi:define-foreign-library :gthread
    (cffi-features:unix "libgthread-2.0.so")
!   (cffi-features:windows "libgthread-2.0-0.dll")
!   (cffi-features:darwin "libgthread-2.0-0.dylib"))
  
  (cffi:define-foreign-library :gdk
    (cffi-features:unix "libgdk-x11-2.0.so")
!   (cffi-features:windows "libgdk-win32-2.0-0.dll")
!   (cffi-features:darwin "libgdk-win32-2.0-0.dylib")) ; pod ???
  
  (cffi:define-foreign-library :gtk
    (cffi-features:unix "libgtk-x11-2.0.so")
!   (cffi-features:windows "libgtk-win32-2.0-0.dll")
!   (cffi-features:darwin "libgtk-win32-2.0-0.dylib")) ; pod ???
  
  #+libcellsgtk
  (cffi:define-foreign-library :cgtk
    (cffi-features:unix #.(merge-pathnames "libcellsgtk.so" *compile-file-pathname*))
!   (cffi-features:windows #.(merge-pathnames "libcellsgtk.dll" *compile-file-pathname*))
!   (cffi-features:darwin #.(merge-pathnames "libcellsgtk.dylib" *compile-file-pathname*)))
  ) ;eval-when
  
  ;;; After doing this, should be able to do (g-thread-init c-null)
--- 84,119 ----
  
  (eval-when (:compile-toplevel :load-toplevel :execute)
  (cffi:define-foreign-library :gobject
+   (cffi-features:darwin "libgobject-2.0.0.dylib")
    (cffi-features:unix "libgobject-2.0.so")
!   (cffi-features:windows "libgobject-2.0-0.dll"))
  
  (cffi:define-foreign-library :glib
+   (cffi-features:darwin "libglib-2.0.0.dylib")
    (cffi-features:unix "libglib-2.0.so")
!   (cffi-features:windows "libglib-2.0-0.dll"))
  
  (cffi:define-foreign-library :gthread
+   (cffi-features:darwin "libgthread-2.0.0.dylib")
    (cffi-features:unix "libgthread-2.0.so")
!   (cffi-features:windows "libgthread-2.0-0.dll"))
  
  (cffi:define-foreign-library :gdk
+   (cffi-features:darwin "libgdk-x11-2.0.0.dylib")
    (cffi-features:unix "libgdk-x11-2.0.so")
!   (cffi-features:windows "libgdk-win32-2.0-0.dll")) ; pod ???
  
  (cffi:define-foreign-library :gtk
+   (cffi-features:darwin "libgtk-x11-2.0.0.dylib")
    (cffi-features:unix "libgtk-x11-2.0.so")
!   (cffi-features:windows "libgtk-win32-2.0-0.dll")) ; pod ???
  
  #+libcellsgtk
  (cffi:define-foreign-library :cgtk
+   (cffi-features:darwin #.(merge-pathnames "libcellsgtk.dylib" *compile-file-pathname*))
    (cffi-features:unix #.(merge-pathnames "libcellsgtk.so" *compile-file-pathname*))
!   (cffi-features:windows #.(merge-pathnames "libcellsgtk.dll" *compile-file-pathname*)))
! 
  ) ;eval-when
  
  ;;; After doing this, should be able to do (g-thread-init c-null)
_______________________________________________
cells-gtk-devel site list
[email protected]
http://common-lisp.net/mailman/listinfo/cells-gtk-devel

Reply via email to