Computer Chess Club Archives


Search

Terms

Messages

Subject: Re: KnightCap installation question

Author: Dann Corbit

Date: 15:27:07 03/08/00

Go up one level in this thread


On March 08, 2000 at 18:14:18, José de Jesús García Ruvalcaba wrote:

>On March 08, 2000 at 14:57:19, Sven Reichard wrote:
>
>>Recently I tried to install KnightCap and ran into some problems. Has anybody
>>faced and solved them before?
>>OS: RH Linux 6.2
>>Compiler: gcc 2.8
>>Program: KnightCap 3.6
>>
>>1) The help command crashes the program. I tried to look at the sources, but
>>couldn't find a reason.
>>2) The program doesn't find the file coeffs.dat. This is not a problem until you
>>let it run under xboard (e.g., to compare it with crafty). Then, the error
>>message causes xboard to abort the match. Is there a way to generate this file
>>from the .h-files? None of the included utilities would do.
>>
>>Thanks, Sven.
>
>	I also faced problem 2) when I tried KnightCap on Sparc/Solaris. As I did not
>find any solution, I deleted the whole thing.

Why not modify the source.  I made something like that for Crafty (which is now
in the core) where you get an environmental variable for the location of things.
For example:
/* Collect environmental variables */
char           *directory_spec = getenv("CRAFTY_BOOK_PATH");
if (directory_spec)
    strncpy(book_path, directory_spec, sizeof book_path);
directory_spec = getenv("CRAFTY_LOG_PATH");
if (directory_spec)
    strncpy(log_path, directory_spec, sizeof log_path);
directory_spec = getenv("CRAFTY_TB_PATH");
if (directory_spec)
    strncpy(tb_path, directory_spec, sizeof tb_path);
directory_spec = getenv("CRAFTY_RC_PATH");
if (directory_spec)
    strncpy(rc_path, directory_spec, sizeof rc_path);

As you can see, it is absurdly easy.  Suggestion:
Make sure that all the strings you use are size:
char foo[FILENAME_MAX]; /* FILENAME_MAX is defined in stdio.h */



This page took 0 seconds to execute

Last modified: Thu, 15 Apr 21 08:11:13 -0700

Current Computer Chess Club Forums at Talkchess. This site by Sean Mintz.