UJP - 技術情報1

Life is fun and easy!

不正IP報告数

Okan Sensor
 
メイン
ログイン
ブログ カテゴリ一覧

senna 0.8.2をインストールする 〜 N-gram 〜

senna 0.8.2をインストールする 〜 N-gram 〜


0.改訂履歴

  • 2006.12.21 新規作成

1.はじめに

 このドキュメントでは,sennaをインストールする手順を説明する. sennaとは,未来検索ブラジルによって開発されているオープンソースの全文検索エンジンである. このエンジンとMeCabによる形態素解析を用いた分かち書きによる単語単位でのインデックスか,N-gramによるトークン抽出を用いるインデックスを作成する事ができる.

 なお,使用しているOSは,RedHat Linux ES上で稼働している.

2.インストール

[root@neptune4 InstallBin]# ls -la senna-0.8.2.tar.gz 
-rw-r--r--    1 shinnai  users     1021591 Dec 21 15:28 senna-0.8.2.tar.gz
[root@neptune4 InstallBin]# 
  • アーカイブを展開する.
[root@neptune4 InstallBin]# tar xfz senna-0.8.2.tar.gz 
[root@neptune4 InstallBin]# cd senna-0.8.2
[root@neptune4 senna-0.8.2]# 
  • ファイルを確認する.
[root@neptune4 senna-0.8.2]# ls -lat
total 1416
drwxr-xr-x    9 root     root         4096 Dec 21 15:29 ..
drwxr-xr-x    4 1000     1000         4096 Oct 20 02:01 bindings
drwxr-xr-x    2 1000     1000         4096 Oct 20 02:01 doc
drwxr-xr-x    2 1000     1000         4096 Oct 20 02:01 lib
drwxr-xr-x    2 1000     1000         4096 Oct 20 02:01 test
drwxr-xr-x    3 1000     1000         4096 Oct 20 02:01 util
drwxr-xr-x    4 1000     1000         4096 Oct 20 02:01 vcc
drwxr-xr-x    8 1000     1000         4096 Oct 19 17:00 .
-rwxr-xr-x    1 1000     1000       716691 Oct 19 16:59 configure
-rw-r--r--    1 1000     1000        21716 Oct 19 16:59 Makefile.in
-r-xr-xr-x    1 1000     1000        15936 Oct 19 16:59 depcomp
-r-xr-xr-x    1 1000     1000         9233 Oct 19 16:59 install-sh
-r-xr-xr-x    1 1000     1000        11014 Oct 19 16:59 missing
-rw-r--r--    1 1000     1000         2283 Oct 19 16:59 config.h.in
-rw-r--r--    1 1000     1000       250165 Oct 19 16:59 aclocal.m4
-r--r--r--    1 1000     1000         5196 Oct 19 16:59 pkg.m4
-rw-r--r--    1 1000     1000         1506 Oct 19 16:59 senna-cfg.in
-rw-r--r--    1 1000     1000        26428 Oct 19 16:59 COPYING
-rw-r--r--    1 1000     1000         9240 Oct 19 16:59 INSTALL
-rw-r--r--    1 1000     1000           72 Oct 19 16:59 Makefile.am
-rw-r--r--    1 1000     1000          807 Oct 19 16:59 NEWS
-rw-r--r--    1 1000     1000         1996 Oct 19 16:59 configure.ac
-rw-r--r--    1 1000     1000         1013 Oct 19 16:59 senna.spec.in
-rw-r--r--    1 1000     1000          532 Oct 19 16:59 AUTHORS
-rw-r--r--    1 1000     1000         3615 Oct 19 16:59 ChangeLog
-rw-r--r--    1 1000     1000           35 Oct 19 16:59 README
-rw-r--r--    1 1000     1000        14578 Oct 19 16:59 senna.h
-r-xr-xr-x    1 1000     1000        42037 Mar 20  2006 config.guess
-r-xr-xr-x    1 1000     1000        30315 Mar 20  2006 config.sub
-r--r--r--    1 1000     1000       186760 Mar 20  2006 ltmain.sh
[root@neptune4 senna-0.8.2]# 
  • 今回は,mecabは利用しない.
  • 次のようにconfigureを行う.
