FlockDBを動かせるように

Macで作業しましたが道のりが遠かった。
しかも途中で嫌になってやめた。


まずは必要なもろもろをインストール。
homebrewが入っているので

brew install mysql

して

gem install gizzmo


準備完了なのでgitでソースを取得します。
「doc/demo.markdown at version-1.6.15 from twitter/flockdb - GitHub」 http://goo.gl/Hni4B


ソースを取得したら

sbt update package-dist

すればOK・・・なはずが失敗。
いろんなところを確認すると
最後の最後でsbtのバージョンが0.10だったことに気が付きました。
brewで横着してsbtをインストールしていたのが原因で気がついていませんでした。。
sbtを0.7系に戻してやると・・・また失敗。
今度はthriftが足りないそうです。

brew install thrift

してやってインストールしました。


今度こそとsbt update package-distします。
・・・失敗しました。
ソースのコンパイルでこけているようです。
ターミナルのエラーメッセージが文字化けしていたので
sbtの起動オプションに

-Dfile.encoding=UTF-8 

を追加してやって再度sbt update package-distすると
thrift関連で「シンボルを見つけられません。」とのこと。
どうやらbrewでインストールできるthriftではなくて
「twitter/thrift - GitHub」 http://goo.gl/6ZH7p
これを使えということらしい。。。


ということで

git clone git://github.com/twitter/thrift.git
cd thrift
./bootstrap.sh

したのですが今度は

glibtoolize: You should add the contents of `./aclocal/libtool.m4' to `aclocal.m4'.
glibtoolize: You should add the contents of `./aclocal/ltoptions.m4' to `aclocal.m4'.
glibtoolize: You should add the contents of `./aclocal/ltsugar.m4' to `aclocal.m4'.
glibtoolize: You should add the contents of `./aclocal/ltversion.m4' to `aclocal.m4'.
glibtoolize: You should add the contents of `./aclocal/lt~obsolete.m4' to `aclocal.m4'.

とエラーが。
とりあえず無視して

./configure

すると

./configure: line 16615: syntax error near unexpected token `MONO,'
./configure: line 16615: `  PKG_CHECK_MODULES(MONO, mono >= 2.0.0, net_3_5=yes, net_3_5=no)'

と完全にエラーで進めなくなります。
今度も必要なものが足りていないようなので

brew install pkg-config

してから

cd thrift/aclocal
cp /usr/local/Cellar/pkg-config/0.25/share/aclocal/pkg.m4 .
./configure
make

でようやく・・・ってまだこけるのかよ。。


libtoolのバージョンが違うとの事なので
aclocalコマンドでaclocal.m4を再作成してmakeに挑みます。

aclocal
make

で・・・失敗。


手段の1つのためにここまで時間かけるのも馬鹿らしくなってきたので
放り投げたのでした。