Building Chocolate Doom on Linux

From Chocolate Doom

Chocolate Doom on Linux
Enlarge
Chocolate Doom on Linux

Building Chocolate Doom on Linux is fairly straightforward.

Table of contents

Setting up a build environment

Before Chocolate Doom can be built, a working build environment needs to be set up. The following packages need to be installed:

  1. gcc, the GNU C Compiler
  2. wget
  3. Development libraries for the X Window system - may be called 'libx11-dev', 'x-devel' or similar.

The way to install these differs according to your distribution. On many systems these are standard components that are installed by default when you install the system. If not, you should install them using the package system for your distribution.

Ubuntu/Debian

Type the following command:

sudo apt-get build-dep libsdl1.2

Gentoo

As everything Gentoo is compiled, a complete build environment is already present. You can skip this step.

Fedora Core

SuSE

Building Chocolate Doom

From this point, there is a simple script that will build Chocolate Doom and its' dependencies automatically. Simply type:

 wget http://www.chocolate-doom.org/build-chocolate-doom -O - | sh

Chocolate Doom will be built in your home directory in ~/chocolate-doom. Copy a Doom IWAD file here (doom.wad, doom1.wad, doom2.wad, tnt.wad or plutonia.wad), then type:

cd ~/chocolate-doom
./chocolate-doom

Gentoo

Gentoo users can use ebuild instead. Chocolate doom ebuild is located in Sunrise overlay. Just add Sunrise overlay to your tree, add

games-fps/chocolate-doom 

to your /etc/portage/package.unmask file and

<games-fps/chocolate-doom-9999

to your /etc/portage/package.keywords file and finally:

emerge -av chocolate-doom

BSD and other Unix systems

The above instructions should also work on FreeBSD, OpenBSD, NetBSD and other Unix systems. If you succeed in getting Chocolate Doom running on a new system, please add a screenshot to the Screenshots page. If you have trouble, feel free to join #chocolate-doom (irc://irc.oftc.net/chocolate-doom) on IRC to ask for help.

Common problems

MIDI music / lockups 
Linux's native MIDI output is poor and can cause the game to lock up. You can work around this by disabling music output in chocolate-setup. It's possible to get decent MIDI output by installing Timidity.