The best way now to compile Amaya from sources is to use autoconf. Here are the information concerning the old build process which may be useful if autoconf make failed or if one already use the old building process.
This document explains how to compile the Amaya environment (Amaya binary and Thot schemas compilers) from the distributed source tree and on one of the platforms . In the following we will use Target for the platform nickname (e.g. solaris2 for a Sun workstation running Solaris 2.5). Adding support to for a new achitecture is explained in the porting section.
Here is the content of this document:
The complete source tree must have been set-up accordingly to the source distribution installation instructions.
sed
,
awk
and cpp
should be available.
Here is a simple recipe explaining how to build on one of the supported target:
Thot
/Target directory.
Makefile.orig
file to Makefile
. Edit the
first top lines to change THOTDIR
to the base of the current
Amaya tree e.g:
THOTDIR=$(HOME)/Thot
AMAYA_OPTIONS
selected
for libWWW:
AMAYA_OPTIONS = -DCOUGAR
AMAYA_LIBS =
AMAYA_LINK = -lwww
And that the options selecting Java are commented out.
libwww.a
, libjpeg.a
, libpng.a
and libz.a
as well as the config.h
file describing
the Target. If these files are lacking, fetch the appropriate
thot-libs-Target-xxx.tar.g distribution file and install it.
make
make amaya
Time for a comfortable coffee break (take 12 mn. on a 200 MHz Pentium-Pro).
This will create a subtree of Thot/Target, similar in it's
shape with the source one and populate it with the object resulting of the
make. The binaries and libraries produced are stored in the
Thot/
Target/bin
directory.
If everything went well, the following files should be available in the
Thot/
Target/bin
directory:
One can test the resulting Amaya binary by starting
bin/amaya
from the shell.
The Thot/makes
directory contains a few important files related
to Amaya compilation process:
Thot/
Target/Makefile
and is also
automatically generated. CommonMake includes
Make.depends.
Thot/
Target/bin/mkdep
used to generate the dependencies.
xxx_f.h
located in the
Thot/thotlib/internals/f
, Thot/batch/f
and
Thot/amaya/f
directories. We use a modified version of
cextract-1.7 to generate these headers from the function definition found in
the C files. If not present the
Thot/
Target/bin/cextract
binary is
built on the fly.
As explained above, the Makefile found in the Thot/Target
directory consists of a few options related to the corresponding platform and
include Thot/makes/CommonMake
containing all the make rules. Here
is a description of all the main make targets found in the
CommonMake and hence available when typing make from
Thot/Target directory:
Thot/
Target/bin
.
Here are the steps done when starting make
in the
Thot/
Target directory:
Makefile
,
../makes/CommonMake
, ../makes/Make.files
and
../makes/Make.depends
, if the latests are non-existent it tries
to rebuild them and stop.
Thot/
Target/bin
,
Thot/
Target/thotlib/base
, etc.
Thot/
Target/bin/libThotKernel.a
from subset of the Thot/thotdir
sources. This involve compiling
the C files, creating the archive with ar and running ranlib against the
archive.
Thot/
Target/bin/libThotEditor.a
from the Thot/thotdir
sources. This involve compiling the C
files, creating the archive with ar and running ranlib against the archive.
Next steps are related to the make amaya execution:
Thot/amaya/HTML.S
describing the structure schema of an HTML
document. This produce the Thot/amaya/HTML.STR
file.
.PRS
files from the HTMLP.P
presentation schema.
Thot/amaya/HTMLT.T
to
HTMLT.TRA
. This direct the generation of an HTML file from the
Thot internal represenation of the document.
HTML.A
describing the HTML specific
user interface of Amaya into the HTML.h
header,
the HTMLAPP.c
code and a prototype file
HTMLactions.proto
for the interface callbacks (the actual file
used is HTMLactions.c
).
EDITOR.A
describing the generic
user interface of Amaya into the EDITOR.h
header, the EDITORAPP.c
code, the EDITORdialogue ressource file
and a prototype file EDITORactions.proto
for the interface
callbacks (the actual file used is EDITORactions.c
).
Thot/amaya
directory to
objects.
Next section try to give some hint on debugging errors at compile-time.
Errors may append at diffferent stages in the compilation process. Here is a small checklist:
Thot/
Target
directory doesn't work. This means that the step 1 or 2 of the previous section failed.
Thot/
Target
directory ?
Thot/
Target/config.h
file
present ? If not, fetch the the appropriate
thot-libs-
target-xxx.tar.gz
distribution file and install it.
../makes/Make.files
and ../makes/Makes.depends
files present ? If not, make will try to build them but with some versions of
make this is not
possible. In this case, cd to ../makes
and type
make rebuild ; make depend
to rebuild both files. Go back in the Thot/Target directory and restart make.
Thot/
Target/Makefile
.
www-amaya@w3.org
mailing-list. Please check first the archive, the error may
have been already reported.
On an unsupported platform see the document on porting to an new platform
ldd bin/app
#!/bin/sh exec `gcc --print-prog-name=cpp` $*
touch ../amaya/*.S
touch ../amaya/*.A
make amaya
libjpeg.a
, libpng.a
and libz.a
for the Target. If these files are lacking, fetch the
appropriate
thot-libs-
target-xxx.tar.gz
distribution file and install it.
file libwww.a
nm libwww.a
should not print any errors
make libjpeg
make libpng
make libwww
In case of problem building the WWW library, please check it's installation instructions. Compiling the graphic libraries should be quite straightforward.
Thot/
Target/Makefile
.
Thot/amaya/EDITOR.A
that the section USES does not refer to
Lookup. If needed, remove it, and restart
make amaya
This is related to the input of ISO-Latin-1 sequences in Motif dialog boxes.
www-amaya@w3.org
mailing-list. Please check first the archive, the error may
have been already reported
Here is a few rules to check if the amaya binary just produced does not start:
ldd bin/amaya on Suns or Linux
chatr bin/amaya on HP's
should print all the shared libraries needed by amaya and the path to the corresponding libraries in the system.
Thot/amaya/HTML.STR
, Thot/amaya/HTMLP.PRS
.
Thot/config/thot.ini
is present.
If everything seems Ok, one can debug the problem by using a system call tracer like truss on Solaris or strace on Linux. Check for syscalls errors near the end of the system trace dump.
All the remaining technics to find out what's wrong are software debugging
methods, for this of course one need to recompile the binary with debug option
enabled, and use a debugger program to see what's happening exactly. Once a
bug has been identified, please report it to the Amaya
development Team, by sending the error to the www-amaya@w3.org
mailing-list. Please check first the archive, the error may
have been already reported. Of course, sending a contextual diff of the
modified files may help correcting the problem, and have it patched on next
release.
You might want to try to build the Amaya with Java version. In these case follow the specific instructions for compiling Amaya with Java.