This document explains how to compile the Amaya environment (Amaya binary and Amaya schemas compilers) from the distributed source tree.
Here is the content of this document:
sed
,
awk
and cpp
should be available.
Here is a simple recipe explaining how to build using autoconf:
gunzip -c /tmp/amaya-src-xxx.tar.gz | tar xvf -
this will create a Amaya subtree of approximately 13 MBytes.
cd Amaya mkdir obj cd obj ../configure
Configure accepts 4 specific parameters allowing to select packages to be compiled:
--with-amaya Build the Amaya HTML browser/editor --enable-java Add Kaffe Java virtual machine --enable-plugin Add Netscape Plug-Ins support
Java (network accesses are done using libWWW) and Plugins are not available by default. To compile Amaya with Plugins, use the following:
../configure --enable-plugin
To compile Amaya with Java support, you need to retrieve the Amaya-java source distribution. Then, you need to type the following:
../configure --enable-javaThis creates all the Makefiles needed and generate an Options.orig file containing all the variable which can be tuned. For example one can just change the CFLAGS values. Be careful, autoconf usually set up the debug flag "-g" which tends to generate very big library and binaries.
With -g the obj tree can grow up to 100 MBytes while without it it won't use more than 20 MBytes.
It also gives some hints on how the source tree is configured.
make all
It is strongly recommended to use GNU make, which may not be the default make on your system. In this case try:
gmake all
or
gnumake all
The compilation process can take a fair amount of time, 10 minutes at least.
You can test the result immediately by launching Amaya binary built in the bin directory:
bin/amaya
make install
By default, links to binaries are installed in /usr/local/bin, binaries and data are in /usr/local/thot. This can be overrided by specifying different values for prefix(es) using configure command line options in step 2.
Ultimately, if you're not satisfied with your current Amaya installation, you can clean up with:
make uninstall
All the Makefile(s) build in the object tree are generated by configure script and Makefile.in templates found in the source tree. It generates a main Makefile at the top of the object tree and a set of Makefiles in most of the directory of the object tree. The main Makefile accepts the following targets:
Amaya/
obj /bin
.
One can also go to a specific sub-directory in the object tree and launch make from that place. It will rebuild all the objects pertaining to this directory.
Next section try to give some hint on debugging errors at compile-time.
Errors may append at different stages in the compilation process. Here is a small checklist:
Amaya/
obj
directory doesn't work. This means that the step 1 or 2 of the previous section failed.
Amaya/
obj
directory ?
Amaya/
obj /Options.
www-amaya@w3.org
mailing-list. Please check first the archive, the error may
have been already reported.
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 obj . 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.
Amaya/
obj /Makefile
.
Amaya/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.
Amaya/amaya/HTML.STR
, Amaya/amaya/HTMLP.PRS
...
Amaya/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.