Omegahat Installation from Anonymous CVS

This is a preliminary guide to installing different parts of omegahat from the source retrieved from CVS. This is significantly less well tested than installation from the binary distributions. and is intended to be used by people who are interested in tracking the source dynamically. For those not familiar with CVS, there is more information at the following sites: The CVS repository is currently updated daily, but this may be done more frequently if there is sufficient interest.

First of all, we strongly suggest using Java 2. And you will definitely require a version of GNU make. Wherever we use the command make, it is assumed to refer to the GNU make executable..

CVS Root

For all of this, we will assume that you have logged in to CVS repository via the following command
 cvs -d :pserver:anoncvs@www.omegahat.org:/home/anoncvs/src/omegahat login
It will prompt for a password and you reply with
   anonymous
You can then set the environment variable CVSROOT to
  :pserver:anoncvs@www.omegahat.org:/home/anoncvs/src/omegahat
or specify it in each cvs command via the -d argument.
 cvs -d :pserver:anoncvs@www.omegahat.org:/home/anoncvs/src/omegahat operation
Also, most cvs commands can augmented with a -z3, or some other suitable value to turn on compression. For those with slow connections, this might be useful.

Checkout or Update

The first time you retrieve the code, you will use the CVS checkout (co) command. First, checkout the top-level module. It is vital that this be done within a directory named org/ (to satisfy the Java package mechanism).
 mkdir org
 cd org
 cvs checkout omegahat
 cd omegahat
 setenv OMEGA_HOME `pwd` # or export OMEGA_HOME=`pwd`
It is probably a good idea to set the OMEGA_HOME in your .login or shell initialization script.

Now, we get the individual modules. For example, the following command gets all of them. Remove entries from the list as you want.

 cvs checkout Environment DataStructures Models Graphics Numerics Interfaces JTools S R LispStat Simulation
Alternatively, you can use the rules in the GNUmakefile (having edited the configuration files, modules.nw, etc.)
  make checkout
(assuming make is a version of the GNU make utility.)

If you have alread checked out the different modules, from within the org/omegahat/ directory (i.e. OMEGA_HOME), issue the command

  cvs update
or, update individual modules, e.g.
  cvs update Models
Note that when you update, it is recommended that you compile all the classes again. You can do this easily with
  make clean cleanJava
  make

To find out which modules will be compiled, issue the command

  make listModules
in the top-level directory $OMEGA_HOME/ If you want to change this list, edit the MODULES file (or preferrably the modules.nw file which will be automatically rebuilt).

Installation Requirements

You will need several 3rd party Jar files to compile the interactive interpreter, and a few others to build the CORBA facilities. It is simplest to install them in the directory
OMEGA_HOME/Jars/
A complete list is given below. Those jar files needed for the interpreter are: For the CORBA material, download the Jar files from Orbacus.

Configuration

Almost without exception, you will have to modify the configuration parameters for the compilation of the class files. First, move to the Config directory. Issue the command make. This builds the file local.config amongst several others that are build by inclusion. Now, you should edit this file, uncommenting settings that are incorrect and editing the right hand side of the definition to a value appropriate for your system. The most likely variables you will have to set are JAVA_HOME, identifying the directory containing the Java distribution on your machine, JAVA2, indicating whether you are using Java2 (set this to true if you are) and WEB, providing the name of the executable for running notangle, the noweb converter to source code. If notangle is in your path, you need not doing anything. For an explanation of the different variables, see Omegahat Configuration Variables.

Executables

To run an omegahat session, you generally need the omegahat shell script. (You can of course embed any of the classes in another application.) Having built the class files, you should create the scripts. Move to the directory $OMEGA_HOME/bin and issue the command
 make
(Alternatively, you can issue the command gmake scripts from the $OMEGA_HOME/ directory.) At this point, you should have an omegahat

Installing omegahat Script

Most people will initially set the OMEGA_HOME environment variable in their login/shell initialization scripts. One can also add the directory $OMEGA_HOME to ones path so that the omegahat script can be invoked without a qualifying directory name.

In order to make the installation available for other users, one may want to move the If one want

Requirements

  • GNU make.
    Not even a prayer of compiling the code without this!
  • Norman Ramsey's Noweb
    The source is available from one of the mirrors one of the mirrors
  • Java
    To successfully compile all the classes, you will need Java2. Without this, you will not have the Collections package. Because we do not use a pre-processor in Java, it is hard to create a distribution that compiles under both. Unfortunately, the BasicEvaluator and some of the expression classes in Environment/Parser/Parse now rely on these in a few simple places.

    The files that cause the problems are

    • FunctionCall, BasicExpression and Name in Environment/Parser/Parse/
    • numeric in Environment/DataStructures
    • BasicFactorLevelSet in Environment/DataStructures
    • BasicServerPool, HomogeneousServerTaskManager, DistributedTaskManager in Interfaces/CORBA/TaskManagement.
    You can simply change the references to the collection classes to the standard ones (java.util.Vector). We might create patches for these files to modify the few places necessary.

    Obtain this from the usual sources:

    In theory, one can use a different Java compiler and JVM. We have experimented with guavac and jikes and kaffe and japhar. See JVM links.

    If anyone succeeds in compiling and/or running a version on a different machine, or with different tools, please let us know. We will add this to the list of known working combinations.

  • Antlr
    A lexer & parser generator tool from Terrance Parr at the Magelang Institute. antlr.jar
  • Jas
    A Java package for byte-code generation from sbktech. jas.jar
  • JHelp
    JHelp system from Sun.
  • The XML module is optional, but requires either of the libraruesXML from Sun or IBM.
    Specify the location of either of these packages via the XML_CLASSES variable in local.config.
  • CORBA Interface

  • CORBA
    Orbacus Jar files.

  • Duncan Temple Lang <duncan@research.bell-labs.com>
    Last modified: Fri Nov 26 08:35:02 PST 2004