Have there been any changes in CFFI recently that causes problems with cl-opengl? I personally am seeing errors with funcs.lisp that look like this:
; compiling (DEFGLFUN ("glTexSubImage1D" TEX-SUB-IMAGE-1D) ...) ; file: /home/charlie/opengl/cl-opengl/gl/funcs.lisp ; in: DEFGLFUN ("glTexSubImage1D" TEX-SUB-IMAGE-1D) ; (CL-OPENGL-BINDINGS::DEFGLFUN ; ("glTexSubImage1D" CL-OPENGL-BINDINGS:TEX-SUB-IMAGE-1D) :VOID ; (CL-OPENGL-BINDINGS::TARGET CL-OPENGL-BINDINGS:ENUM) ; (CL-OPENGL-BINDINGS::LEVEL CL-OPENGL-BINDINGS:INT) ; (CL-OPENGL-BINDINGS::XOFFSET CL-OPENGL-BINDINGS:INT) ; (CL-OPENGL-BINDINGS::WIDTH CL-OPENGL-BINDINGS:SIZEI) ; (FORMAT CL-OPENGL-BINDINGS:ENUM) (TYPE CL-OPENGL-BINDINGS:ENUM) ; (CL-OPENGL-BINDINGS::PIXELS (:POINTER CL-OPENGL-BINDINGS:VOID))) ; --> PROGN ; ==> ; (CFFI:DEFCFUN ; ("glTexSubImage1D" CL-OPENGL-BINDINGS:TEX-SUB-IMAGE-1D :LIBRARY ; CL-OPENGL-BINDINGS::OPENGL) ; :VOID (CL-OPENGL-BINDINGS::TARGET CL-OPENGL-BINDINGS:ENUM) ; (CL-OPENGL-BINDINGS::LEVEL CL-OPENGL-BINDINGS:INT) ; (CL-OPENGL-BINDINGS::XOFFSET CL-OPENGL-BINDINGS:INT) ; (CL-OPENGL-BINDINGS::WIDTH CL-OPENGL-BINDINGS:SIZEI) ; (FORMAT CL-OPENGL-BINDINGS:ENUM) (TYPE CL-OPENGL-BINDINGS:ENUM) ; (CL-OPENGL-BINDINGS::PIXELS (:POINTER CL-OPENGL-BINDINGS:VOID))) ; ; caught ERROR: ; (during macroexpansion of (DEFCFUN ("glTexSubImage1D" TEX-SUB-IMAGE-1D ...) ...)) ; The value NIL ; is not of type ; (OR (VECTOR CHARACTER) (VECTOR NIL) UNSIGNED-BYTE BASE-STRING).
Basically this occurs for the 300+ defglfuns in funcs.lisp. (interestingly the defglexts appear to compile fine) I had previously been working with cffi+lotsofstuff but recently changed back to cffi main. I have tested with both darcs cffi and cffi+lotsofstuff on sbcl+threads 1.0.15 and 1.0.17, each time deleting .fasls, with the same results. Has anyone else experienced something similar?
charlie
On Thu, Jun 5, 2008 at 3:48 AM, Charlie McMackin charliemac+cl-opengl@gmail.com wrote:
; caught ERROR: ; (during macroexpansion of (DEFCFUN ("glTexSubImage1D" TEX-SUB-IMAGE-1D ...) ...)) ; The value NIL ; is not of type ; (OR (VECTOR CHARACTER) (VECTOR NIL) UNSIGNED-BYTE BASE-STRING).
Basically this occurs for the 300+ defglfuns in funcs.lisp. (interestingly the defglexts appear to compile fine) I had previously been working with cffi+lotsofstuff but recently changed back to cffi main. I have tested with both darcs cffi and cffi+lotsofstuff on sbcl+threads 1.0.15 and 1.0.17, each time deleting .fasls, with the same results. Has anyone else experienced something similar?
It works for me with 1.0.16.37. Can you try setting *BREAK-ON-SIGNALS* to T and see if the backtrace on those errors shows us anything interesting?
Okay *break-on-signals* t shows that it is unable to find libGL, libGL.so.1 or libGL.so.2.... yet a 'whereis libGL' returns the path just fine...hmm
Output from *break-on-signals* t as I load cl-opengl:
(BREAK "~A~%BREAK was entered because of *BREAK-ON-SIGNALS* ~ (now rebound to NIL)." #<TYPE-ERROR {AFA5109}>) 0] backtrace
0: (BREAK "~A~%BREAK was entered because of *BREAK-ON-SIGNALS* ~ (now rebound to NIL)." #<TYPE-ERROR {AFA5109}>) 1: (SIGNAL #<TYPE-ERROR {AFA5109}>)[:EXTERNAL] 2: (ERROR TYPE-ERROR)[:EXTERNAL] 3: (SB-KERNEL::OBJECT-NOT-TYPE-ERROR-HANDLER #<unavailable argument> #.(SB-SYS:INT-SAP #XB7901F88) #<SB-ALIEN-INTERNALS:ALIEN-VALUE :SAP #XB7901C5C :TYPE (* (SB-ALIEN:STRUCT
SB-VM::OS-CONTEXT-T-STRUCT))> (206 14)) 4: (SB-KERNEL::OBJECT-NOT-TYPE-ERROR-HANDLER #<unavailable argument> #.(SB-SYS:INT-SAP #XB7901F88) #<SB-ALIEN-INTERNALS:ALIEN-VALUE :SAP #XB7901C5C :TYPE (* (SB-ALIEN:STRUCT
SB-VM::OS-CONTEXT-T-STRUCT))> (206 14))[:EXTERNAL] 5: (SB-KERNEL:INTERNAL-ERROR #.(SB-SYS:INT-SAP #XB7901C5C) #<unavailable argument>) 6: ("foreign function: #x8063E2C") 7: ("foreign function: #x805224C") 8: ("foreign function: #x8056AAF") 9: ("foreign function: #x8056CE3") 10: (GENSYM NIL)[:EXTERNAL] 11: (ALEXANDRIA.0.DEV:MAKE-GENSYM-LIST 2 NIL) 12: (CFFI::%DEFCFUN NEW-LIST "glNewList" :VOID ((LIST UINT) (MODE ENUM)) (:CALLING-CONVENTION :CDECL :LIBRARY OPENGL) NIL) 13: (MACROEXPAND-1 (DEFCFUN ("glNewList" NEW-LIST :LIBRARY OPENGL) :VOID (LIST UINT) (MODE ENUM)) #<NULL-LEXENV>) 14: (SB-C::PREPROCESSOR-MACROEXPAND-1 (DEFCFUN ("glNewList" NEW-LIST :LIBRARY OPENGL) :VOID (LIST UINT) (MODE ENUM))) 15: ((FLET SB-C::DEFAULT-PROCESSOR) (DEFCFUN ("glNewList" NEW-LIST :LIBRARY OPENGL) :VOID (LIST UINT) (MODE ENUM))) 16: (SB-C::PROCESS-TOPLEVEL-FORM (DEFCFUN ("glNewList" NEW-LIST :LIBRARY OPENGL) :VOID (LIST UINT) (MODE ENUM)) ((PROGN (DECLAIM (INLINE NEW-LIST)) (DEFCFUN ("glNewList" NEW-LIST :LIBRARY OPENGL) :VOID (LIST UINT) (MODE ENUM))) SB-C::ORIGINAL-SOURCE-START 0 3) NIL) 17: (SB-C::PROCESS-TOPLEVEL-PROGN ((DECLAIM (INLINE NEW-LIST)) (DEFCFUN ("glNewList" NEW-LIST :LIBRARY OPENGL) :VOID (LIST UINT) (MODE ENUM))) ((PROGN (DECLAIM (INLINE NEW-LIST)) (DEFCFUN ("glNewList" NEW-LIST :LIBRARY OPENGL) :VOID (LIST UINT) (MODE ENUM))) SB-C::ORIGINAL-SOURCE-START 0 3) NIL) 18: (SB-C::PROCESS-TOPLEVEL-FORM (PROGN (DECLAIM (INLINE NEW-LIST)) (DEFCFUN ("glNewList" NEW-LIST :LIBRARY OPENGL) :VOID (LIST UINT) (MODE ENUM))) (SB-C::ORIGINAL-SOURCE-START 0 3) NIL) 19: ((FLET SB-C::DEFAULT-PROCESSOR) (DEFGLFUN ("glNewList" NEW-LIST) :VOID (LIST UINT) (MODE ENUM))) 20: (SB-C::PROCESS-TOPLEVEL-FORM (DEFGLFUN ("glNewList" NEW-LIST) :VOID (LIST UINT) (MODE ENUM)) (SB-C::ORIGINAL-SOURCE-START 0 3) NIL) 21: (SB-C::SUB-SUB-COMPILE-FILE #<SB-C::SOURCE-INFO >) 22: ((LAMBDA ())) 23: (SB-C::%WITH-COMPILATION-UNIT #<CLOSURE (LAMBDA #) {AF8015D}>)[:EXTERNAL] 24: (SB-C::SUB-COMPILE-FILE #<SB-C::SOURCE-INFO >) 25: (COMPILE-FILE #P"/home/charlie/opengl/cl-opengl/gl/funcs.lisp")[:EXTERNAL]
cl-opengl-devel@common-lisp.net