Dear Moses,
I'd like people to test a new build system based on Boost Jam
before we scrap the existing one based on autotools. To compile moses,
run one command:
./bjam
in the top-level Moses directory. It will install binaries into dist
and legacy locations moses-cmd/src/moses and
moses-chart-cmd/src/moses_chart.
You do not need bjam or boost-build installed; it will compile bjam
locally if you do not have it. There are a number of options you can
use, most of which match those you've been passing to ./configure or make:
Language models
--with-irstlm=/path/to/irstlm
--with-srilm=/path/to/srilm
--with-randlm=/path/to/randlm
KenLM is always compiled.
--with-xmlrpc-c=/path/to/xmlrpc-c for libxmlrpc-c (used by server)
Note that, like language models, this is the --prefix where the library was
installed, not some executable within the library.
--notrace compiles without TRACE macros
--install=/path/to/install sets the install directory (default dist).
--git appends the git revision to the install directory name.
By default, the build is multi-threaded, optimized, and statically linked.
Pass these to change the build:
threading=single|multi controls threading (default multi)
variant=release|debug|profile builds optimized (default), for debug, or
for profiling
link=static|shared controls linking (default static)
debug-symbols=on|off include (default) or exclude debugging information
also known as -g
Controlling the build process:
-a to build from scratch
-j$NCPUS to compile in parallel
--clean to clean
This help is also available by running ./bjam --help.
There are two ways to deal with non-standard Boost installs.
First, and more clean, is to add it to search paths with i.e. this bash:
PREFIX=/non/standard/prefix
export PATH="$PREFIX/bin${PATH:+:$PATH}"
export LD_LIBRARY_PATH="$PREFIX/lib${LD_LIBRARY_PATH:+:$LD_LIBRARY_PATH}"
export LIBRARY_PATH="$PREFIX/lib${LIBRARY_PATH:+:$LIBRARY_PATH}"
export CPATH="$PREFIX/include${CPATH:+:$CPATH}"
Second is to compile Boost then set BOOST_ROOT to the directory you
compiled it in.
One annoying property is that it won't remember command-line
options from one invocation to the next. Might cook something up to
address this, but you can always stuff your favorite options in a shell
script.
Kenneth
_______________________________________________
Moses-support mailing list
[email protected]
http://mailman.mit.edu/mailman/listinfo/moses-support