[root@neptune4 senna-0.8.2]# ./configure  --disable-nfkc --without-mecab
checking for a BSD-compatible install... /usr/bin/install -c
checking whether build environment is sane... yes
checking for gawk... gawk
checking whether make sets $(MAKE)... yes
checking for gcc... gcc
checking for C compiler default output file name... a.out
checking whether the C compiler works... yes
checking whether we are cross compiling... no
checking for suffix of executables... 
checking for suffix of object files... o
checking whether we are using the GNU C compiler... yes
checking whether gcc accepts -g... yes
checking for gcc option to accept ANSI C... none needed
checking for style of include used by make... GNU
checking dependency style of gcc... gcc3
checking build system type... i686-pc-linux-gnu
checking host system type... i686-pc-linux-gnu
checking for a sed that does not truncate output... /bin/sed
checking for egrep... grep -E
checking for ld used by gcc... /usr/bin/ld
checking if the linker (/usr/bin/ld) is GNU ld... yes
checking for /usr/bin/ld option to reload object files... -r
checking for BSD-compatible nm... /usr/bin/nm -B
checking whether ln -s works... yes
checking how to recognise dependent libraries... pass_all
checking how to run the C preprocessor... gcc -E
checking for ANSI C header files... yes
checking for sys/types.h... yes
checking for sys/stat.h... yes
checking for stdlib.h... yes
checking for string.h... yes
checking for memory.h... yes
checking for strings.h... yes
checking for inttypes.h... yes
checking for stdint.h... yes
checking for unistd.h... yes
checking dlfcn.h usability... yes
checking dlfcn.h presence... yes
checking for dlfcn.h... yes
checking for g++... g++
checking whether we are using the GNU C++ compiler... yes
checking whether g++ accepts -g... yes
checking dependency style of g++... gcc3
checking how to run the C++ preprocessor... g++ -E
checking for g77... g77
checking whether we are using the GNU Fortran 77 compiler... yes
checking whether g77 accepts -g... yes
checking the maximum length of command line arguments... 32768
checking command to parse /usr/bin/nm -B output from gcc object... ok
checking for objdir... .libs
checking for ar... ar
checking for ranlib... ranlib
checking for strip... strip
checking if gcc static flag  works... yes
checking if gcc supports -fno-rtti -fno-exceptions... yes
checking for gcc option to produce PIC... -fPIC
checking if gcc PIC flag -fPIC works... yes
checking if gcc supports -c -o file.o... yes
checking whether the gcc linker (/usr/bin/ld) supports shared libraries... yes
checking whether -lc should be explicitly linked in... no
checking dynamic linker characteristics... GNU/Linux ld.so
checking how to hardcode library paths into programs... immediate
checking whether stripping libraries is possible... yes
checking if libtool supports shared libraries... yes
checking whether to build shared libraries... yes
checking whether to build static libraries... yes
configure: creating libtool
appending configuration tag "CXX" to libtool
checking for ld used by g++... /usr/bin/ld
checking if the linker (/usr/bin/ld) is GNU ld... yes
checking whether the g++ linker (/usr/bin/ld) supports shared libraries... yes
checking for g++ option to produce PIC... -fPIC
checking if g++ PIC flag -fPIC works... yes
checking if g++ supports -c -o file.o... yes
checking whether the g++ linker (/usr/bin/ld) supports shared libraries... yes
checking dynamic linker characteristics... GNU/Linux ld.so
checking how to hardcode library paths into programs... immediate
checking whether stripping libraries is possible... yes
appending configuration tag "F77" to libtool
checking if libtool supports shared libraries... yes
checking whether to build shared libraries... yes
checking whether to build static libraries... yes
checking for g77 option to produce PIC... -fPIC
checking if g77 PIC flag -fPIC works... yes
checking if g77 supports -c -o file.o... yes
checking whether the g77 linker (/usr/bin/ld) supports shared libraries... yes
checking dynamic linker characteristics... GNU/Linux ld.so
checking how to hardcode library paths into programs... immediate
checking whether stripping libraries is possible... yes
checking sys/mman.h usability... yes
checking sys/mman.h presence... yes
checking for sys/mman.h... yes
checking sys/time.h usability... yes
checking sys/time.h presence... yes
checking for sys/time.h... yes
checking sys/param.h usability... yes
checking sys/param.h presence... yes
checking for sys/param.h... yes
checking pthread.h usability... yes
checking pthread.h presence... yes
checking for pthread.h... yes
checking sys/resource.h usability... yes
checking sys/resource.h presence... yes
checking for sys/resource.h... yes
checking for localtime_r... yes
checking for special C compiler options needed for large files... no
checking for _FILE_OFFSET_BITS value needed for large files... 64
checking for _LARGE_FILES value needed for large files... no
checking for off_t... yes
checking size of off_t... 8
configure: creating ./config.status
config.status: creating Makefile
config.status: creating test/Makefile
config.status: creating lib/Makefile
config.status: creating bindings/mysql/myisenna/Makefile
config.status: creating senna-cfg
config.status: creating senna.spec
config.status: creating config.h
config.status: executing depfiles commands
config.status: executing default commands
[root@neptune4 senna-0.8.2]# 
  • 特に問題なく終了.
  • 続いて,makeを行う.
[root@neptune4 senna-0.8.2]# make
make  all-recursive
make[1]: Entering directory `/tst/module/InstallBin/senna-0.8.2'
Making all in lib
make[2]: Entering directory `/tst/module/InstallBin/senna-0.8.2/lib'
if /bin/sh ../libtool --tag=CC --mode=compile gcc -D_REENTRANT -DSENNA_HOME=¥"
/var/senna¥" -DNO_NFKC -DNO_MECAB -I. -I. -I.. -I. -I.. -I/usr/local/include/s
enna   -Wall -O3 -fno-strict-aliasing -g -O2 -MT io.lo -MD -MP -MF ".deps/io.T
po" -c -o io.lo io.c; ¥
then mv -f ".deps/io.Tpo" ".deps/io.Plo"; else rm -f ".deps/io.Tpo"; exit 1; f
i
mkdir .libs
 gcc -D_REENTRANT -DSENNA_HOME=¥"/var/senna¥" -DNO_NFKC -DNO_MECAB -I. -I. -I.. 
-I. -I.. -I/usr/local/include/senna -Wall -O3 -fno-strict-aliasing -g -O2 -MT 
io.lo -MD -MP -MF .deps/io.Tpo -c io.c  -fPIC -DPIC -o .libs/io.o
 gcc -D_REENTRANT -DSENNA_HOME=¥"/var/senna¥" -DNO_NFKC -DNO_MECAB -I. -I. -I.. 
