1.5 Installing ChessDB to a UNIX/Linux computer from the source code
- 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:
$ tclshYou 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.
% info patchlevel
- 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,
- Decompress and untar the source code, which being a .tar.gz file, can be done as
$ gzip -d ChessDB-3.6.4.tar.gzIf you use GNU tar, you can decompress and extract the .tar.gz file in one operation with:
$ tar xvf ChessDB-3.6.4.tar
$ tar xvfz ChessDB-3.6.4.tar.gz
but the 'z' option is a GNU extension.
- Change to the directory where ChessDB is and configure it,
which will create
$ cd ChessDB-3.6.4
- 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.
- 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/binor similar.
SHAREDIR = /home/my_home_directory/share/chessdb
- Next, the software must be built. You may
find it necessary to use GNU make
and gcc. These are known to work. Sun's
makefor 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).
$ makeThere should be no warning messages with gcc.
- 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.
Website administered by Dr. David Kirkby
This page was last modified: September 16, 2007. 11:41:38 am GMT