Approximately 30 megabytes of disk space are needed to build Toba, including 8 megabytes for the JDK.
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 Linux implementation expects to find cc in the search path.
Two packages are 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.
For Solaris: Get Version 1.0.2 of the Java Developers Kit (JDK) from java.sun.com.
For Linux: Get Version 1.0.2 of the JDK from www.blackdown.org. It comes in two parts that depend on the system configuration.
Get Toba from www.cs.arizona.edu.
On Solaris, uncompress and untar the JDK using a command such as this:
zcat JDK-1_0_2-solaris2-sparc.tar.Z | tar xf -
On Linux, unpack both parts of the JDK to produce a combined directory:
zcat linux.jdk-1.0.2-pl2.common.tar.gz | tar xf -
zcat linux.jdk-1.0.2-pl2.static-motif.tar.gz | tar xf -
On either system, unpacking produces a directory named java
,
which can be moved or renamed if you wish.
Nothing more than unpacking the tar file is needed. You need not build or configure the JDK in any way.
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.b4
,
which again can be moved or renamed.
This directory will be called the "main Toba directory"
in subsequent discussion.
In the main Toba directory, create a symbolic link named jdk
that points to the JDK directory.
If there is already a symbolic link named jdk
, delete it first.
If you have unpacked both Toba and the JDK in the current directory, the commands would be something like this:
cd toba_1.0.b4
rm -f jdk
ln -s ../java jdk
No further configuration is needed. Change to the main Toba directory and enter one of these commands:
make solaris
for Solaris using Sun C make solaris-gcc
for Solaris using GCC make linux
for Linux
The build process may take anywhere from fifteen minutes to 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) and compiler (javac).
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 5 MB, will be copied into seven
subdirectories of this directory.
The installation process re-links two programs
to update the embedded shared library pointers.
In the installed directory, create another symbolic link
to the JDK, again named jdk
.
You may also wish to check and adjust permissions.
The bin
subdirectory should be added to search paths
to use Toba.