[fetter-devel] "Don't know how to write #<FUNCTIONTYPE <anonymous> ..."?

Jeronimo Pellegrini j_p at aleph0.info
Sat Feb 7 17:24:14 UTC 2009


Hello,

I am trying to generate bindings for lp-solve [0], which is a plain
C library. After installing Verrazano I tried to generate the bindings:

$ sbcl
* (asdf:operate 'asdf:load-op 'verrazano)
...
* (in-package :verrazano-user)

#<PACKAGE "VERRAZANO-USER">
* (generate-binding (append (list :cffi :package-name :lpsolve-cffi-bindings :input-files '("lpsolve/lp_lib.h"))))
$ gccxml --version 
; Standard output:
GCC-XML version 0.9.0
$ gccxml  -fxml="//tmp/990vzntemp.xml" "//tmp/990vzntemp.cpp" 
$ gccxml  --preprocess -dDI "//tmp/990vzntemp.cpp" >"//tmp/990vzntemp.mac"

debugger invoked on a COMMON-LISP:SIMPLE-ERROR in thread #<THREAD "initial thread" RUNNING {10029E6EE1}>:
  Don't know how to write #<FUNCTIONTYPE <anonymous> {100588EEC1}> as a CFFI type

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

restarts (invokable by number or by possibly-abbreviated name):
  0: [ABORT] Exit debugger, returning to top level.

((SB-PCL::FAST-METHOD VERRAZANO::WRITE-CFFI-TYPE (COMMON-LISP:T))
 #<unavailable argument>
 #<unavailable argument>
 #<GCCXML:FUNCTIONTYPE <anonymous> {100588EEC1}>)


Also, following the instructions in the README dile, I ran
 sbcl --load generate-example-bindings.lisp

Some examples didn't work because I don't have the headers installed
(OK, fine); one example ran successfully (OpenGL);
but cairo, for example, failed for some other reason:

; *** Processing binding :CAIRO-CFFI-BINDINGS
$ gccxml --version 
; Standard output:
GCC-XML version 0.9.0
$ gccxml `pkg-config --cflags cairo` -fxml="//tmp/167vzntemp.xml" "//tmp/167vzntemp.cpp" 
$ gccxml `pkg-config --cflags cairo` --preprocess -dDI "//tmp/167vzntemp.cpp" >"//tmp/167vzntemp.mac"
COMMON-LISP:WARNING:
   Failed to generated binding for :CAIRO-CFFI-BINDINGS, error: The function VERRAZANO::FIRST-TIME-P is undefined.

I do have all Cairo headers in /usr/include/cairo... I don't know what 
FIRST-TIME-P means, but it seems to be a different problem from what
prevented the generation of lp-solve bindings.

I am using SBCL 1.0.25.10, and Verrazano just checked out from darcs 
(latest commit Fri Aug  8 05:41:47 BRT 2008), 

So... What could I be doing wrong here?

Thank you!

[0] http://tech.groups.yahoo.com/group/lp_solve/
    http://lpsolve.sourceforge.net/5.5/
    In Debian it is the lp-solve package.





More information about the fetter-devel mailing list