Installing OpenLogos on Ubuntu 9.04/9.10
An excellent installation guide for OpenLogos has been provided by
Torsten Scheck here
(German only). It applies well to Ubuntu Linux distributions from
version 5.X to at least versions 7.X. A test with Ubuntu-9.10 revealed
Fortunately, there are easy solutions to overcome these problems.
- The runtime distribution of OpenLogos (openlogos-1.0.3.tar.gz)
will not compile out of the box with the 4.4 versions of the GCC
compiler suite that come with Ubuntu-9.10 because of some
- The G77 package that is needed for the compilation
apparently is not available for Ubuntu-9.10 through the package manager.
Compiling the runtime system
The problems with the GCC version and the missing G77 package can be
solved by installing a previous version of GCC in parallel to the 4.4
versions by following the hints of http://0x5f.blogspot.com/2009/10/install-g77-in-ubuntu-904-jaunty.html.
That's it. "make"
make install" now should work fine. You might remove the
"hardy" repository again from /etc/apt/sources.list.
- Edit the file /etc/apt/sources.list
(e.g. by executing a "sudo
gedit /etc/apt/sources.list" command) and add the
lines that refer to the Ubuntu-8.04 repository:
##add hardy to sources.list
deb http://hu.archive.ubuntu.com/ubuntu/ hardy universe
deb-src http://hu.archive.ubuntu.com/ubuntu/ hardy universe
deb http://hu.archive.ubuntu.com/ubuntu/ hardy-updates universe
deb-src http://hu.archive.ubuntu.com/ubuntu/ hardy-updates universe
- In a terminal execute:
sudo apt-get update
sudo apt-get install g77 g++-3.4
After that you will have the 3.4 version of the GCC compiler suite
available that fits the Openlogos sources. In the same way install the
other required additional packages as described by Torsten Scheck, e.g.
apt-get install sun-java6-jdk unixodbc unixodbc-dev postgresql
- To tell the 'configure' script to use the GCC-3.4 compilers
rather than the default 4.4 compilers, the configure command
in the openlogos-1.0.3 directory now looks like (correct the Java-SDK
path if you installed it at another place):
CPP=cpp-3.4 CXX=g++-3.4 F77=g77
The description of Torsten Scheck for installing the OpenLogos database
is still valid for PostgreSQL-8.4.
But some commands for initalizing the OpenLogos database might produce
confusing messages. So here are some additional hints.
- Prepare the
Cluster: If you installed PostgreSQL through the
Ubuntu package manager
most probably you will have to recreate
the PostgreSQL cluster for the ESENSE database to
get rid of wrong locale settings as also described in Torsten Scheck's
instructions. If the Postgres-server is running the server must be
stopped before dropping and recreating the cluster. Either stop the
Postgres server explicitly by executing
sudo /etc/init.d/postgresql-8.4 stop
or use the '--stop' option with the 'pg_dropcluster'
sudo pg_dropcluster --stop 8.4 main
- After creating a new cluster by
LC_COLLATE=C LC_CTYPE=C sudo pg_createcluster 8.4 main
restart the server by
sudo /etc/init.d/postgresql-8.4 start
- Creating the
Database: When the ESENSE database for OpenLogos is
created, the simple createdb -E LATIN1 ESENSE
command might complain about an incompatible character encoding for template1 (SQL_ASCII). In that
case use a slightly extended command specifying template0 as basis
for the ESENSE database:
sudo createdb -T template0 -E LATIN1 ESENSE
To improve performance, it
is recommended to run vacuumdb
with the analyze
after the database has been restored from the dump to initialize the
Postgres planner by
sudo vacuumdb -z -U logos -W ESENSE
A new problem with Postgresql-8.4 showed up in the runtime system due
some data type coercion problem that can result in translation output
with sometimes missing whitespace between words or strange markers
within the text. If running the "testapi/testolgs.sh" program after compilation and installation of the runtime system, the following error message probably appeared:
[unixODBC]ERROR: operator does not exist: character = double precision at character 117;
Error while executing the query
Command: select stem_number, ending from pat_table where language_code = ? and pat_number = ? and number_code = ? and person_code = ? and tense_code = ?)
The PostgreSQL-8.4 patch solves the problem with this error message. Just install that patch as described in the README file of that archive.