-I. -I.. -I/usr/local/include/senna -Wall -O3 -fno-strict-aliasing -g -O2 -MT 
io.lo -MD -MP -MF .deps/io.Tpo -c io.c -o io.o >/dev/null 2>&1
if /bin/sh ../libtool --tag=CC --mode=compile gcc -D_REENTRANT -DSENNA_HOME=¥"
/var/senna¥" -DNO_NFKC -DNO_MECAB -I. -I. -I.. -I. -I.. -I/usr/local/include/s
enna   -Wall -O3 -fno-strict-aliasing -g -O2 -MT sym.lo -MD -MP -MF ".deps/sym.
Tpo" -c -o sym.lo sym.c; ¥
then mv -f ".deps/sym.Tpo" ".deps/sym.Plo"; else rm -f ".deps/sym.Tpo"; exit 1
; fi
 gcc -D_REENTRANT -DSENNA_HOME=¥"/var/senna¥" -DNO_NFKC -DNO_MECAB -I. -I. -I.. 
-I. -I.. -I/usr/local/include/senna -Wall -O3 -fno-strict-aliasing -g -O2 -MT 
sym.lo -MD -MP -MF .deps/sym.Tpo -c sym.c  -fPIC -DPIC -o .libs/sym.o
 gcc -D_REENTRANT -DSENNA_HOME=¥"/var/senna¥" -DNO_NFKC -DNO_MECAB -I. -I. -I.. 
-I. -I.. -I/usr/local/include/senna -Wall -O3 -fno-strict-aliasing -g -O2 -MT 
sym.lo -MD -MP -MF .deps/sym.Tpo -c sym.c -o sym.o >/dev/null 2>&1
if /bin/sh ../libtool --tag=CC --mode=compile gcc -D_REENTRANT -DSENNA_HOME=¥"
/var/senna¥" -DNO_NFKC -DNO_MECAB -I. -I. -I.. -I. -I.. -I/usr/local/include/s
enna   -Wall -O3 -fno-strict-aliasing -g -O2 -MT set.lo -MD -MP -MF ".deps/set.
Tpo" -c -o set.lo set.c; ¥
then mv -f ".deps/set.Tpo" ".deps/set.Plo"; else rm -f ".deps/set.Tpo"; exit 1
; fi
 gcc -D_REENTRANT -DSENNA_HOME=¥"/var/senna¥" -DNO_NFKC -DNO_MECAB -I. -I. -I.. 
-I. -I.. -I/usr/local/include/senna -Wall -O3 -fno-strict-aliasing -g -O2 -MT 
set.lo -MD -MP -MF .deps/set.Tpo -c set.c  -fPIC -DPIC -o .libs/set.o
 gcc -D_REENTRANT -DSENNA_HOME=¥"/var/senna¥" -DNO_NFKC -DNO_MECAB -I. -I. -I.. 
-I. -I.. -I/usr/local/include/senna -Wall -O3 -fno-strict-aliasing -g -O2 -MT 
set.lo -MD -MP -MF .deps/set.Tpo -c set.c -o set.o >/dev/null 2>&1
if /bin/sh ../libtool --tag=CC --mode=compile gcc -D_REENTRANT -DSENNA_HOME=¥"
/var/senna¥" -DNO_NFKC -DNO_MECAB -I. -I. -I.. -I. -I.. -I/usr/local/include/s
enna   -Wall -O3 -fno-strict-aliasing -g -O2 -MT inv.lo -MD -MP -MF ".deps/inv.
Tpo" -c -o inv.lo inv.c; ¥
then mv -f ".deps/inv.Tpo" ".deps/inv.Plo"; else rm -f ".deps/inv.Tpo"; exit 1
; fi
 gcc -D_REENTRANT -DSENNA_HOME=¥"/var/senna¥" -DNO_NFKC -DNO_MECAB -I. -I. -I.. 
-I. -I.. -I/usr/local/include/senna -Wall -O3 -fno-strict-aliasing -g -O2 -MT 
inv.lo -MD -MP -MF .deps/inv.Tpo -c inv.c  -fPIC -DPIC -o .libs/inv.o
 gcc -D_REENTRANT -DSENNA_HOME=¥"/var/senna¥" -DNO_NFKC -DNO_MECAB -I. -I. -I.. 
-I. -I.. -I/usr/local/include/senna -Wall -O3 -fno-strict-aliasing -g -O2 -MT 
inv.lo -MD -MP -MF .deps/inv.Tpo -c inv.c -o inv.o >/dev/null 2>&1
if /bin/sh ../libtool --tag=CC --mode=compile gcc -D_REENTRANT -DSENNA_HOME=¥"
/var/senna¥" -DNO_NFKC -DNO_MECAB -I. -I. -I.. -I. -I.. -I/usr/local/include/s
enna   -Wall -O3 -fno-strict-aliasing -g -O2 -MT str.lo -MD -MP -MF ".deps/str.
Tpo" -c -o str.lo str.c; ¥
then mv -f ".deps/str.Tpo" ".deps/str.Plo"; else rm -f ".deps/str.Tpo"; exit 1
; fi
 gcc -D_REENTRANT -DSENNA_HOME=¥"/var/senna¥" -DNO_NFKC -DNO_MECAB -I. -I. -I.. 
