Installation from source follows standard GNU autoconfigure installation procedures (that is,
the usual ./configure && make && make install
stuff).
Installing from source is slower and harder, but it will work in any Linux box, even if you have library versions different than those required by the .deb package.
You'll need to install the C++ compiler:
sudo apt-get install build-essentialIn Debian, use the same command as root, without sudo. In other distributions, check the distribution package manager to install a working C++ compiler.
Many of the required libraries are standard packages in all Linux distributions. Just open your favorite software package manager and install them.
Package names may vary slightly in different distributions. See section 2.1 for some hints on possible package names.
As an example, commands to install the packages from command line in Ubuntu and Debian are provided, though you can do the same using synaptic or a similar manager.
If you have another distribution, use your package manager to locate and install the appropriate library packages (see section 2.1).
sudo apt-get install libpcre3-dev
sudo apt-get install libdb4.6++-dev
sudo apt-get install libboost-dev
In Ubuntu Hardy packages are organized slightly different:
sudo apt-get install libboost-filesystem-dev libboost-program-options-dev libboost-graph-dev
In Ubuntu Lucid, you need to install:
sudo apt-get install libboost-filesystem1.40-dev libboost-program-options1.40-dev
NOTE: Alternatively, you can install the libraries above from
source. Don't do that unless you know what you're
doing. Having more than one installation of libdb or libpcre may
confuse the compiler and cause errors when compiling FreeLing,
unless you master how to appropriately set paths for your compiler,
linker, and loader.
However, if you want to do so, follow the
installation instructions in the source packages for those
libraries. All of them use the standard ./configure && make &&
make install procedure. In the case of BerkeleyDB, you have to
build C++ support using the -enable-cxx option with ./configure.
tar xzvf libfries-1.2.tar.gz ./configure make sudo make install
tar xzvf libomlet-1.0.1.tar.gz ./configure make sudo make install
Omlet&Fries libraries are contained in the files libomlet.so and libfries.so, installed by default in /usr/local/lib (or /usr/lib if installed from binary package). If you are a developer, you need to know that libfries.so contains the classes storing linguistic information, which are described in section 4.1.1.
tar xzvf FreeLing-2.2.tar.gz ./configure make sudo make install
Note that if you (or the library package) install some libraries or headers in non-standard directories (that is, other than /usr/lib or /usr/local/lib for libraries, or other than /usr/include or /usr/local/include for headers) you may need to use the CPPFLAGS or LDFLAGS variables to properly run the ./configure script when compiling FreeLing.
For instance, if you installed BerkeleyDB from a rpm
package, the db_cxx.h header file may be located at /usr/include/db4 instead of the default /usr/include. So,
if ./configure complains about not finding the library
header, you'll have to specify where to find it, with something like:
./configure CPPFLAGS='-I/usr/include/db4'
FreeLing library is entirely contained in the file libmorfo.so installed in /usr/local/lib by default.
Sample program analyze is installed in /usr/local/bin. See sections 2.3 and 5 for details.
Lluís Padró 2010-09-02