1.5 Installing ChessDB to a UNIX/Linux computer from the source code

  1. Check if you have tcl and tk installed. These come with most systems, but not all. You can check whether they are installed, and the version with:
    $ tclsh
    % info patchlevel
    8.4.13
    You need tcl version 8.4 or later. If you don't appear to have Tcl, it may be there in a non-standard directory - you might have to hunt to find it.
  2. Download the ChessDB source code from Sourceforge. The source code is a compressed tar file. Tar files have the extension .tar and when compressed .tar.gz. All source distributions of ChessDB will be in a file like ChessDB-3.6.4.tar.gz,
  3. Decompress and untar the source code, which being a .tar.gz file, can be done as
    $ gzip -d ChessDB-3.6.4.tar.gz
    $ tar xvf ChessDB-3.6.4.tar
    If you use GNU tar, you can decompress and extract the .tar.gz file in one operation with:
    $ tar xvfz ChessDB-3.6.4.tar.gz
    but the 'z' option is a GNU extension.
  4. Change to the directory where ChessDB is and configure it, which will create Makefile.
    $ cd ChessDB-3.6.4
    $ ./configure
  5. If the configure script can't find your tcl/tk installation, you will need to edit the Makefile. There are some comments in the Makefile about this, with typical setting for many common systems.
  6. If necessary, edit the installation path in the Makefile, which will have been created by the configure script. If you type 'make install', it will attempt to install to /usr/local, which will require root access to write to. So if you don't have root access, just edit the Makefile to install it somewhere else. For example
    BINDIR = /home/my_home_directory/bin
    SHAREDIR = /home/my_home_directory/share/chessdb
    or similar.
  7. Next, the software must be built. You may find it necessary to use GNU make and gcc. These are known to work. Sun's make for example will not work. I've not tried other versions of make. But the gnu C compiler and gnu make will work. There are numerous GNU specific compiler flags, so you would have to remove them if you want to use another compiler. I hope to fix compiler dependencies at some point, as gcc generates slower code than Sun's C++ compiler. (Yes, I develop ChessDB on a Sun).
    $ make
    There should be no warning messages with gcc.
  8. Finally the code can be installed.
    $ make install

That should have the code installed. Run the program and check it works.

If you would like to contribute to the tutorial or see anything that should be updated, corrected or improved, please contact David Kirkby. But please note David only speaks English.


Valid HTML 4.01 Valid CSS!
Website administered by Dr. David Kirkby
This page was last modified: September 16, 2007. 11:41:38 am GMT