-I. -I.. -I/usr/local/include/senna -Wall -O3 -fno-strict-aliasing -g -O2 -MT 
str.lo -MD -MP -MF .deps/str.Tpo -c str.c  -fPIC -DPIC -o .libs/str.o
 gcc -D_REENTRANT -DSENNA_HOME=¥"/var/senna¥" -DNO_NFKC -DNO_MECAB -I. -I. -I.. 
-I. -I.. -I/usr/local/include/senna -Wall -O3 -fno-strict-aliasing -g -O2 -MT 
str.lo -MD -MP -MF .deps/str.Tpo -c str.c -o str.o >/dev/null 2>&1
if /bin/sh ../libtool --tag=CC --mode=compile gcc -D_REENTRANT -DSENNA_HOME=¥"
/var/senna¥" -DNO_NFKC -DNO_MECAB -I. -I. -I.. -I. -I.. -I/usr/local/include/s
enna   -Wall -O3 -fno-strict-aliasing -g -O2 -MT lex.lo -MD -MP -MF ".deps/lex.
Tpo" -c -o lex.lo lex.c; ¥
then mv -f ".deps/lex.Tpo" ".deps/lex.Plo"; else rm -f ".deps/lex.Tpo"; exit 1
; fi
 gcc -D_REENTRANT -DSENNA_HOME=¥"/var/senna¥" -DNO_NFKC -DNO_MECAB -I. -I. -I.. 
-I. -I.. -I/usr/local/include/senna -Wall -O3 -fno-strict-aliasing -g -O2 -MT 
lex.lo -MD -MP -MF .deps/lex.Tpo -c lex.c  -fPIC -DPIC -o .libs/lex.o
 gcc -D_REENTRANT -DSENNA_HOME=¥"/var/senna¥" -DNO_NFKC -DNO_MECAB -I. -I. -I.. 
-I. -I.. -I/usr/local/include/senna -Wall -O3 -fno-strict-aliasing -g -O2 -MT 
lex.lo -MD -MP -MF .deps/lex.Tpo -c lex.c -o lex.o >/dev/null 2>&1
if /bin/sh ../libtool --tag=CC --mode=compile gcc -D_REENTRANT -DSENNA_HOME=¥"
/var/senna¥" -DNO_NFKC -DNO_MECAB -I. -I. -I.. -I. -I.. -I/usr/local/include/s
enna   -Wall -O3 -fno-strict-aliasing -g -O2 -MT index.lo -MD -MP -MF ".deps/i
ndex.Tpo" -c -o index.lo index.c; ¥
then mv -f ".deps/index.Tpo" ".deps/index.Plo"; else rm -f ".deps/index.Tpo"; 
exit 1; fi
 gcc -D_REENTRANT -DSENNA_HOME=¥"/var/senna¥" -DNO_NFKC -DNO_MECAB -I. -I. -I.. 
-I. -I.. -I/usr/local/include/senna -Wall -O3 -fno-strict-aliasing -g -O2 -MT 
index.lo -MD -MP -MF .deps/index.Tpo -c index.c  -fPIC -DPIC -o .libs/index.o
 gcc -D_REENTRANT -DSENNA_HOME=¥"/var/senna¥" -DNO_NFKC -DNO_MECAB -I. -I. -I.. 
-I. -I.. -I/usr/local/include/senna -Wall -O3 -fno-strict-aliasing -g -O2 -MT 
index.lo -MD -MP -MF .deps/index.Tpo -c index.c -o index.o >/dev/null 2>&1
if /bin/sh ../libtool --tag=CC --mode=compile gcc -D_REENTRANT -DSENNA_HOME=¥"
/var/senna¥" -DNO_NFKC -DNO_MECAB -I. -I. -I.. -I. -I.. -I/usr/local/include/s
enna   -Wall -O3 -fno-strict-aliasing -g -O2 -MT nfkc.lo -MD -MP -MF ".deps/nf
kc.Tpo" -c -o nfkc.lo nfkc.c; ¥
then mv -f ".deps/nfkc.Tpo" ".deps/nfkc.Plo"; else rm -f ".deps/nfkc.Tpo"; exi
t 1; fi
 gcc -D_REENTRANT -DSENNA_HOME=¥"/var/senna¥" -DNO_NFKC -DNO_MECAB -I. -I. -I.. 
-I. -I.. -I/usr/local/include/senna -Wall -O3 -fno-strict-aliasing -g -O2 -MT 
nfkc.lo -MD -MP -MF .deps/nfkc.Tpo -c nfkc.c  -fPIC -DPIC -o .libs/nfkc.o
 gcc -D_REENTRANT -DSENNA_HOME=¥"/var/senna¥" -DNO_NFKC -DNO_MECAB -I. -I. -I.. 
