Amaya W3C

About Amaya

Download Amaya

Mailing Lists


Project Contributors

Compiling Amaya Sources with Autoconf

The Amaya project is no longer maintained by W3C.




This document explains how to compile the Amaya environment (schemas compilers and the binary) 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


How to build

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

  1. If you have downloaded the source tar file, you have to create Amaya, redland, wxWidgets, Mesa and libwww subtrees with one of the following commands:
    • gunzip -c /tmp/amaya-sources-xxx.tgz | tar xvf-
    • tar xzvf /tmp/amaya-sources-xxx.tgz
  2. If you are compiling on 64-bit platform, you have to change the current Mesa configuration file:

    In the source directory Mesa/configs/ overwrite the current file with a copy of linux-x86-64-static (or a more appropriated configuration file).

  3. Create a subdirectoryfor your platform under the Amaya directory (e.g. WX)
  4. cd to this subdirectory, then ../configure to create the Makefile(s).

    Configure accepts some specific parameters allowing to select packages to be compiled:

          --prefix=path             parent directory of the Amaya directory
                                    used by amaya script to launch the binary
                                    (by default /usr/local)
          --enable-system-raptor    use the system libraptor (recommanded)
          --enable-system-libwww    use the system libwww (not recommanded
                                    WebDAV doesn't work with system libwww
          --with-wxdebug            build wxWidgets lib with debug informations
          --with-debug              build Amaya with debug informations (-g -DAMAYA_DEBUG)
          --disable-svg             build Amaya without SVG support
          --disable-annot           build Amaya without Annotations support
          --disable-generic-xml     remove Generic XML support

    Configure creates all the Makefiles needed and generates a file Options.orig containing all the variable which can be tuned.

    If an Options file exists it's not modified by configure, but it's used by make. This allows you to keep your previous options when you do a new configure.

  5. Edit the Options file as needed. If it doesn't exist edit the Options.orig file.

    For example one can just change the CFLAGS values.

    With -g the obj tree can grow up to 100 MBytes while without it it won't use more than 20 MBytes.

    The Options (or Options.orig) file also gives some hints on how the source tree is configured.

  6. 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", or "gmake MAKE=gmake all", or "make SHELL=/usr/bin/bash"

    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:

  7. If amaya binary seems fine you can install it:

    By default, links to binaries are installed in /usr/bin, binaries and data are in $PREFIX/Amaya. This can be overridden 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:


More info on the make files

All the Makefile(s) build in the object tree are generated by configure script and 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 subdirectory in the object tree and launch make from that place. It will rebuild all the objects pertaining to this directory.

If make failed

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

If the 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/unix-thot.rc is present.
  4. You can debug the problem by using a system call tracer like truss on Solaris or strace on Linux strace amaya).

All the remaining techniques for finding out what's wrong are software debugging methods. For this you will need to recompile the binary with the debug option enabled (--with-debug), 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 mailing-list. But first please check the archive as the error may have been already reported. Of course, sending a contextual diff of the modified files may help in correcting the problem, and having it patched in the next release.

Irčne Vatton
Date: 2009-06-30

Copyright  ©  1994-2007 INRIA and W3C® (MIT, ERCIM, Keio), All Rights Reserved. W3C liability, trademark, document use and software licensing rules apply. Your interactions with this site are in accordance with our public and Member privacy statements.