Build MKSearch with GCJ

The MKSearch system is designed to be compatible with the GNU Compiler for Java (GCJ). These notes explain how to compile the system using a set of bash scripts. All source is available from the MKSeach Subversion repository.

These notes cover both native GNU/Linux systems and Cygwin under Windows.

Environment settings

The MKSearch build and execute scripts use variable substitution to run from an arbitrary installation directory. It is assumed that the MKSearch source is installed in a single base directory and reflects the original structure of the project in the Subversion repository.

Before running the scripts, four environment variables must be set, see the instructions below.

GNU/Linux environment settings

You can set these properties in your .bash_profile script for instance:

 export mk_build=/home/mksearch/build
 export mk_home=/home/mksearch
 export CLASSPATH=/usr/share/java/libgcj-3.4.1.jar

Exit your current session and log in again to apply the changes. To check the settings have been applied, use the env command piped through less:

$ env | less

Use the down key to scroll down. You should see two lines that look like this:

mk_build=/home/mksearch/build
mk_home=/home/mksearch
CLASSPATH=/usr/share/java/libgcj-3.4.1.jar

Press Q to exit less.

Library compilation

The MKSearch project is built on top of a number of supporting Java libraries, some of which have been modified to compile with GCJ. The modified source is in the /lib-src directory, which has sub-directories for each main library: GNU JAXP, JSpider, JTidy, GNU Servlet and Sesame.

These libraries are compiled and assembled into Java zip archives (JAR) in the /lib directory. All supporting libraries can be compiled from a single script, $mk_home/bin/jar-library.sh, which calls a separate script for each.

MKSearch compilation

After you have compiled and archived the supporting library packages, the script $mk_home/bin/jar-mksearch.sh can be used to compile the MKSeach application code base. The compiled classes are archived to $mk_home/dist/mksearch.jar.

Document Links

JPackage on FC3
A guide to the installation of the Java compatibility package for GCJ
http://mksearch.mkdoc.org.archived.website/howto/jpackage-fc3/
This document was last modified on 2005-03-30 07:55:15.
Copyright MKDoc Ltd. and others.
The Free Documentation License http://www.gnu.org/copyleft/fdl.html