ongaeshi
ongae****@gmail*****
2012年 4月 10日 (火) 11:01:06 JST
ongaeshiです。 2012年4月9日9:42 Kouhei Sutou <kou****@clear*****>: > なるほど。。。 > 手元のWindows 7 (64bit) + Ruby 1.9.3 (32bit)では動いたんです > けど、動かない環境もあるんですね。。。 > はい、そうみたいです・・。 Win7(64bit) + Ruby1.8.7(ActiveScriptRuby,32bit) でも上手く動きませんでした。 OSとRubyのバージョンの組み合わせで動いたり動かなかったりするのでしょうか? $ gmilk test C:/ruby/lib/ruby/gems/1.8/gems/milkode-0.6.1/lib/milkode/findgrep/findgrep.rb:512: [BUG] rb_gc_mark(): unknown data type 0x2a(0x4c782c0) corrupted object ruby 1.8.7 (2010-12-23 patchlevel 330) [i386-mswin32] This application has requested the Runtime to terminate it in an unusual way. Please contact the application's support team for more information. >> 1. Windows環境でコンパイルの難しいgroongaはコンパイル済みのものを使う(OSに合わせて 32bit or 64bit を選択) >> http://groonga.org/ja/docs/install.html#windows-installer > > あ、これは、常に32bit版じゃないとダメそうな気がします。 > RubyInstallerのRubyが32bit版なので、64bit版のgroongaだと一緒 > に動けないんじゃないかなぁと思います。 > あーそうなんですか・・。 64bit Windowsの時に64bit groongaが使えればより安定して動くかも、と思っていたので残念。 >> ※ 最近では json-gemからx86-mingw32版がyankされたりと、 >> WindowsでもDevKitを使って各自の環境でビルドしてもらおう、 >> という風潮が強くなってきた印象もあります。 > > うわぁ、そうだったんですか。 > >>>> 2. もしくはWindows環境の場合は vendor/ 以下にインストールするのを >>>> http://packages.groonga.org/source/groonga/groonga-2.0.1.tar.gz >>>> ではなく、 >>>> http://packages.groonga.org/windows/groonga/groonga-2.0.1-x86.zip >>>> を展開してgroongaのコンパイルを省略する、でもいいのかもしれません。 >>> >>> 2.の方がよいと思います。 >>> 2.の方だと自動的にPKGConfig用のパスなども調整してくれますし、 >>> groongaのインストールも省略できます。 >> >> ご指摘ありがとうございます!チャレンジしてみます。 >> >> 触るのはこの辺りですよね?全然検討違いだったら教えてもらえるとありがたいです(汗) >> https://github.com/ranguba/rroonga/blob/master/ext/groonga/extconf.rb#L64 > > はい!そのあたりです。 > > https://github.com/ranguba/rroonga/blob/master/ext/groonga/extconf.rb#L72 > のブロックをメソッドに切り出して、Windowsならバイナリをダウ > ンロード、そうじゃなかったら切り出したメソッドを呼んで自分で > ビルド、とするのがよいのではないかと思います! > 手元で実験しているのですが、WinXP(32bit)+Ruby1.9.3(+DevKit)の組み合わせでは上手く動きました。 もう少し、いくつかの環境で試してみます。 https://github.com/ongaeshi/rroonga/commit/0b6f07caf2435dc859b3b1c6e6a8d1d42d3446bb -- /****************************************** ongaeshi MAIL: ongae****@gmail***** WEB: http://ongaeshi.me Twitter: http://twitter.com/ongaeshi ******************************************/