Jikes Developer FAQ Jikes




To compile Jikes, you'll need a shell, GNU make and a C++ compiler.


Build environment configuration

Jikes uses an autoconf/automake script, configure, to automatically detect the capabilities of your platform, and set the appropriate compiler flags. The configure script is available at the root of the Jikes source tree.

This script will run several tests and basically creates two important files:

  • config.h: contains the flags set by the script. This file is included when compiling (used to enable the appropriate #ifdef sections in the source code).
  • Makefile: created where you invoke the configure script. Used by the make tool to compile Jikes.

The easiest way to configure the build environment is to invoke the configure script from the jikes root directory: the Makefile will be created in this same directory, and the config.h file in the src/ directory.

in the root dir of Jikes:


If the configure script does run properly or crashes, it produces a log file (config.log) that you can use to see what test failed or crashed. It's especially useful when trying to compile Jikes on a new platform which is not properly handled by the script and which requires extra parameters. It's also a good starting point when posting about configure-related problems in the mailing list.


Configure script arguments

The configure script accepts many possible arguments, most of which you will never use. A complete list of possible argumets will be printed if you pass the --help argument to the configure script. The most frequently used configure options are:

--prefix=[install directory]
--enable-debug (enables debug build)
--host=[host platform]
CXX=[C++ compiler]
CXXFLAGS=[C++ compiler flags]


Building in a different directory

If you want to have the object files (.o) and jikes executable created in a separate directory (cleaner to separate source code and object files; also useful when having more than one build configuration), just go to the wanted directory and invoke the configure script from there. The files will be created under this directory, including the Makefile that you'll invoke later.


C++ Namespaces support

Jikes source code is C++ namespace compliant, which means that compilers which allow namespaces can be used to compile Jikes. This is normally automatically detected by the configure script, but you can force it by specifying the following additional parameter if not properly detected:

./configure HAVE_NAMESPACES=1


In addition to this, an extra parameter may be needed depending on your compiler and your needs: when switched on, every class, method and variable is declared inside the Jikes namespace (useful if one of Jikes-defined names collide with an external library, or if your compiler is a bit touchy about namespaces):

./configure --enable-jikes-namespace


Note: --enable-jikes-namespace must not be specified if your compiler does not support namespaces (or if configure did not detect its supports it and you did not force it as shown above by using HAVE_NAMESPACES), or you'll get nasty compiling errors ;o)


Building Jikes

Once the configure script has finished, the jikes executable can be built using the make command. If GNU make is installed as gmake on your system, use it instead of make in the following instructions.

(jikes executable is generated in src/ directory)


The most commonly used make targets are:

make clean (remove executable and .o files)
make distclean (remove all generated files)
make install (install into --prefix dir)
make install-strip (install without debug symbols)