From: matz / netlab.co.jp (Yukihiro Matsumoto) さん Subject: [ruby-list:15577] Re: tcltklib (LoadError) Date: Thu, 22 Jul 1999 12:45:31 +0900 Message-ID: <E1179nW-0007de-00 / ev.netlab.co.jp> こんばんは、曽根俊彦です。さっそくご返事を頂き有難うございました。 matz> まつもと ゆきひろです matz> matz> OpenBSDってダイナミックローディングがサポートされてましたっ matz> け? config.h に HAVE_DLOPEN を含むかどうかで確認できます。 matz> $ cd /usr/local/src/ruby-1.3.5 $ grep -n 'HAVE_DLOPEN' config.h 80:#define HAVE_DLOPEN 1 でした。 matz> matz> ext/config.cache matz> matz> というファイルを削除してからもう1度 ruby extconf.rb を実行し matz> て、その出力を教えてください。 matz> 私が ruby extconf.rb を実行したのは、 /usr/local/src/ruby-1.3.5/ext/tcltklib だったのですが、これは /usr/local/src/ruby-1.3.5/ext でやるべきだったのでしょうか? 下の方が正しいと解釈した上で、とにかく仰 られたとおり ext/config.cache を削除して、再実行です。(一旦 rm -R ruby-1.3.5 を行なっていたので最初からやり直しました。) $ cd /usr/local/src $ tar xzf /pub/ruby/devel/ruby-1.3.5.tar.gz $ cd ruby-1.3.5 $ env CFLAGS="-O2 -m486" ./configure && make && make test $ su Password: # make install && exit $ cd /usr/local/src/ruby-1.3.5/ext $ rm config.cache $ ruby extmk.rb compiling curses compiling dbm compiling etc compiling fcntl compiling gdbm compiling md5 compiling nkf compiling pty compiling readline compiling sdbm compiling socket compiling tcltklib compiling tk compiling Win32API $ ls -R tcltklib MANIFEST README.euc depend lib tcltklib.c MANUAL.euc demo extconf.rb sample tcltklib/demo: lines0.tcl lines1.rb lines2.rb tcltklib/lib: tcltk.rb tcltklib/sample: batsu.gif maru.gif sample0.rb sample1.rb sample2.rb $ rm config.cache $ cd tcltklib $ ruby extconf.rb checking for t_open() in -lnsl... no checking for socket() in -lsocket... no checking for dlopen() in -ldl... no checking for log() in -lm... yes checking for tcl.h... yes checking for tk.h... yes checking for XOpenDisplay() in -lX11... yes $ ls -R MANIFEST README.euc depend lib tcltklib.c MANUAL.euc demo extconf.rb sample ./demo: lines0.tcl lines1.rb lines2.rb ./lib: tcltk.rb ./sample: batsu.gif maru.gif sample0.rb sample1.rb sample2.rb のようになりました。私の思い違い、勘違いがあるといけないので、長くなり ましたが、手順を含めて投稿させて頂きます。引続きよろしくお願い致します。 --- 曽根俊彦(SONE Toshihiko) <tsone / cc.rim.or.jp>