[cells-gtk-devel] "First steps" how to compile problem

Bob Willan bwillan at matrix-systems-inc.com
Fri Feb 1 00:57:54 UTC 2008


Hi, Peter,

I've been thinking about getting into Lisp and Cells for a while, and your 
how-to prompted me to give it a try now.  Not to mention all the work 
you've been doing, making cells-gtk look like more of a going concern 
now.  Thanks for that.

I followed all your instructions, and when I had a compile problem, I 
removed everything, downloaded again/updated from cvs, and tried again 
from scratch, with the same results.  I'm new at lisp and must say the 
compile errors and debugger aren't exactly intuitive to me, though I'd 
guess it involves the cffi function call :(

My compile stops in tree-view.lisp, as the lines below show.  I am using 
straight Debian Etch (32bit 2.6.18-5-k7 kernel), gcc that came with it 
v4.1.2 20061115 (prerelease)(Debian 4.1.1-21), SBCL 0.9.16, cffi 0.9.2, 
and the cells/cells-gtk from cvs using the commands on your site.

Any suggestions would be greatly appreciated.

Thanks,
  Bob Willan

;; I've listed my links (without the permissions/owner/etc to better
;; read the lines, but permissions were wide open)

bob at work1:~/.sbcl/site$ ls -la
total 20
drwxr-xr-x 5 bob bob 4096 2008-01-30 09:32 .
drwxr-xr-x 4 bob bob 4096 2008-01-28 23:53 ..
drwxr-xr-x 6 bob bob 4096 2008-01-30 23:07 cells
drwxr-xr-x 8 bob bob 4096 2008-01-30 23:07 cells-gtk
drwxr-xr-x 8 bob bob 4096 2008-01-30 09:33 cffi_0.9.2
bob at work1:~/.sbcl/site$ ls -la ../systems/
total 8
 cells.asd            -> ../site/cells/cells.asd
 cells-gtk.asd        -> ../site/cells-gtk/cells-gtk/cells-gtk.asd
 cffi.asd             -> ../site/cffi_0.9.2/cffi.asd
 cffi-uffi-compat.asd -> ../site/cffi_0.9.2/cffi-uffi-compat.asd
 gtk-ffi.asd          -> ../site/cells-gtk/gtk-ffi/gtk-ffi.asd
 ph-maths.asd         -> ../site/cells-gtk/ph-maths/ph-maths.asd
 pod-utils.asd        -> ../site/cells-gtk/pod-utils/pod-utils.asd
 test-gtk.asd         -> ../site/cells-gtk/cells-gtk/test-gtk/test-gtk.asd
 utils-kt.asd         -> ../site/cells/utils-kt/utils-kt.asd

;;----------------------------------------------------------------------------
;; I wasn't sure if these warnings when compiling gtk-ffi are
;; okay/expected or not?

bob at work1:~/.sbcl/site/cells-gtk/gtk-ffi$ make
gcc -fPIC -c gtk-adds.c `pkg-config --cflags --libs gtk+-2.0`
gtk-adds.c: In function 'gtk_adds_color_new':
gtk-adds.c:77: warning: incompatible implicit declaration of built-in 
function 'malloc'
gcc: -lgtk-x11-2.0: linker input file unused because linking not done
gcc: -lgdk-x11-2.0: linker input file unused because linking not done
gcc: -latk-1.0: linker input file unused because linking not done
gcc: -lgdk_pixbuf-2.0: linker input file unused because linking not done
gcc: -lm: linker input file unused because linking not done
gcc: -lpangocairo-1.0: linker input file unused because linking not done
gcc: -lfontconfig: linker input file unused because linking not done
gcc: -lXext: linker input file unused because linking not done
gcc: -lXrender: linker input file unused because linking not done
gcc: -lXinerama: linker input file unused because linking not done
gcc: -lXi: linker input file unused because linking not done
gcc: -lXrandr: linker input file unused because linking not done
gcc: -lXcursor: linker input file unused because linking not done
gcc: -lXfixes: linker input file unused because linking not done
gcc: -lpango-1.0: linker input file unused because linking not done
gcc: -lcairo: linker input file unused because linking not done
gcc: -lX11: linker input file unused because linking not done
gcc: -lgobject-2.0: linker input file unused because linking not done
gcc: -lgmodule-2.0: linker input file unused because linking not done
gcc: -ldl: linker input file unused because linking not done
gcc: -lglib-2.0: linker input file unused because linking not done
gcc -shared -o libcellsgtk.so gtk-adds.o `pkg-config --cflags --libs 
gtk+-2.0`

;;----------------------------------------------------


;; Compile log starting at tree-view.lisp