-I. -I.. -I/usr/local/include/senna -Wall -O3 -fno-strict-aliasing -g -O2 -MT 
nfkc.lo -MD -MP -MF .deps/nfkc.Tpo -c nfkc.c -o nfkc.o >/dev/null 2>&1
if /bin/sh ../libtool --tag=CC --mode=compile gcc -D_REENTRANT -DSENNA_HOME=¥"
/var/senna¥" -DNO_NFKC -DNO_MECAB -I. -I. -I.. -I. -I.. -I/usr/local/include/s
enna   -Wall -O3 -fno-strict-aliasing -g -O2 -MT snip.lo -MD -MP -MF ".deps/sn
ip.Tpo" -c -o snip.lo snip.c; ¥
then mv -f ".deps/snip.Tpo" ".deps/snip.Plo"; else rm -f ".deps/snip.Tpo"; exi
t 1; fi
 gcc -D_REENTRANT -DSENNA_HOME=¥"/var/senna¥" -DNO_NFKC -DNO_MECAB -I. -I. -I.. 
-I. -I.. -I/usr/local/include/senna -Wall -O3 -fno-strict-aliasing -g -O2 -MT 
snip.lo -MD -MP -MF .deps/snip.Tpo -c snip.c  -fPIC -DPIC -o .libs/snip.o
 gcc -D_REENTRANT -DSENNA_HOME=¥"/var/senna¥" -DNO_NFKC -DNO_MECAB -I. -I. -I.. 
-I. -I.. -I/usr/local/include/senna -Wall -O3 -fno-strict-aliasing -g -O2 -MT 
snip.lo -MD -MP -MF .deps/snip.Tpo -c snip.c -o snip.o >/dev/null 2>&1
if /bin/sh ../libtool --tag=CC --mode=compile gcc -D_REENTRANT -DSENNA_HOME=¥"
/var/senna¥" -DNO_NFKC -DNO_MECAB -I. -I. -I.. -I. -I.. -I/usr/local/include/s
enna   -Wall -O3 -fno-strict-aliasing -g -O2 -MT cache.lo -MD -MP -MF ".deps/c
ache.Tpo" -c -o cache.lo cache.c; ¥
then mv -f ".deps/cache.Tpo" ".deps/cache.Plo"; else rm -f ".deps/cache.Tpo"; 
exit 1; fi
 gcc -D_REENTRANT -DSENNA_HOME=¥"/var/senna¥" -DNO_NFKC -DNO_MECAB -I. -I. -I.. 
-I. -I.. -I/usr/local/include/senna -Wall -O3 -fno-strict-aliasing -g -O2 -MT 
cache.lo -MD -MP -MF .deps/cache.Tpo -c cache.c  -fPIC -DPIC -o .libs/cache.o
 gcc -D_REENTRANT -DSENNA_HOME=¥"/var/senna¥" -DNO_NFKC -DNO_MECAB -I. -I. -I.. 
-I. -I.. -I/usr/local/include/senna -Wall -O3 -fno-strict-aliasing -g -O2 -MT 
cache.lo -MD -MP -MF .deps/cache.Tpo -c cache.c -o cache.o >/dev/null 2>&1
if /bin/sh ../libtool --tag=CC --mode=compile gcc -D_REENTRANT -DSENNA_HOME=¥"
/var/senna¥" -DNO_NFKC -DNO_MECAB -I. -I. -I.. -I. -I.. -I/usr/local/include/s
enna   -Wall -O3 -fno-strict-aliasing -g -O2 -MT query.lo -MD -MP -MF ".deps/q
uery.Tpo" -c -o query.lo query.c; ¥
then mv -f ".deps/query.Tpo" ".deps/query.Plo"; else rm -f ".deps/query.Tpo"; 
exit 1; fi
 gcc -D_REENTRANT -DSENNA_HOME=¥"/var/senna¥" -DNO_NFKC -DNO_MECAB -I. -I. -I.. 
-I. -I.. -I/usr/local/include/senna -Wall -O3 -fno-strict-aliasing -g -O2 -MT 
query.lo -MD -MP -MF .deps/query.Tpo -c query.c  -fPIC -DPIC -o .libs/query.o
 gcc -D_REENTRANT -DSENNA_HOME=¥"/var/senna¥" -DNO_NFKC -DNO_MECAB -I. -I. -I.. 
-I. -I.. -I/usr/local/include/senna -Wall -O3 -fno-strict-aliasing -g -O2 -MT 
query.lo -MD -MP -MF .deps/query.Tpo -c query.c -o query.o >/dev/null 2>&1
if /bin/sh ../libtool --tag=CC --mode=compile gcc -D_REENTRANT -DSENNA_HOME=¥"
/var/senna¥" -DNO_NFKC -DNO_MECAB -I. -I. -I.. -I. -I.. -I/usr/local/include/s
enna   -Wall -O3 -fno-strict-aliasing -g -O2 -MT store.lo -MD -MP -MF ".deps/s
tore.Tpo" -c -o store.lo store.c; ¥
then mv -f ".deps/store.Tpo" ".deps/store.Plo"; else rm -f ".deps/store.Tpo"; 
exit 1; fi
 gcc -D_REENTRANT -DSENNA_HOME=¥"/var/senna¥" -DNO_NFKC -DNO_MECAB -I. -I. -I.. 
-I. -I.. -I/usr/local/include/senna -Wall -O3 -fno-strict-aliasing -g -O2 -MT 
store.lo -MD -MP -MF .deps/store.Tpo -c store.c  -fPIC -DPIC -o .libs/store.o
 gcc -D_REENTRANT -DSENNA_HOME=¥"/var/senna¥" -DNO_NFKC -DNO_MECAB -I. -I. -I.. 
