May 10, 2008

Technical problems already ?

Some initial background: my intent is to use a (possibly customised; but that's a future post) version of cl-sdl. This is basically a uffi binding to SDL, which provides the windowing, event-handling and, most importantly, OpenGL capabilities. I have already played with cl-sdl once from within cmucl (a Lisp implementation), doing a very basic heightmap renderer. Basically a port of NeHe tutorial number 34. Getting cmucl and cl-sdl to work together on my mac took some doing but it worked nevertheless. This time I have opted for sbcl rather than cmucl, for one simple reason: Ready Lisp. This is a complete package which has sbcl, aquamacs and slime working right out of the box. Pretty cool actually, and it saves me from having to set it all up myself. Anyway, as sbcl is related to cmucl I was pretty confident that I could get cl-sdl back up and running. Not so... When I try to install cl-sdl through asdf it downloads just fine, but during compilation I get an error saying that sdl-ext references sdl:get-video-info but that sdl does not define this. This is utter stupidity as sdl defines it just fine. My guess here is that there is a build-order problem. You see, it compiles sdl-ext before compiling sdl, and so yeah the symbol may not be there yet. So next I resort to doing manual compile-file invocations, doing things in a better order. Guess what, no complaints anymore. So something is definitely going wrong in this asdf. I didn't have this problem in cmucl... But still things go wrong. While I can now require sdl, opengl and sdl-demos without problems, when I actually try to run one of the demos slime loses the connection with the repl... What I guess might be going on this time is that the demo is trying to open a window, but that because of the way aquamacs/slime is connecting to the repl this might not be possible. So I would like to start sbcl up from within a terminal and try running it that way. This is what worked fine in cmucl. Of course, first I have to figure out where Ready Lisp is keeping its version of sbcl. Probably somewhere in its app package, but I'll have to look. So no joy yet. Nor any pretty pictures of triangles floating in mid-air. :-)

No comments: