2012年6月22日星期五

安装cdec

http://cdec-decoder.org/index.php?title=Building_cdec_from_source

1) 安装git
sudo apt-get install git-core

2) git clone git://github.com/redpony/cdec.git
Connection timed out
改用 git clone https://github.com/redpony/cdec.git

3) 进入cdec目录
autoreconf -ifv

./configure --with-boost=/usr/local/boost_1_48_0/ --with-cmph=/home/ldd/toolkit/cmph-1.1-cdyer/cmph-1.1 --with-eigen=/usr/local/include/eigen3
(执行此步前安装boost, libcmph-1.1Eigen)

出错:

checking for flex... no
checking for lex... no
configure: error: No lex (Flex, lex, etc.) program found
安装flex,  sudo apt-get install flex


make


mac下需要安装autoconf, automake, cmake, libtool

最后编译时提示:
configure: WARNING: unrecognized options: --with-eigen
是不是不用去安装eigen??
默认安装boost时, 路径为--with-boost=/usr/local/include/, 而不是--with-boost=/usr/local/include/boost
在./configure时, 不设置--enable-mpi, 否则会提示新的错误ld: library not found for -lboost_mpi