taiyoh's memorandum

@ttaiyoh が、技術ネタで気づいたことを書き溜めておきます。

mac osxにmroongaをインストールしてみる

 承前として、osxにはmysqlとgroongaはインストールされているものとする(どちらもbrew installできますね!)

$ wget https://github.com/downloads/mroonga/mroonga/mroonga-1.11.tar.gz
$ wget http://downloads.mysql.com/archives/mysql-5.5/mysql-5.5.14.tar.gz
$ tar xvzf mysql-5.5.14.tar.gz
$ tar xvzf mroonga-1.11.tar.gz
$ mv mysql-5.5.14 /usr/local/mysql
$ cd mroonga-1.1
$ CPPFLAGS="-DDISABLE_DTRACE" ./configure --with-mysql-source=/usr/local/mysql
$ make
$ make install

 インストール完了後、mysqlのコンソールに入り

INSTALL PLUGIN groonga SONAME 'ha_groonga.so';
CREATE FUNCTION last_insert_grn_id RETURNS INTEGER soname 'ha_groonga.so';

 これでひとまず完了。
 ミソなのはconfigureの時のCPPFLAGSで、これ付けないとmake時に「probes_mysql_dtrace.hがない」と言われてしまう><(確かにファイルがない)。そのファイルを探すのが億劫だったので、もうフラグ変えることで対処。