Under Solaris, Toba can be built using either Sun C or GCC.
To use Sun C, ensure that /opt/SUNWspro/bin/cc is the first
cc in the search path.
To use GCC, ensure that gcc is in the search path.
The Irix and Linux implementations expect to find cc in the search path.
Depending on the system, between 50 megabytes (on Linux) and 75 megabytes (other systems) of disk space are needed to build Toba. The size of the JDK package is not included in this amount.
Two packages are needed to build Toba: the Java Developers Kit, originally from Sun, and Toba itself, from Arizona. If you haven't done so already, download these now.
Get version 1.0.2 of the Java Developers Kit (JDK) from:
NOTE! An older release of the 1.0.2 JDK for
Solaris had an API implementation that is not compatible with
Toba's runtime library. If you get compile errors while building
runtime/lang_UNIXProcess.c then you will need to get
the latest 1.0.2 JDK release from
java.sun.com.
Get Toba from www.cs.arizona.edu.
Uncompress and untar Toba using a one of these commands:
zcat toba.tar.Z | tar xf -
gzcat toba.tar.gz | tar xf -
Unpacking Toba produces a directory named toba_1.0.b6,
which again can be moved or renamed.
This directory will be called the "main Toba directory"
in subsequent discussion.
To build Toba you need to have the java compiler and interpreter
in your path and you must have your CLASSPATH set to
include the standard classes. If you have not done this already,
enter the following commands, replacing /path/to/JDK with
the full path to the java directory of the JDK package:
% set jdk = /path/to/JDK
% set path = ( $path $jdk/bin )
% setenv CLASSPATH $jdk/lib/classes.zip:$jdk/classes
in a csh-like shell, or
$ jdk=/path/to/JDK
$ PATH=$PATH:$jdk/bin
$ CLASSPATH=$jdk/lib/classes.zip:$jdk/classes
$ export PATH CLASSPATH
in a Bourne-like shell. Once the path and classpath have been
set properly you are ready to build Toba.
Change to the main Toba directory. Set the configuration link for your
system with one of these commands:
If you wish to build for a different system, see the porting page. Several additional configuration files have been provided in the configs directory.
./setup irixfor Irix ./setup linuxfor Linux ./setup solarisfor Solaris using Sun C ./setup solaris_gccfor Solaris using GCC
Once the configuration links set up, just type make.
The build process may take as long as an hour,
depending on the speed of the machine.
The Toba classfile translator is small and builds quickly;
most of the time is spent translating and compiling the
Java application library (API), the compiler (javac) and
the AWT (BISS). Note that there may be long periods of
time where there is no output sent to the screen while large
C compiles are being performed.
When make finishes, the build is complete.
This can be confirmed by entering
make test
to compile and execute a simple Java program that prints
the values of some system properties.
Toba can be run by adding the bin directory to your search path.
Usage instructions are given on a separate page.
It may be desirable to install the Toba "binaries" somewhere other than the directory in which they were built. The usual term "binaries" is somewhat a misnomer in this case; we use it to mean the minimal set of files needed to use Toba, although some of these are readable source files.
To copy this minimal set, create a new directory and enter
make install INSTALL=directory
substituting the actual directory name.
The "binaries", totaling about 50 MB, will be copied into
subdirectories of this directory.
The installation process re-links several programs
to update the embedded shared library pointers.
The bin subdirectory should be added to search paths
to use Toba.