; compiling file "/home/bob/.sbcl/site/cells-gtk/cells-gtk/tree-view.lisp" 
(written 27 JAN 2008 03:01:05 PM):
; compiling (IN-PACKAGE :CGTK)
; compiling (DEF-OBJECT LIST-STORE ...)
; compiling (DEF-OBJECT TREE-STORE ...)
; compiling (DEFUN FAIL ...)
; compiling (DEF-WIDGET TREE-VIEW ...)
; compiling (DEF-CLEAN-UP (SELF TREE-VIEW) ...)
; compiling (DEF-C-OUTPUT TREE-MODEL ...)
; compiling (DEF-C-OUTPUT EXPAND-ALL ...)
; compiling (CFFI:DEFCALLBACK TREE-VIEW-ITEMS-SELECTOR ...)
; compiling (DEFMETHOD GET-SELECTION ...)
; compiling (DEF-C-OUTPUT SELECTION-MODE ...)
; compiling (CFFI:DEFCALLBACK TREE-VIEW-SELECT-HANDLER ...)
; compiling (DEF-C-OUTPUT ON-SELECT ...)
; compiling (DEFMODEL LISTBOX ...)
; compiling (DEFMETHOD ITEMS ...)
; compiling (DEFMETHOD (SETF ITEMS) ...)
; compiling (DEFUN MK-LISTBOX ...)
; compiling (DEF-C-OUTPUT SELECT-IF ...)
; compiling (DEF-C-OUTPUT ROOTS ...)
; compiling (DEFMODEL TREEBOX ...)
; compiling (DEFUN MK-TREEBOX ...)
; compiling (DEF-C-OUTPUT SELECT-IF ...)
; compiling (DEF-C-OUTPUT ROOTS ...)
; compiling (DEFUN GTK-TREE-STORE-SET-KIDS ...)
; compiling (CFFI:DEFCALLBACK TREE-VIEW-RENDER-CELL-CALLBACK ...)
; compiling (DEFUN ITEM-FROM-PATH ...)
; compiling (DECLAIM (OPTIMIZE #))
; compiling (DEFUN GTK-TREE-VIEW-RENDER-CELL ...)
; compiling (DEFSTRUCT RENDERER ...)
; compiling (LET (#) ...)
debugger invoked on a TYPE-ERROR in thread #<THREAD "initial thread" 
{A7BD4C1}>:
  The value NIL is not of type SB-C::PHYSENV.

Type HELP for debugger help, or (SB-EXT:QUIT) to exit from SBCL.

restarts (invokable by number or by possibly-abbreviated name):
  0: [RETRY ] Retry performing #<ASDF:COMPILE-OP NIL {A865241}> on
              #<ASDF:CL-SOURCE-FILE "tree-view" {A8652E1}>.
  1: [ACCEPT] Continue, treating #<ASDF:COMPILE-OP NIL {A865241}> on
              #<ASDF:CL-SOURCE-FILE "tree-view" {A8652E1}> as having been
              successful.
  2: [ABORT ] Exit debugger, returning to top level.

(SB-C::MERGE-LETS
 #<SB-C::CLAMBDA
   :%SOURCE-NAME SB-C::.ANONYMOUS.
   :%DEBUG-NAME (SB-C::VARARGS-ENTRY (LAMBDA (&REST VALUES)))
   :KIND NIL
   :TYPE #<SB-KERNEL:BUILT-IN-CLASSOID FUNCTION (read-only)>
   :WHERE-FROM :DEFINED
   :VARS (VALUES) {B6F94E9}>
 #<SB-C::COMBINATION
   :FUN #<SB-C::REF :LEAF # {B733289}>
   :ARGS (#<SB-C::COMBINATION :FUN # :ARGS # {B733571}>) {B7332C1}>)
0] backtrace

0: (SB-C::MERGE-LETS
    #<SB-C::CLAMBDA
      :%SOURCE-NAME SB-C::.ANONYMOUS.
      :%DEBUG-NAME (SB-C::VARARGS-ENTRY (LAMBDA (&REST VALUES)))
      :KIND NIL
      :TYPE #<SB-KERNEL:BUILT-IN-CLASSOID FUNCTION (read-only)>
      :WHERE-FROM :DEFINED
      :VARS (VALUES) {B6F94E9}>
    #<SB-C::COMBINATION
      :FUN #<SB-C::REF :LEAF # {B733289}>
      :ARGS (#<SB-C::COMBINATION :FUN # :ARGS # {B733571}>) {B7332C1}>)
1: (SB-C::LET-CONVERT
    #<SB-C::CLAMBDA
      :%SOURCE-NAME SB-C::.ANONYMOUS.
      :%DEBUG-NAME (SB-C::VARARGS-ENTRY (LAMBDA (&REST VALUES)))
      :KIND NIL
      :TYPE #<SB-KERNEL:BUILT-IN-CLASSOID FUNCTION (read-only)>
      :WHERE-FROM :DEFINED
      :VARS (VALUES) {B6F94E9}>
    #<SB-C::COMBINATION
      :FUN #<SB-C::REF :LEAF # {B733289}>
      :ARGS (#<SB-C::COMBINATION :FUN # :ARGS # {B733571}>) {B7332C1}>)
2: (SB-C::MAYBE-LET-CONVERT
    #<SB-C::CLAMBDA
      :%SOURCE-NAME SB-C::.ANONYMOUS.
      :%DEBUG-NAME (SB-C::VARARGS-ENTRY (LAMBDA (&REST VALUES)))
      :KIND NIL
      :TYPE #<SB-KERNEL:BUILT-IN-CLASSOID FUNCTION (read-only)>
      :WHERE-FROM :DEFINED
      :VARS (VALUES) {B6F94E9}>)
3: (SB-C::DELETE-REF
    #<SB-C::REF
      :LEAF #<SB-C::CLAMBDA
              :%SOURCE-NAME SB-C::.ANONYMOUS.
              :%DEBUG-NAME (SB-C::VARARGS-ENTRY #)
              :KIND NIL
              :TYPE #<SB-KERNEL:BUILT-IN-CLASSOID FUNCTION (read-only)>
              :WHERE-FROM :DEFINED
              :VARS (VALUES) {B6F94E9}> {B6FBC99}>)
4: (SB-C::DELETE-BLOCK #<SB-C::CBLOCK 48 :START c1 {B6FBB09}> NIL)
5: (SB-C::CLEAN-COMPONENT
    #<SB-C:COMPONENT :NAME "LET ((RENDERERS #))" :REANALYZE T {B716BA1}>
    #<unavailable argument>)
6: (SB-C::IR1-OPTIMIZE
    #<SB-C:COMPONENT :NAME "LET ((RENDERERS #))" :REANALYZE T {B716BA1}>
    NIL)
7: (SB-C::IR1-OPTIMIZE-UNTIL-DONE
    #<SB-C:COMPONENT :NAME "LET ((RENDERERS #))" :REANALYZE T {B716BA1}>)
8: (SB-C::IR1-PHASES
    #<SB-C:COMPONENT :NAME "LET ((RENDERERS #))" :REANALYZE T {B716BA1}>)
9: (SB-C::COMPILE-COMPONENT
    #<SB-C:COMPONENT :NAME "LET ((RENDERERS #))" :REANALYZE T {B716BA1}>)
10: (SB-C::COMPILE-TOPLEVEL
     (#<SB-C::CLAMBDA
        :%SOURCE-NAME SB-C::.ANONYMOUS.
        :%DEBUG-NAME (SB-C::TOP-LEVEL-FORM
                      (LET #
                        #
                        #))
        :KIND :TOPLEVEL
        :TYPE #<SB-KERNEL:BUILT-IN-CLASSOID FUNCTION (read-only)>
        :WHERE-FROM :DEFINED
        :VARS NIL {B6E2001}>)
     NIL)
11: (SB-C::CONVERT-AND-MAYBE-COMPILE
     (LET ((RENDERERS (MAKE-HASH-TABLE)))
       (DEFUN REGISTER-RENDERER-DATA (RENDERER DATA)
         (SETF (GETHASH (CFFI-SYS:POINTER-ADDRESS RENDERER) RENDERERS) 
DATA))
       (DEFUN RECOVER-RENDERER-DATA (RENDERER)
         (GETHASH (CFFI-SYS:POINTER-ADDRESS RENDERER) RENDERERS)))
     (SB-C::ORIGINAL-SOURCE-START 0 29))
12: ((FLET SB-C::DEFAULT-PROCESSOR)
     (LET ((RENDERERS (MAKE-HASH-TABLE)))
       (DEFUN REGISTER-RENDERER-DATA (RENDERER DATA)
         (SETF (GETHASH (CFFI-SYS:POINTER-ADDRESS RENDERER) RENDERERS) 
DATA))
       (DEFUN RECOVER-RENDERER-DATA (RENDERER)
         (GETHASH (CFFI-SYS:POINTER-ADDRESS RENDERER) RENDERERS))))
13: (SB-C::PROCESS-TOPLEVEL-FORM
     (LET ((RENDERERS (MAKE-HASH-TABLE)))
       (DEFUN REGISTER-RENDERER-DATA (RENDERER DATA)
         (SETF (GETHASH (CFFI-SYS:POINTER-ADDRESS RENDERER) RENDERERS) 
DATA))
       (DEFUN RECOVER-RENDERER-DATA (RENDERER)
         (GETHASH (CFFI-SYS:POINTER-ADDRESS RENDERER) RENDERERS)))
     (SB-C::ORIGINAL-SOURCE-START 0 29)
     NIL)
14: (SB-C::SUB-SUB-COMPILE-FILE #<SB-C::SOURCE-INFO >)
15: ((LAMBDA ()))
16: (SB-C::%WITH-COMPILATION-UNIT #<CLOSURE (LAMBDA #) {B3618BD}>)
17: (SB-C::SUB-COMPILE-FILE #<SB-C::SOURCE-INFO >)
18: (COMPILE-FILE 
#P"/home/bob/.sbcl/site/cells-gtk/cells-gtk/tree-view.lisp")
19: ((SB-PCL::FAST-METHOD ASDF:PERFORM (ASDF:COMPILE-OP 
ASDF:CL-SOURCE-FILE))
     #<unavailable argument>
     #<unavailable argument>
     #<ASDF:COMPILE-OP NIL {A865241}>
     #<ASDF:CL-SOURCE-FILE "tree-view" {A8652E1}>)
20: ((LAMBDA
         (SB-PCL::.PV-CELL. SB-PCL::.NEXT-METHOD-CALL. SB-PCL::.ARG0.
          SB-PCL::.ARG1.))
     #<unavailable argument>
     #<unavailable argument>
     #<ASDF:COMPILE-OP NIL {A865241}>
     #<ASDF:CL-SOURCE-FILE "tree-view" {A8652E1}>)
21: ((LAMBDA ()))
22: (SB-C::%WITH-COMPILATION-UNIT #<CLOSURE (LAMBDA #) {A7D3975}>)
23: (ASDF:OPERATE ASDF:LOAD-OP COMMON-LISP-USER::TEST-GTK)
24: (ASDF::MODULE-PROVIDE-ASDF COMMON-LISP-USER::TEST-GTK)
25: ((LAMBDA (#:G21)) ASDF::MODULE-PROVIDE-ASDF)
26: (SB-IMPL::%MAP-FOR-EFFECT-ARITY-1
     #<CLOSURE (LAMBDA #) {A7C32A5}>
     (ASDF::MODULE-PROVIDE-ASDF SB-IMPL::MODULE-PROVIDE-CONTRIB))
27: (SB-KERNEL:%MAP
     NIL
     #<CLOSURE (LAMBDA #) {A7C32A5}>
     (ASDF::MODULE-PROVIDE-ASDF SB-IMPL::MODULE-PROVIDE-CONTRIB))
28: (REQUIRE COMMON-LISP-USER::TEST-GTK NIL)
29: (SB-INT:EVAL-IN-LEXENV (REQUIRE 'COMMON-LISP-USER::TEST-GTK) 
#<NULL-LEXENV>)
30: (SB-EXT:INTERACTIVE-EVAL (REQUIRE 'COMMON-LISP-USER::TEST-GTK))
31: (SB-IMPL::REPL-FUN NIL)
32: ((LAMBDA ()))
33: ((LAMBDA ()))
34: (SB-IMPL::%WITH-REBOUND-IO-SYNTAX #<CLOSURE (LAMBDA #) {A7BCC85}>)
35: (SB-IMPL::TOPLEVEL-REPL NIL)
36: (SB-IMPL::TOPLEVEL-INIT)
37: ((LABELS SB-IMPL::RESTART-LISP))

0] list
SB-DEBUG::ARG-0  =  2
SB-DEBUG::ARG-1  =  #<SB-C::CLAMBDA
                      :%SOURCE-NAME SB-C::.ANONYMOUS.
                      :%DEBUG-NAME (SB-C::VARARGS-ENTRY
                                    (LAMBDA (&REST VALUES)))
                      :KIND NIL
                      :TYPE #<SB-KERNEL:BUILT-IN-CLASSOID FUNCTION 
(read-only)>
                      :WHERE-FROM :DEFINED
                      :VARS (VALUES) {B6F94E9}>
SB-DEBUG::ARG-2  =  #<SB-C::COMBINATION
                      :FUN #<SB-C::REF
                             :LEAF #<SB-C::CLAMBDA
                                     :%SOURCE-NAME SB-C::.ANONYMOUS.
                                     :%DEBUG-NAME #
                                     :KIND NIL
                                     :TYPE #
                                     :WHERE-FROM :DEFINED
                                     :VARS # {B6F94E9}> {B733289}>
                      :ARGS (#<SB-C::COMBINATION
                               :FUN #
                               :ARGS (# #) {B733571}>) {B7332C1}>



More information about the cells-gtk-devel mailing list