From: Stefan Nobis
Subject: cl-opengl with sbcl on Mac/Intel
Date: 
Message-ID: <m2tztzizwx.fsf@snobis.de>
Hi.

I just tried to compile cl-opengl with sbcl (1.0.5) on my Mac (Intel
Core 2 Duo), but it fails. The library (MacOSX OpenGL.framework) loads
fine, but there seems to be a function in CFFI missing. Is it
possible, that the current version from darcs of cl-opengl and the
darcs version of CFFI are not compatible?

,----
| * (asdf:oos 'asdf:load-op :cl-opengl)
| 
| ; loading system definition from /Users/stefan/lisp/systems/cl-opengl.asd into
| ; #<PACKAGE "ASDF0">
| ; registering #<SYSTEM :CL-OPENGL {12341401}> as CL-OPENGL
| ; loading system definition from /Users/stefan/lisp/systems/cffi.asd into
| ; #<PACKAGE "ASDF0">
| ; registering #<SYSTEM CFFI {11892921}> as CFFI
| 
| ; compiling file "/Users/stefan/lisp/lib/cl-opengl/gl/funcs.lisp" (written 26 MAY 2007 09:57:11 AM):
| ; compiling (IN-PACKAGE :CL-OPENGL)
| ; compiling (DEFMACRO DEFGLFUN ...)
| ; compiling (DEFGLFUN ("glAccum" %GLACCUM) ...)
| ; file: /Users/stefan/lisp/lib/cl-opengl/gl/funcs.lisp
| ; in: DEFGLFUN ("glAccum" %GLACCUM)
| ;     (CL-OPENGL::DEFGLFUN ("glAccum" CL-OPENGL::%GLACCUM) :VOID
| ;                        (CL-OPENGL::OP CL-OPENGL:ENUM) (CL-OPENGL::VALUE FLOAT))
| ; 
| ; caught ERROR:
| ;   (during macroexpansion of (DEFGLFUN ("glAccum" %GLACCUM) ...))
| ;   The function CFFI::LISP-FUNCTION-NAME is undefined.
| 
| ; compiling (DEFGLFUN ("glActiveTexture" %GLACTIVETEXTURE) ...)
| ; file: /Users/stefan/lisp/lib/cl-opengl/gl/funcs.lisp
| ; in: DEFGLFUN ("glActiveTexture" %GLACTIVETEXTURE)
| ;     (CL-OPENGL::DEFGLFUN ("glActiveTexture" CL-OPENGL::%GLACTIVETEXTURE) :VOID
| ;                        (CL-OPENGL::NAME CL-OPENGL:ENUM))
| ; 
| ; caught ERROR:
| ;   (during macroexpansion of (DEFGLFUN ("glActiveTexture" %GLACTIVETEXTURE) ...))
| ;   The function CFFI::LISP-FUNCTION-NAME is undefined.
| [...]
| ; compiling (DEFGLFUN ("glWindowPos3f" %GLWINDOWPOS3F) ...)
| ; file: /Users/stefan/lisp/lib/cl-opengl/gl/funcs.lisp
| ; in: DEFGLFUN ("glWindowPos3f" %GLWINDOWPOS3F)
| ;     (CL-OPENGL::DEFGLFUN ("glWindowPos3f" CL-OPENGL::%GLWINDOWPOS3F) :VOID
| ;                        (CL-OPENGL::X FLOAT) (CL-OPENGL::Y FLOAT)
| ;                        (CL-OPENGL::Z FLOAT))
| ; 
| ; caught ERROR:
| ;   (during macroexpansion of (DEFGLFUN ("glWindowPos3f" %GLWINDOWPOS3F) ...))
| ;   The function CFFI::LISP-FUNCTION-NAME is undefined.
| 
| 
| ; /Users/stefan/lisp/lib/cl-opengl/gl/.sbcl-mac/funcs.fasl written
| ; compilation finished in 0:00:01
| WARNING:
|    COMPILE-FILE warned while performing #<COMPILE-OP NIL {11C4CD79}> on
|    #<CL-SOURCE-FILE "funcs" {122AF7E9}>.
| 
| debugger invoked on a ASDF:COMPILE-FAILED:
|   erred while invoking #<COMPILE-OP NIL {11C4CD79}> on
|   #<CL-SOURCE-FILE "funcs" {122AF7E9}>
| 
| 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:LOAD-OP NIL {122B9BA9}> on
|               #<ASDF:CL-SOURCE-FILE "funcs" {122AF7E9}>.
|   1: [ACCEPT] Continue, treating #<ASDF:LOAD-OP NIL {122B9BA9}> on
|               #<ASDF:CL-SOURCE-FILE "funcs" {122AF7E9}> as having been
|               successful.
|   2: [ABORT ] Exit debugger, returning to top level.
| 
| ((SB-PCL::FAST-METHOD ASDF:PERFORM (ASDF:COMPILE-OP ASDF:CL-SOURCE-FILE))
|  #<unavailable argument>
|  #<unavailable argument>
|  #<ASDF:COMPILE-OP NIL {11C4CD79}>
|  #<ASDF:CL-SOURCE-FILE "funcs" {122AF7E9}>)
`----

-- 
Stefan.
From: Luís Oliveira
Subject: Re: cl-opengl with sbcl on Mac/Intel
Date: 
Message-ID: <m1odjr49l3.fsf@deadspam.com>
Stefan Nobis <······@gmx.de> writes:
> Is it possible, that the current version from darcs of cl-opengl and
> the darcs version of CFFI are not compatible?

Yes.  At this point, I would recommend using CFFI from darcs and the
cl-opengl-thomas branch at <http://common-lisp.net/~loliveira/darcs/>.

BTW, had you sent this message to the cl-opengl-devel mailing list, you
would have gotten a much faster answer!  I recommend using that mailing
list for issues specific to cl-opengl.

-- 
Luís Oliveira
http://student.dei.uc.pt/~lmoliv/