Macでkakasi

KAKASIをMacにインストールしてみた

  • MaxOS10.8.2
  • kakasi-2.3.4
$ tar zxvfp kakasi-2.3.4.tar.gz
$ ./configure
$ make
make	all-recursive
Making all in src
make[2]: Nothing to be done for `all'.
Making all in lib
/bin/ksh ../libtool --mode=link gcc	-g -O2 -Wall -Wunused -Wuninitialized -Wmissing-prototypes -Wmissing-declarations -pedantic	-o libkakasi.la -rpath /usr/local/lib -version-info 3:0:1	-export-dynamic libdict.lo libkakasi.lo libkanjiio.lo liba2.lo libg2.lo libj2.lo libk2.lo libee2.lo libhh2.lo libjj2.lo libkk2.lo libitaiji.lo lib78_83.lo
rm -fr .libs/libkakasi.la .libs/libkakasi.* .libs/libkakasi.*
gcc -dynamiclib -undefined suppress -o .libs/libkakasi.2.1.0.dylib	libdict.lo libkakasi.lo libkanjiio.lo liba2.lo libg2.lo libj2.lo libk2.lo libee2.lo libhh2.lo libjj2.lo libkk2.lo libitaiji.lo lib78_83.lo	-lc -install_name	/usr/local/lib/libkakasi.2.dylib -compatibility_version 4 -current_version 4.0
ld: can't use -undefined warning or suppress with -twolevel_namespace
collect2: ld returned 1 exit status
make[2]: *** [libkakasi.la] Error 1
make[1]: *** [all-recursive] Error 1
make: *** [all-recursive-am] Error 2

エラーが出る

http://www.ki.nu/~makoto/diary/?200307b&to=200307131#200307131

こちらに対処法があったので修正

$ vi libtool
allow_undefined_flag="-undefined suppress"
↓
allow_undefined_flag=""
$make
#make install
$ echo "書かし"|kakasi.dSYM -Ja -Ka -Ha
kakashi

うまくいったようだ