W3CAmaya Doc

Compiling Amaya Sources with Autoconf

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:

  1. Prerequisite
  2. How to build
  3. More info on the make files
  4. More info on the build process
  5. If make failed
  6. If amaya binary doesn't work

Prerequisite:

How to build in 4 steps:

Here is a simple recipe explaining how to build using autoconf:

  1. Install your source code tree:
    gunzip -c /tmp/amaya-src-xxx.tar.gz | tar xvf -

    this will create a Amaya subtree of approximately 13 MBytes.

  2. Create a subtree (obj) for object and launch configure to create the Makefile(s):
    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-java
     
    This 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.

  3. Build everything:
    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
  4. If amaya binary seems fine you can install it:
    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

More info on the make files

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:

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.

If make failed:

Errors may append at different stages in the compilation process. Here is a small checklist:

If amaya binary doesn't work:

Here is a few rules to check if the amaya binary just produced does not start:

  1. Check that the shared libraries needed by amaya are found on the system. The command

    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.

  2. Check that the amaya compiled schemas are present, namely Amaya/amaya/HTML.STR, Amaya/amaya/HTMLP.PRS...
  3. Verify that the main registry file 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.


Irène Vatton

$Date: 1999/05/07 14:05:43 $