HOWTO Build AngbandTk on Unix

System Requirements

You need a working X server, including headers and libs, as well as a working compiler (GCC is good, but others might work). Your monitor must be set to either 8-, 16- or 24-bit color depth. No other resolutions are supported. Note that performance at 16-bit is much better than 24-bit, so 16-bit is preferred. With 8-bit you get the best performance and also get transparency, although the screen colors may jump around. Also, your Unix system must be one which supports Tcl and Tk.

Required Files

You need the full sources to Tcl/Tk 8.3.2 from here:

You need these files from the eGroups site:

You need at least one of these:

Optional Files

You have 2 choices for playing sound. The sound support is fully optional, so you will want to get AngbandTk working before trying them. Only one of OpenAL or SDL is required, not both. You may want to try more recent versions of these libraries if any are available.

To use OpenAL you need this:

To use SDL Mixer, you need both of these:

Unpacking the files

You can pick any directory on your system (probably somewhere under your Home directory) to unpack the files to. We'll call this directory ROOT.

Create a directory ROOT/tcltk8.3.2. Extract tcl8.3.2.tar.gz and tk8.3.2.tar.gz into this directory. This will create two directories called tcl8.3.2 and tk8.3.2. Unpack into ROOT. This creates a directory CommonTk.
: Unpack into ROOT. This creates a directory dbwin.
: Unpack into ROOT. This creates a directory jam-2.2.5.
: Unpack into ROOT. This creates a directory JamTk.
: Unpack into ROOT. This creates a directory TclZip.
: Unpack into ROOT. This creates a directory TkHTML.

Extract the game archive(s) into ROOT:
: Unpack into ROOT. This creates a directory AngbandTk.

You should now have a directory layout like this:


Build Tcl and Tk

This is the easiest part, using Configure and Make. The reason for the tcltk8.3.2 directory is to keep all the installed Tcl files separate from the rest of your system. This should avoid conflicts with any other versions of Tcl on your system.

Enter the tcl8.3.2/unix directory, and enter these commands at the command prompt:

    ./configure --prefix=ROOT/tcltk8.3.2
    make install

Replace ROOT with the full pathname of that directory. On my system this is:

    ./configure --prefix=/home/tnb/tcltk8.3.2

Now enter the tk8.3.2/unix directory, and enter these commands (Yes, they are the same as above).

    ./configure --prefix=ROOT/tcltk8.3.2
    make install

There should now be four new directories under ROOT/tcltk8.3.2/ -- bin, lib, include and man -- where Tcl and Tk are installed. Do not rearrange or rename any of these files, or move them anywhere else.

Using JamTk

JamTk is a GUI project builder I hacked together just for building AngbandTk on Linux. Jam is a build tool I prefer to use instead of Make, and Jam is used by JamTk to build AngbandTk etc. Start JamTk using the ROOT/tcltk8.3.2/bin/wish8.3 program:

cd ROOT/JamTk
ROOT/tcltk8.3.2/bin/wish8.3 main.tcl

Take a look at the file for an example of doing this with a shell script. It is very important to always start JamTk using the version of wish you built above. You could add the ROOT/tcltk8.3.2/bin/ directory to your PATH if you wanted.

JamTk should be a no-brainer to use, although 100 things could go wrong, ha-ha. The basic idea is to choose a project from the Build menu and click the Build button (or type Control+B, or select the Build menu entry).

When you first run JamTk, it will tell you that you need to build Jam and Execit. From the Build menu select Jam, then click the Build button. (This will run the Makefile in the ROOT/jam-2.2.5 directory, and copy Jam into the JamTk/bin directory. You don't need to know all that; it should be automatic). If that worked, select Execit from the Build menu, and click the Build button.

Be sure to read the messages in the main window. If you find a problem you can't fix, save the output with the "Save As..." menu entry and send an email to the mailing list (

Build AngbandTk

If by some miracle all that worked, you are now ready to build AngbandTk. Choose AngbandTk from the Build menu and click the Build button. This will automatically build the "Dbwin (Lib)", "Common", "AngbandTk", "Dbwin (Tcl)", "Sound (No Card)", "TclZip", and "TkHTML" projects in that order. See below if you want sound support.

Running AngbandTk

Just run AngbandTk/angband without any arguments. There are some problems with the X window manager which is the reason some windows jump all over the screen. You should run AngbandTk in a terminal window so you can catch any messages it prints out.

Sound - OpenAL (optional)

AngbandTk can use the OpenAL sound library. Create a directory ROOT/openal. Extract openal-*.tar.gz into ROOT/openal.

    cd ROOT/openal/openal/linux
    ./configure --prefix=ROOT/openal
    make install

This will build and install in ROOT/openal/lib. Choose "Sound (OpenAL)" from the Build menu and click the Build button. When you run AngbandTk, click the Setup button and choose OpenAL for sound.

Sound - SDL Mixer (optional)

AngbandTk can use the SDL Mixer sound library. Create a directory ROOT/SDL. Extract SDL-*.tar.gz and SDL_mixer-*.tar.gz into ROOT/SDL. Now build and install them:

    cd ROOT/SDL/SDL-1.1.4
    ./configure --prefix=ROOT/SDL
    make install
    cd ROOT/SDL/SDL_mixer-1.0.6
    ./configure --with-sdl-prefix=ROOT/SDL --prefix=ROOT/SDL
    make install

Choose "Sound (SDL)" from the Build menu and click the Build button. When you run AngbandTk, click the Setup button and choose SDL for sound.


Send any comments and problem reports to the mailing list Any patches needed for your system are also welcome.