c-wrapperのインストール

c-wrapper,c-wrapper は更新されていないけど http://hg.koguro.net/c-wrapper で更新されていた.ダウンロード→タグからダウンロードできる.

./DIST gen
./configure CC=/usr/bin/gcc
make
DYLD_INSERT_LIBRARIES=/usr/lib/libffi.dylib make check

普通にやると (use c-wrapper) でエラーになる.

$ gosh
gosh> (use c-wrapper)
*** ERROR: Compile Error: Compile Error: Compile Error: failed to link /usr/local/lib/gauche-0.9/site/x86_64-apple-darwin10.8.0/c-ffi.so dynamically: dlopen(/usr/local/lib/gauche-0.9/site/x86_64-apple-darwin10.8.0/c-ffi.so, 10): Symbol not found: _ffi_type_double
  Referenced from: /usr/local/lib/gauche-0.9/site/x86_64-apple-darwin10.8.0/c-ffi.so
  Expected in: flat namespace
 in /usr/local/lib/gauche-0.9/site/x86_64-apple-darwin10.8.0/c-ffi.so
"/usr/local/share/gauche-0.9/site/lib/c-wrapper/c-parser.scm":31:(define-module c-wrapper.c-parser (u ...

"/usr/local/share/gauche-0.9/site/lib/c-wrapper.scm":31:(define-module c-wrapper (use srfi-1 ...

"(standard input)":1:(use c-wrapper)

Stack Trace:
_______________________________________
  0  (eval expr env)
        At line 179 of "/usr/local/share/gauche-0.9/0.9.4_pre3/lib/gauche/interactive.scm"

DYLD_INSERT_LIBRARIES=/usr/lib/libffi.dylib をつけると動くので,これが見えていないのが問題らしい.otoolとかinstall_name_toolとかあたってみたがよく分からず,DYLD_INSERT_LIBRARIES を指定しなくてもすむ方法は分からなかった.

$ otool -L /usr/local/lib/gauche-0.9/site/x86_64-apple-darwin10.8.0/c-ffi.so
/usr/local/lib/gauche-0.9/site/x86_64-apple-darwin10.8.0/c-ffi.so:
	/usr/local/lib/libgauche-0.9.dylib (compatibility version 0.0.0, current version 0.0.0)
	/usr/lib/libSystem.B.dylib (compatibility version 1.0.0, current version 125.2.11)

ここに/usr/lib/libffi.dylibがないといけないのではないかと予想したのだけどなぁ.
それとなんかmakeの最初の方でconfigureみたいなのが走っているのだけど,rm: conftest.dSYM: is a directoryって出てこけまくっているように見える.大丈夫なのだろうか.