きりかノート 3冊め

おあそびプログラミング

rb-gnome にまたも苦戦

Rabbit の Portfile は簡単にできたので、さっそく試してみると

 require "gtk2"

のところでエラー。そんなとこ、ありえないっつーの!

 % port contents rb-gnome | grep gtk2
%

うむ、ホントにないや。

もう一度 -d -v 付けてインストールし直しして、出力を確認しよう。

 /usr/bin/ld: warning -prebind has no effect with -bundle
/usr/bin/ld: multiple definitions of symbol _gtk_target_list_get_type
rbgtktargetlist.o definition of _gtk_target_list_get_type in section (__TEXT,__t
/opt/local/lib/libgtk-x11-2.0.dylib(gtkselection.o) definition of _gtk_target_li
/usr/bin/ld: warning multiple definitions of symbol _setregid
/opt/local/lib/libruby.dylib(process.o) definition of _setregid
/usr/lib/gcc/powerpc-apple-darwin8/4.0.1/../../../libm.dylib(setregid.So) defini
/usr/bin/ld: warning multiple definitions of symbol _setreuid
/opt/local/lib/libruby.dylib(process.o) definition of _setreuid
/usr/lib/gcc/powerpc-apple-darwin8/4.0.1/../../../libm.dylib(setreuid.So) defini
collect2: ld returned 1 exit status
make[2]: *** [gtk2.bundle] Error 1
make[1]: *** [all] Error 2

gtk_target_list_get_type() 関数が、gtk+ruby-gnome2 でぶつかってんな。調べてみると、gtk+-2.10 で同名の関数が追加されたようだ。こういうとき、Google Code Search 便利だな。

利用先を調べた結果、 ruby-gnome2 側の関数名を変更しても影響なさそうなので、そんなパッチを追加。