cl-openglパッケージを登録

darcsでダウンロードしたフォルダをsbclに登録する.

  1. フォルダ全体を/usr/local/lib/sbcl/site/に移動.
$ mv ~/cl-opengl/ /usr/local/lib/sbcl/site/ 
  1. cl-opengl/*.asdファイルからsite-systemsフォルダ内にシンボリックリンクを作成
$ cd /usr/local/lib/sbcl/site-systems
$ ln -s ../site/cl-opengl/*.asd .

これで完了.

  1. あとはasdfでロードできる.
 * (require :asdf)

("ASDF")
 * (asdf:oos 'asdf:load-op :cffi)

; loading system definition from /usr/local/lib/sbcl/site-systems/cffi.asd into
; #
; registering # as CFFI
NIL
 * (asdf:oos 'asdf:load-op :cl-opengl)

; loading system definition from /usr/local/lib/sbcl/site-systems/cl-opengl.asd
; into #
; registering # as CL-OPENGL
; compiling file "/usr/local/lib/sbcl/site/cl-opengl/gl/package.lisp" (written 05 MAR 2007 04:17:57 PM):
; compiling (DEFPACKAGE #:CL-OPENGL ...)
...........(省略)...........

※最初にロードしたときはコンパイルが実行される.
しかし,glutについては,ライブラリをインストールしていないので,以下のようにエラーが出力される.

 * (asdf:oos 'asdf:load-op :cl-glut-examples)

; loading system definition from
; /usr/local/lib/sbcl/site-systems/cl-glut-examples.asd into #
; registering # as CL-GLUT-EXAMPLES
; loading system definition from /usr/local/lib/sbcl/site-systems/cl-glut.asd
; into #
; registering # as CL-GLUT
; loading system definition from /usr/local/lib/sbcl/site-systems/cl-opengl.asd
; into #
; registering # as CL-OPENGL
; loading system definition from /usr/local/lib/sbcl/site-systems/cffi.asd into
; #
; registering # as CFFI
; loading system definition from /usr/local/lib/sbcl/site-systems/cl-glu.asd
; into #
; registering # as CL-GLU
; compiling file "/usr/local/lib/sbcl/site/cl-opengl/glut/package.lisp" (written 05 MAR 2007 04:17:57 PM):
; compiling (IN-PACKAGE #:CL-USER)
; compiling (DEFPACKAGE #:CL-GLUT ...)

; /usr/local/lib/sbcl/site/cl-opengl/glut/package.fasl written
; compilation finished in 0:00:00
; compiling file "/usr/local/lib/sbcl/site/cl-opengl/glut/library.lisp" (written 05 MAR 2007 04:17:57 PM):
; compiling (IN-PACKAGE :CL-GLUT)
; compiling (DEFINE-FOREIGN-LIBRARY GLUT ...)
; compiling (USE-FOREIGN-LIBRARY GLUT)

; /usr/local/lib/sbcl/site/cl-opengl/glut/library.fasl written
; compilation finished in 0:00:00

debugger invoked on a LOAD-FOREIGN-LIBRARY-ERROR:
  Unable to load any of the alternatives:
   ("libglut.dylib" "libglut.3.dylib")

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

restarts (invokable by number or by possibly-abbreviated name):
  0: [RETRY    ] Try loading the foreign library again.
  1: [USE-VALUE] Use another library instead.
  2: [RETRY    ] Retry performing # on
                 #.
  3: [ACCEPT   ] Continue, treating # on
                 # as having been
                 successful.
  4: [ABORT    ] Exit debugger, returning to top level.

(NIL
 (:OR "libglut.dylib" "libglut.3.dylib")
 "Unable to load any of the alternatives:~%   ~S")
0] 

OpenGLUTをインストールする必要がある.