Jikes with Cygwin
What is Cygwin?
Cygwin is a POSIX emulation layer for Windows. It works with Windows
95, 98, NT, W2K. Cygwin is free software and is licensed under the GPL.
Cygwin is a powerful POSIX environment, you will not need all its features
if you are only interested in building a Jikes binary for Win32.
Compiling for Win32
page if you are interested in a minimal compilation environment
A Cygwin executable is able to make use of Windows style
C:\foo or Unix style
Cygwin programs rely on
cygwin1.dll for this
functionality, it must be accessible on the
It is not possible to create a pure Win32 version of Jikes with
Cygwin, the generated
jikes.exe will depend on
How do I install Cygwin?
Cygwin provides a simple GUI installer that automatically
downloads the Cygwin packages and installs them.
All you need to do is download the installer and run it.
Download the Cygwin Installer
The first step is to create a directory where the
downloaded Cygwin files will be saved. This is not
the directory Cygwin will be installed in,
it is just used the save the downloaded files.
Our example install will use the
The next step is to download the installer
and save it in the
The installer can be downloaded from one of the many
Cygwin Mirror Sites.
Your download time will be shorter if you select a mirror close to you.
The installer is named
setup.exe, it should
appear in a directory like
Users located in the U.S. may want to use this mirror in CA:
Watch out! You may have problems behind a firewall that
does not allow active FTP sessions. Netscape running
under Windows NT may appear to "get stuck" downloading
a file via FTP. If you are having this problem, try a
HTTP based download of setup.exe.
Run the Cygwin Installer
Double click on the
setup.exe installer you just downloaded
and choose the Install from Internet option. Press the Next button
and you will be asked for a Local package directory.
The default value should be
directory the installer was saved in. Since this is the directory
you want to save downloaded packages in, you can simply press the
Next button to accept the default.
You should now see the Select install root directory dialog.
This is the directory Cygwin will be installed into, the directory
you enter here will be mapped to the
/ root directory
in Cygwin applications. Avoid using a directory name that contains
spaces if possible. Our example install will use
D:\Cygwin as the root directory.
The default for the file type (Unix) is what most users would want.
If you are installing under NT as the Administrator, you can use
the install for All option to make Cygwin available to all
users. If you are installing as a normal user, you will want
to use the Just me setting. Press Next to continue.
You will be presented with network connection options.
Most folks will want to choose the Direct Connection
option. If you are behind a firewall, you may want to
select the Use IE Settings option so that the installer
will use the connection properties from Internet Explorer
(assuming it's setup correctly). Otherwise, you may need to
manually enter your sites Use HTTP/FTP proxy options.
You are now presented with a Cygwin mirror list. If you
don't know which mirror is closest to you, the
ftp.freesoftware.com is a reasonable default.
Once the mirror is selected, a dialog box displays the packages
available in the Cygwin distribution. You will have to decide
which packages to install. Be sure to install the compiler and
libiconv if you want to build Jikes with encoding support.
Once the package list is selected, press Next to start the
download and install process.
Once the installer has downloaded and installed all the packages,
it will ask if you want to create a start menu entry and
a desktop shortcut.
We suggest adding the start menu entry,
it would be installed as:
Start > Programs > Cygnus Solutions > Cygwin Bash Shell
Selecting this menu option will start the Cygwin bash shell.
UNIX users will already be familiar with the shell interface.
Windows users should not fear, bash is basically the same as
a DOS prompt except that it supports Cygwin paths and TAB
completion. To learn more about bash see the following
Compiling Jikes under Cygwin
This section explains how to build a Jikes executable which will run under
the Cygwin environment.
What is "a Cygwin Jikes" ? It means that the generated
jikes.exe depends on Cygwin components to run, and
more specifically on
cygwin1.dll: it will run only
on Win32 systems where Cygwin is installed and available in the
PATH, or when run from a Cygwin shell.
The build environment configuration and build process are quite
straightforward, as everything is detected automatically for you:
$ cd ~/jikes
checking build system type... i686-pc-cygwin
checking host system type... i686-pc-cygwin
config.status: creating Makefile
Now build jikes.exe by running make:
g++ -o jikes.exe jikes.o ...
$ cd src/
(C) Copyright IBM Corp. 1997, 2001.
Debugging Jikes with gdb
If you are interested in debugging your Cygwin Jikes, you can use
the Insight GUI front end to GDB:
That will start up Insight in GUI mode. If you want to run in plain
gdb command line mode just use: