This pages describes how to get TOM running on a system using Tesla as the TOM compiler. If you already have a working
TOM environment but want to switch to Tesla as the compiler, remove all
things TOM before proceeding.
All links on this page that point to software point to stable snapshots
of the source code; you can get the same functionality by using them from
the TOM CVS repository.
Before attempting to create a Tesla-based system, get rid of any and
all remains of an old (tomc-based) TOM installation or make sure
they are fully inaccessible. This means you must remove:
If you are using the Debian TOM packages, TOM can be removed by the command
- TOM libraries in
libC, and possibly
- TOM include files in
- TOM library units in
- the old TOM tools (tomc, tomr, and gi) in
- the TOM makefiles in
# dpkg -r tom libtom2 libtom2-dev
To build Tesla, you need the following:
- GNU make
- depending on your target you may need GNU CC (gcc or egcs) to build
the TOM run time library
- from the TOM CVS repository,
check out the following modules (or fetch the stable snapshots, but those are less
bleedin' edge than the sources in CVS):
- containing the TOM standard libraries,
- containing the TOM makefiles (mark II),
- and, finally, the Tesla bootstrap, containing all necessary C code to build Tesla
for a 32-bit machine.
In what follows,
/my/dir/bootstrap is the path where the
Tesla bootstrap sources have been extracted and
is the path to the TOM library sources. Furthermore, in the prompt of
the example commands it is visible in which of the packages a subsequent
command is executed. A prompt that includes a hash (`#') indicates that
more than the usual privileges may be necessary. Output of the commands
is not shown.
The net result of all these steps is an installed TOM tool chain and
makefiles. The tools are linked to static TOM libraries. To create a
fully working environment, you need to compile and install the following
- Configure and install the
tom-makefiles$ ./configure --prefix=/PREFIX
tom-makefiles# make install
tom$ ./configure --prefix=/PREFIX
- Compile the TOM Run Time library, directing the C compiler to the
bootstrap code, creating only the static library.
tom$ cd trt
tom$ make CFLAGS=-I/my/dir/bootstrap libtrt.a
- Configure the Tesla bootstrap sources. (In this example,
TOM_ROOT=/my/dir/tom is Shell syntax to set the environment
setenv when you are
bootstrap$ TOM_ROOT=/my/dir/tom ./configure --prefix=/PREFIX
- Compile Tesla bootstrap.
- Install the Tesla bootstrap.
bootstrap# make install
This installs the programs
(unit file generator), and
tig (interface generator).
- This library defines the builtin types. It currently is part of the
bootstrap package, but its use will probably vanish in the future. For
now, just install it.
bootstrap$ cd _builtin_
bootstrap# make install
- the TOM standard libraries, which you have already configured.
tom# make install
This phase is the first time the bootstrapped tools are invoked. Since
the bootstrap C code was created on a different machine, with a different
configuration --prefix, it is quite likely that your --prefix differs.
This will result in messages like:
unable to locate resource `map' of encoding `iso-8859-1'
can't find encoding named `iso-8859-1'
These messages are generated by the TOM library and will be generated by
every TOM program. To solve the problem, and make the TOM library find
its resources, you can pass the following library option to every
- the TOM parser generator and skeleton library
gp$ ./configure --prefix=/PREFIX
gp# make install
- the TOM meta unit of TOM parsers
mu$ ./configure --prefix=/PREFIX
mu# make install
- the TOM compiler. You have already built this in the bootstrap, but
it should be rebuilt since the one resulting from the bootstrap is
statically linked to the mu library and the gp skeleton library. In
addition, the bootstrap libraries lag in bug fixes, as the bootstrap need
only be good enough to bootstrap Tesla.
tesla$ ./configure --prefix=/PREFIX
tesla# make install
This page last modified: $Id: install.shtml,v 1.16 2000/05/07 19:37:24 tiggr Exp $