Special offer for friends of jfritsch. Get $5 off any subscription plan if you accept our free trial today

Navigate Pages

Version 42, last updated by bughunter2 at Aug 05 22:15 UTC

Compiling

A guide to compiling Gambit on Unix-like operating systems

1. Requirements

  • Qt4 (including development headers, link libraries, qmake, and uic)
  • Boost (>= version 1.42.0)
  • CMake (>= version 2.6.0)
  • Make
  • GCC and G++ (>= version 4.2.0) (currently the only officially supported compilers)
  • Apache Subversion
  • GNU Chess (currently a requirement because chess engines aren't yet configurable)

For information on how to install these packages on popular package-based distributions, see Requirements.

Also, in case any of these packages are not available on your system (or only older versions than required), please compile them from source. There are a few guides on how to do that available on this wiki: see Building Boost and Building CMake.

2. How-to

First, start a terminal, and change the current directory to the directory where you want to put the Gambit source code (it will get its own 'gambit' subdirectory in that directory). From there, execute the following command:

svn co https://gambitchess.svn.sourceforge.net/svnroot/gambitchess/trunk gambit

Then, download the 'gambit-update_build_run.sh' script and put it wherever you want (note that you may want to keep the script in case you also want to compile Gambit at a later time, for example to see how development of the game progresses). Then, edit the script, and modify the line that reads 'GAMBIT_DIR=$HOME/Desktop/gambit' so that it points to the correct Gambit source code directory (leave the 'GAMBIT_DIR=' prefix as-is). The Gambit source code directory should be equal to 'DIRECTORY/gambit', where 'DIRECTORY' is the directory you've changed to before executing the 'svn co' command.

Now, change the directory to the directory where the 'gambit-update_build_run.sh' resides. After that, type the following command:

sh gambit-update_build_run.sh

And with that, it should build and run Gambit.