Building cdec from source

From cdec Decoder

Jump to: navigation, search

This page gives a basic summary of how to acquire and build cdec. You should be familiar with building and installing software on Unix-like platforms before proceeding.

Contents

Quick start

Cdec is hosted at github. Checking out the code and building it looks something like this:

mkdir cdec
cd cdec
git init
git pull git://github.com/redpony/cdec.git
autoreconf -ifv
./configure --with-srilm=/path/to/srilm-1.5.9 --with-boost=/path/to/boost [--enable-gtest]
make

Software dependencies

Platforms / compilers known to be compatible

  • Linux on 64-bit platforms with gcc 4.1, 4.3, 4.4
  • MacOSX on Intel 32 bit with gcc 4.0

Other platforms may work, but these are the ones that development has been done with.

Build issues on Mac OS X with tr1/hashtable

Many versions of Mac OS X include a version of g++ that contains a bug in one of the constructors of the STL's hashtable code. To build cdec, you will need to fix this bug. Download the patched version of tr1/hashtable here. The following assumes that the file was saved to ~/Downloads/hashtable, replace that by the actual file location (note that your browser might have rename hashtable to hashtable.txt). (Optional) Check how minimal the change is:

diff  ~/Downloads/hashtable /usr/include/c++/4.0.0/tr1/hashtable

Overwrite Apple's version with the patched version and restore file permissions and ownership:

sudo cp -f ~/Downloads/hashtable /usr/include/c++/4.0.0/tr1/hashtable
sudo chmod 644 /usr/include/c++/4.0.0/tr1/hashtable
sudo chown root:wheel /usr/include/c++/4.0.0/tr1/hashtable
Personal tools