Toba can be built using the system C compiler or GCC. Your
make
program must support an include facility, and the ability
to incrementally update macros (e.g., CFLAGS += -DIRIX
). GNU make
satisfies these requirements, and has additional features required for
building BISS-AWT. To unpack the BISS archives, you'll need unzip, and to unpack
the bnlib and zlib distributions you'll need gzip. To
build BISS, you'll need a version of patch that can handle directory-style
patch files; GNU patch
should work. These should all be available on most Linux systems; other
platforms may need to have them added.
The build process, especially when including BISS-AWT, is something of a space hog; it would be best to have at least 50MB of free disk space available, much more if you enable debugging.
Before you decide to build a system with BISS enabled, please note that we cannot provide support for problems that you encounter with such a system.
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.1 of the Java Developers Kit (JDK) from:
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.1
. 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/classesin a csh-like shell, or
$ jdk=/path/to/JDK $ PATH=$PATH:$jdk/bin $ CLASSPATH=$jdk/lib/classes.zip:$jdk/classes $ export PATH CLASSPATHin a Bourne-like shell. Once the path and classpath have been set properly you are ready to build Toba.
Toba uses Unix-style Makefiles to control the build, with system-specific
options set in a file that is included at the top of each Makefile. The
system-specific include file is created through the configure
script, which has one required and several optional arguments.
linux
, solaris
, or irix
.
--with-biss
: Compile with BISS AWT library support (tested with linux and solaris only)
--jdk-source-dir=
path_to_jdk_source : Where Java class file sources live (for biss)
--with-gcc
: Compile with GNU cc
--with-threads
: Compile with system-dependent thread support
--with-debug
: Compile with debuggable libraries (this
will increase your disk space needs dramatically)"
--with-jit
: Compile with just-in-time compiler support
(linux only)"
--with-jdk-pre116
: if you're using a JDK release prior to
1.1.6, steps need to be taken in the build process to replace some Sun
class files."
--with-threads
. Options
can be turned off by changing the option prefix from --with
to
--nowith
. Some standard configuration settings are:
./configure solaris --with-gcc ./configure linux ./configure linux --with-jit --with-biss ./configure irixIf you are building BISS, you may have to use the
--jdk-source-dir
configuration option to specify the path to
your JDK class source files. The default is
/usr/local/jdk1.1/src
.
Several additional packages are required by Toba. The source code to
these packages is included in the Toba distribution in its original
unmodified format; the configuration process automatically unpacks the
sources and configures them for your system. The unpacked auxiliary files
can be removed by running make distclean
.
Note: If you have the GNU C compiler installed, it would be good to
use --with-gcc
. Several of the auxiliary packages use the GNU
autoconf system, will detect the presence of gcc, and will use it to build
those packages. This can result in unresolved symbols when the resulting
packages are linked using the system (non-GNU) compiler.
If you wish to build for a different system, see the porting page. Several additional configuration files have been provided in the configs directory.
When you have configured Toba, just type make
.
The build process may take as long as several hours,
depending on the build options and the speed of the machine (for reference,
a full build with JIT and BISS-AWT requires about a half hour on a 400MHz
Pentium II).
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.
Irix note: The Irix operating system imposes a limit (the value of
the ncargs
kernel variable; 20 kilobytes by default) on the
total length of arguments that can be passed on a command line. Depending
on certain options, the list of class file names required of the 1.1 API can
exceed this limit, causing things like "ls *.h" to fail during the build
process. As parts of the build scripts are rewritten during development, we
are attempting to work around this limitation, but as yet there are still
places where a build may fail.
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 20MB
without BISS and 40MB with BISS, 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.