-I. -I.. -I/usr/local/include/senna -Wall -O3 -fno-strict-aliasing -g -O2 -MT 
store.lo -MD -MP -MF .deps/store.Tpo -c store.c -o store.o >/dev/null 2>&1
/bin/sh ../libtool --tag=CC --mode=link gcc -Wall -O3 -fno-strict-aliasing -g 
-O2   -o libsenna.la -rpath /usr/local/lib -version-info 0:0:0 io.lo sym.lo se
t.lo inv.lo str.lo lex.lo index.lo nfkc.lo snip.lo cache.lo query.lo store.lo  
gcc -shared  .libs/io.o .libs/sym.o .libs/set.o .libs/inv.o .libs/str.o .libs/
lex.o .libs/index.o .libs/nfkc.o .libs/snip.o .libs/cache.o .libs/query.o .lib
s/store.o   -Wl,-soname -Wl,libsenna.so.0 -o .libs/libsenna.so.0.0.0
(cd .libs && rm -f libsenna.so.0 && ln -s libsenna.so.0.0.0 libsenna.so.0)
(cd .libs && rm -f libsenna.so && ln -s libsenna.so.0.0.0 libsenna.so)
ar cru .libs/libsenna.a  io.o sym.o set.o inv.o str.o lex.o index.o nfkc.o sni
p.o cache.o query.o store.o
ranlib .libs/libsenna.a
creating libsenna.la
(cd .libs && rm -f libsenna.la && ln -s ../libsenna.la libsenna.la)
make[2]: Leaving directory `/tst/module/InstallBin/senna-0.8.2/lib'
Making all in test
make[2]: Entering directory `/tst/module/InstallBin/senna-0.8.2/test'
if gcc -DHAVE_CONFIG_H -I. -I. -I.. -I. -I.. -I../lib -I/usr/local/include/sen
na    -g -O2 -MT ltest.o -MD -MP -MF ".deps/ltest.Tpo" -c -o ltest.o ltest.c; 
¥
then mv -f ".deps/ltest.Tpo" ".deps/ltest.Po"; else rm -f ".deps/ltest.Tpo"; e
xit 1; fi
/bin/sh ../libtool --tag=CC --mode=link gcc  -g -O2   -o ltest  ltest.o ../lib
/libsenna.la 
mkdir .libs
gcc -g -O2 -o .libs/ltest ltest.o  ../lib/.libs/libsenna.so -Wl,--rpath -Wl,/u
sr/local/lib
creating ltest
if gcc -DHAVE_CONFIG_H -I. -I. -I.. -I. -I.. -I../lib -I/usr/local/include/sen
na    -g -O2 -MT htest.o -MD -MP -MF ".deps/htest.Tpo" -c -o htest.o htest.c; 
¥
then mv -f ".deps/htest.Tpo" ".deps/htest.Po"; else rm -f ".deps/htest.Tpo"; e
xit 1; fi
/bin/sh ../libtool --tag=CC --mode=link gcc  -g -O2   -o htest  htest.o ../lib
/libsenna.la 
gcc -g -O2 -o .libs/htest htest.o  ../lib/.libs/libsenna.so -Wl,--rpath -Wl,/u
sr/local/lib
creating htest
if gcc -DHAVE_CONFIG_H -I. -I. -I.. -I. -I.. -I../lib -I/usr/local/include/sen
na    -g -O2 -MT itest.o -MD -MP -MF ".deps/itest.Tpo" -c -o itest.o itest.c; 
¥
then mv -f ".deps/itest.Tpo" ".deps/itest.Po"; else rm -f ".deps/itest.Tpo"; e
xit 1; fi
/bin/sh ../libtool --tag=CC --mode=link gcc  -g -O2   -o itest  itest.o ../lib
/libsenna.la 
gcc -g -O2 -o .libs/itest itest.o  ../lib/.libs/libsenna.so -Wl,--rpath -Wl,/u
sr/local/lib
creating itest
if gcc -DHAVE_CONFIG_H -I. -I. -I.. -I. -I.. -I../lib -I/usr/local/include/sen
na    -g -O2 -MT mtest.o -MD -MP -MF ".deps/mtest.Tpo" -c -o mtest.o mtest.c; 
¥
then mv -f ".deps/mtest.Tpo" ".deps/mtest.Po"; else rm -f ".deps/mtest.Tpo"; e
xit 1; fi
/bin/sh ../libtool --tag=CC --mode=link gcc  -g -O2   -o mtest  mtest.o ../lib
/libsenna.la 
gcc -g -O2 -o .libs/mtest mtest.o  ../lib/.libs/libsenna.so -Wl,--rpath -Wl,/u
sr/local/lib
creating mtest
if gcc -DHAVE_CONFIG_H -I. -I. -I.. -I. -I.. -I../lib -I/usr/local/include/sen
na    -g -O2 -MT stest.o -MD -MP -MF ".deps/stest.Tpo" -c -o stest.o stest.c; 
¥
then mv -f ".deps/stest.Tpo" ".deps/stest.Po"; else rm -f ".deps/stest.Tpo"; e
xit 1; fi
/bin/sh ../libtool --tag=CC --mode=link gcc  -g -O2   -o stest  stest.o ../lib
/libsenna.la 
gcc -g -O2 -o .libs/stest stest.o  ../lib/.libs/libsenna.so -Wl,--rpath -Wl,/u
sr/local/lib
creating stest
if gcc -DHAVE_CONFIG_H -I. -I. -I.. -I. -I.. -I../lib -I/usr/local/include/sen
na    -g -O2 -MT btest.o -MD -MP -MF ".deps/btest.Tpo" -c -o btest.o btest.c; 
¥
then mv -f ".deps/btest.Tpo" ".deps/btest.Po"; else rm -f ".deps/btest.Tpo"; e
xit 1; fi
/bin/sh ../libtool --tag=CC --mode=link gcc  -g -O2   -o btest  btest.o ../lib
/libsenna.la 
gcc -g -O2 -o .libs/btest btest.o  ../lib/.libs/libsenna.so -Wl,--rpath -Wl,/u
sr/local/lib
creating btest
if gcc -DHAVE_CONFIG_H -I. -I. -I.. -I. -I.. -I../lib -I/usr/local/include/sen
na    -g -O2 -MT hatenapo.o -MD -MP -MF ".deps/hatenapo.Tpo" -c -o hatenapo.o 
hatenapo.c; ¥
then mv -f ".deps/hatenapo.Tpo" ".deps/hatenapo.Po"; else rm -f ".deps/hatenap
o.Tpo"; exit 1; fi
/bin/sh ../libtool --tag=CC --mode=link gcc  -g -O2   -o hatenapo  hatenapo.o .
./lib/libsenna.la 
gcc -g -O2 -o .libs/hatenapo hatenapo.o  ../lib/.libs/libsenna.so -Wl,--rpath 
-Wl,/usr/local/lib
creating hatenapo
if gcc -DHAVE_CONFIG_H -I. -I. -I.. -I. -I.. -I../lib -I/usr/local/include/sen
na    -g -O2 -MT sniptest.o -MD -MP -MF ".deps/sniptest.Tpo" -c -o sniptest.o 
sniptest.c; ¥
then mv -f ".deps/sniptest.Tpo" ".deps/sniptest.Po"; else rm -f ".deps/sniptes
t.Tpo"; exit 1; fi
/bin/sh ../libtool --tag=CC --mode=link gcc  -g -O2   -o sniptest  sniptest.o .
./lib/libsenna.la 
gcc -g -O2 -o .libs/sniptest sniptest.o  ../lib/.libs/libsenna.so -Wl,--rpath 
-Wl,/usr/local/lib
creating sniptest
if gcc -DHAVE_CONFIG_H -I. -I. -I.. -I. -I.. -I../lib -I/usr/local/include/sen
na    -g -O2 -MT qtest.o -MD -MP -MF ".deps/qtest.Tpo" -c -o qtest.o qtest.c; 
¥
then mv -f ".deps/qtest.Tpo" ".deps/qtest.Po"; else rm -f ".deps/qtest.Tpo"; e
xit 1; fi
/bin/sh ../libtool --tag=CC --mode=link gcc  -g -O2   -o qtest  qtest.o ../lib
/libsenna.la 
gcc -g -O2 -o .libs/qtest qtest.o  ../lib/.libs/libsenna.so -Wl,--rpath -Wl,/u
sr/local/lib
creating qtest
make[2]: Leaving directory `/tst/module/InstallBin/senna-0.8.2/test'
make[2]: Entering directory `/tst/module/InstallBin/senna-0.8.2'
make[2]: Nothing to be done for `all-am'.
make[2]: Leaving directory `/tst/module/InstallBin/senna-0.8.2'
make[1]: Leaving directory `/tst/module/InstallBin/senna-0.8.2'
[root@neptune4 senna-0.8.2]# 
  • 問題なく終了.
  • インストールを行う.
[root@neptune4 senna-0.8.2]# make install
Making install in lib
make[1]: Entering directory `/tst/module/InstallBin/senna-0.8.2/lib'
make[2]: Entering directory `/tst/module/InstallBin/senna-0.8.2/lib'
test -z "/usr/local/lib" || mkdir -p -- "/usr/local/lib"
 /bin/sh ../libtool --mode=install /usr/bin/install -c  'libsenna.la' '/usr/lo
cal/lib/libsenna.la'
/usr/bin/install -c .libs/libsenna.so.0.0.0 /usr/local/lib/libsenna.so.0.0.0
(cd /usr/local/lib && { ln -s -f libsenna.so.0.0.0 libsenna.so.0 || { rm -f li
bsenna.so.0 && ln -s libsenna.so.0.0.0 libsenna.so.0; }; })
(cd /usr/local/lib && { ln -s -f libsenna.so.0.0.0 libsenna.so || { rm -f libs
enna.so && ln -s libsenna.so.0.0.0 libsenna.so; }; })
/usr/bin/install -c .libs/libsenna.lai /usr/local/lib/libsenna.la
/usr/bin/install -c .libs/libsenna.a /usr/local/lib/libsenna.a
ranlib /usr/local/lib/libsenna.a
chmod 644 /usr/local/lib/libsenna.a
PATH="$PATH:/sbin" ldconfig -n /usr/local/lib
----------------------------------------------------------------------
Libraries have been installed in:
   /usr/local/lib

If you ever happen to want to link against installed libraries
in a given directory, LIBDIR, you must either use libtool, and
specify the full pathname of the library, or use the `-LLIBDIR'
flag during linking and do at least one of the following:
   - add LIBDIR to the `LD_LIBRARY_PATH' environment variable
     during execution
   - add LIBDIR to the `LD_RUN_PATH' environment variable
     during linking
   - use the `-Wl,--rpath -Wl,LIBDIR' linker flag
   - have your system administrator add LIBDIR to `/etc/ld.so.conf'

