[#44237] Float を利用するRubyプログラム — SASADA Koichi <ko1@...>

 ささだです.

16 messages 2007/11/17
[#44241] Re: Float を利用するRubyプログラム — SASADA Koichi <ko1@...> 2007/11/19

 ささだです.

[ruby-list:44220] Re: Ruby/KAKASIのインストールに失敗する

From: NOKUBI Takatsugu <knok@...>
Date: 2007-11-14 05:57:25 UTC
List: ruby-list #44220
  今のKAKASIをメンテナンスしている野首です。

At Mon, 12 Nov 2007 08:32:57 +0900,
<boku.charhan@kcd.biglobe.ne.jp> wrote:
> 
> libkakasi.aというのがライブラリらしいのですが
> KAKASIをmakeするときに以下のようなlibtoolの警告が出るのが原因でしょうか?
> 
> --------------------------------------------------------------------------------
> libtool: link: warning: undefined symbols not allowed in i686-pc-cygwin shared libraries

  確認してみました。ソースにあるlibtoolを直接見てもらうとわかるのですが、

-- 
    *-*-cygwin* | *-*-mingw* | *-*-pw32* | *-*-os2*)
      # It is impossible to link a dll without this setting, and
      # we shouldn't force the makefile maintainer to figure out
      # which system we are compiling for in order to pass an extra
      # flag for every libtool invocation.
      # allow_undefined=no

      # FIXME: Unfortunately, there are problems with the above when trying
      # to make a dll which has undefined symbols, in which case not
      # even a static library is built.  For now, we need to specify
      # -no-undefined on the libtool link line when we can be certain
      # that all symbols are satisfied, otherwise we get a static library.
      allow_undefined=yes
      ;;
-- 

  ということで、こういう状況の場合libtoolに-no-undefinedを指定する必要
があるようです。
Ref: http://practical-scheme.net/wiliki/wiliki.cgi?Gauche%3aautomake%2blibtoolize#H-g712ip

  lib/Makefile.amのlibkakasi_la_LDFLAGSに-no-undefinedを追加して
automakeを実行し、Makefile.inを再生成させた上でconfigure, makeしたとこ
ろきちんとdllができるようになりました。

-- 
libkakasi_la_LDFLAGS = \
        -version-info 3:0:1  -export-dynamic -no-undefined
-- 

  対応としては、lib/Makefile.amをlib/Makefile.am.inに変更してconfiugre 
時にcygwin環境でのみ-no-undefinedを追加するようにする、という方法が考
えられますが、なんとなくもっとよい方法がありそうな気がします。
-- 
野首 貴嗣
E-mail: knok@daionet.gr.jp
	knok@namazu.org / knok@debian.org


In This Thread

Prev Next