Download and unpack the source of Thrax version 1.2.2 or newer.
See what options configure provides:
Since I need the static libraries, I added this option:
I also enabled the command line binaries:
and the readline library in the rewrite tester:
You have to have the complete OpenFST library compiled and installed on your system. Thrax depends on some more extensions that are not compiled with the default configuration of OpenFST. Follow the instructions on the blog post how to compile OpenFST.
I also set the environment variable for Windows with Cygwin. In particular the library path information seems to be necessary since the make process might stop with the message that it cannot find libfst and libfstfar:
export CXXFLAGS=”-O -D_POSIX_SOURCE -L/usr/local/lib -I/usr/local/include”
My complete configure command in the thrax-1.2.2 folder:
./configure –enable-static –enable-bin –enable-readline
To avoid issues with undefined ACCESSPERMS in the file thrax-1.2.2/src/lib/util/utils.cc you can add these three lines of code below the include statements (for example below line 31):
#ifndef ACCESSPERMS #define ACCESSPERMS (S_IRWXU|S_IRWXG|S_IRWXO) #endif
To compile Thrax run:
Then follow up with a:
On Mac OSX or Linux you might want to prepend a sudo to the command above.
That was it.