See any operating system documentation about shared libraries for
more information, such as the ld(1) and ld.so(8) manual pages.
----------------------------------------------------------------------
make[2]: Nothing to be done for `install-data-am'.
make[2]: Leaving directory `/tst/module/InstallBin/senna-0.8.2/lib'
make[1]: Leaving directory `/tst/module/InstallBin/senna-0.8.2/lib'
Making install in test
make[1]: Entering directory `/tst/module/InstallBin/senna-0.8.2/test'
make[2]: Entering directory `/tst/module/InstallBin/senna-0.8.2/test'
make[2]: Nothing to be done for `install-exec-am'.
make[2]: Nothing to be done for `install-data-am'.
make[2]: Leaving directory `/tst/module/InstallBin/senna-0.8.2/test'
make[1]: Leaving directory `/tst/module/InstallBin/senna-0.8.2/test'
make[1]: Entering directory `/tst/module/InstallBin/senna-0.8.2'
make[2]: Entering directory `/tst/module/InstallBin/senna-0.8.2'
test -z "/usr/local/bin" || mkdir -p -- "/usr/local/bin"
 /usr/bin/install -c 'senna-cfg' '/usr/local/bin/senna-cfg'
test -z "/usr/local/include/senna" || mkdir -p -- "/usr/local/include/senna"
 /usr/bin/install -c -m 644 'senna.h' '/usr/local/include/senna/senna.h'
make[2]: Leaving directory `/tst/module/InstallBin/senna-0.8.2'
make[1]: Leaving directory `/tst/module/InstallBin/senna-0.8.2'
[root@neptune4 senna-0.8.2]# 
  • インストールされているライブラリを確認する.
[root@neptune4 senna-0.8.2]# ls -lat /usr/local/lib
total 628
drwxr-xr-x    2 root     root         4096 Dec 21 15:37 .
-rw-r--r--    1 root     root       338662 Dec 21 15:37 libsenna.a
-rwxr-xr-x    1 root     root          799 Dec 21 15:37 libsenna.la
lrwxrwxrwx    1 root     root           17 Dec 21 15:37 libsenna.so -> libsenna.so.0.0.0
lrwxrwxrwx    1 root     root           17 Dec 21 15:37 libsenna.so.0 -> libsenna.so.0.0.0
-rwxr-xr-x    1 root     root       280208 Dec 21 15:37 libsenna.so.0.0.0
drwxr-sr-x   16 root     root         4096 Dec 20 11:39 ..
[root@neptune4 senna-0.8.2]# 
  • インストール終了.

3.ライブラリの登録

  • sennaのライブラリは/usr/local/libにインストールされているが,これをライブラリパスに反映させる.
  • まず,現在の/etc/ld.so.confを確認する.
[root@neptune4 senna-0.8.2]# cat /etc/ld.so.conf
/usr/kerberos/lib
/usr/X11R6/lib
/usr/lib/qt-3.1/lib
[root@neptune4 senna-0.8.2]#
  • /usr/local/libが無い.
  • 内情対で,検索してみる.
[root@neptune4 senna-0.8.2]# /sbin/ldconfig -p|grep senna
[root@neptune4 senna-0.8.2]#
  • 何も見つからない.
  • パスを追加する.
[root@neptune4 senna-0.8.2]# echo '/usr/local/lib' >> /etc/ld.so.conf 
[root@neptune4 senna-0.8.2]# cat /etc/ld.so.conf
/usr/kerberos/lib
/usr/X11R6/lib
/usr/lib/qt-3.1/lib
/usr/local/lib
[root@neptune4 senna-0.8.2]#
  • 編集内容を反映させる.
[root@neptune4 senna-0.8.2]# /sbin/ldconfig
[root@neptune4 senna-0.8.2]# 
  • ライブラリを検索してみる.
[root@neptune4 senna-0.8.2]# /sbin/ldconfig -p|grep senna
        libsenna.so.0 (libc6) => /usr/local/lib/libsenna.so.0
        libsenna.so (libc6) => /usr/local/lib/libsenna.so
[root@neptune4 senna-0.8.2]#
  • これで終了.

4.環境設定を行う

  • ディレクトリを作成する.
[root@neptune4 admin]# mkdir -p /var/senna/log
[root@neptune4 admin]# 
  • 今回は,インデックス作成をSJISで行うので,エンコーディングをsjisで設定する.
[root@neptune4 admin]# echo DEFAULT_ENCODING sjis > /var/senna/senna.conf
[root@neptune4 admin]# cat  /var/senna/senna.conf
DEFAULT_ENCODING sjis
[root@neptune4 admin]#
  • デフォルトはEUC.他にutf8を指定することができる.

おまけ

コピペ用
export LANG=C
tar xvf senna-0.8.2.tar.gz
cd senna-0.8.2
./configure  --disable-nfkc --without-mecab
make
make install
echo '/usr/local/lib' >> /etc/ld.so.conf 
/sbin/ldconfig
/sbin/ldconfig -p|grep senna
mkdir -p /var/senna/log
echo DEFAULT_ENCODING sjis > /var/senna/senna.conf


広告スペース
Google