Compiling Sjeng 7.0-11.2

Discussion of chess software programming and technical issues.

Moderator: Ras

outAtime
Posts: 226
Joined: Sun Mar 08, 2009 3:08 pm
Location: Canada

Re: Compiling Sjeng 7.0-11.2

Post by outAtime »

Sjeng 7.0 now compiles and runs in arena using the winboard setting.
When I attempt the same ./configure make process with v10.0 I get this:

make all_recursive
process_begin: CreateProcess<<null>, make all-recursive, ...> failed.
make <e=2>: The system cannot find the file specified.
d:\cygwin\bin\mingw32-make.exe: *** [all-recursive-am] Error 2

same with make install

so I have tried removing the book config files and compiling to no avail.
I will try installing gdbm and -devel and see if that works.
outAtime
Gian-Carlo Pascutto
Posts: 1260
Joined: Sat Dec 13, 2008 7:00 pm

Re: Compiling Sjeng 7.0-11.2

Post by Gian-Carlo Pascutto »

outAtime wrote: Do I need the libGBDM? cygwin searches for automake autoheader etc
which I dont have.
:D
libgdbm is needed for the opening books to work

automake and autoheader should not be needed unless you want to add source files or your own. They make the file needed to compile the program, but those are already included in the package.
outAtime
Posts: 226
Joined: Sun Mar 08, 2009 3:08 pm
Location: Canada

Re: Compiling Sjeng 7.0-11.2

Post by outAtime »

Thanks:) I installed aclocal, autoconf, automake and the gdbm libs
as well as the -devel and perl5 and it still wont compile.
./configure now answers yes to -lbgdm and finds aclocal etc.. however I
still recieve the same Error and no (.o or .exe) are created when I try to make. This does not happen with 7.0, however begins at 7.1 all the way up. Should I create somthing similar to Blob2 in the later versions in order to compile e.g. 8.0?
outAtime
Gian-Carlo Pascutto
Posts: 1260
Joined: Sat Dec 13, 2008 7:00 pm

Re: Compiling Sjeng 7.0-11.2

Post by Gian-Carlo Pascutto »

From googling your error, the problem seems to be that the system is trying to call make but your make is actually called mingw32-make. Can you look for this .exe in your mingw directory, and then make a copy called make.exe?
outAtime
Posts: 226
Joined: Sun Mar 08, 2009 3:08 pm
Location: Canada

Re: Compiling Sjeng 7.0-11.2

Post by outAtime »

Changed mingw32-make.exe to make.exe and 7.4 compiled!
Loaded into arena and after fixing a small bug (needed to add cyggdbm-4 dll to engine file) everything is running smooth! Thankyou so much! I am totally hooked on this engine. Is the hashtable size set in ttable? I cant see it in sjeng.h and its only running 22MB. Does sjeng use the hashtables at all for move ordering? (best -1 etc) and order based on iterative deepening and later also SEE, fascinating. Also interesting to me is the use of 3 killer moves. Thanks for taking the time to help me with some minor changes I may not have found alone.
outAtime
Gian-Carlo Pascutto
Posts: 1260
Joined: Sat Dec 13, 2008 7:00 pm

Re: Compiling Sjeng 7.0-11.2

Post by Gian-Carlo Pascutto »

outAtime wrote:Changed mingw32-make.exe to make.exe and 7.4 compiled!
Loaded into arena and after fixing a small bug (needed to add cyggdbm-4 dll to engine file) everything is running smooth! Thankyou so much! I am totally hooked on this engine. Is the hashtable size set in ttable? I cant see it in sjeng.h and its only running 22MB.
IIRC, it's set in sjeng.rc. The source file which reads that (forgot which one) probably also sets the default.
Does sjeng use the hashtables at all for move ordering? (best -1 etc)
Yes. Best is set to -1 if the hash probe fails, IIRC.
outAtime
Posts: 226
Joined: Sun Mar 08, 2009 3:08 pm
Location: Canada

Re: Compiling Sjeng 7.0-11.2

Post by outAtime »

Up to 7.5.1 compiles. 8.0 gives :

eval.c:254: error: initializer element is not constant
eval.c:254: error: <near initialization for 'ksafety_scaled[0][0]'>

same error for each line to line 269. I tried changing int to const int and re-compiling to no avail.

10.0 gives a make error:

make <e=87>: The parameter is incorrect.
D:\cygwin\bin\make.exe[2]: *** [sjeng] Error 87
D:\cygwin\bin\make.exe[2]: Leaving directory 'D:/cygwin/
home/Owner/Sjeng-old/Sjeng-10.0
make[1]: *** [all-recursive] Error 1
make[1]: Leaving directory 'D:/cygwin/
home/Owner/Sjeng-old/Sjeng-10.0
D:\cywin\bin\make.exe: *** [all-recursive-am] Error 2

I think this may be related to windows maximum string size or somthing.

11.2 compiles fine! no problems - which is curious if it thought 10.0 was too big, hehe.

Im pretty sure I can bridge the gap between 7.5.1 and 11.2, no reason really to run 8.0 or 10.0, although Id rather have 8, 10 and 11.2 running
than everything prior to 8 and 11.2, which on second thought is quite a performance gap I would imagine.

Is there a Sjeng Litestep theme? :)
outAtime
Gian-Carlo Pascutto
Posts: 1260
Joined: Sat Dec 13, 2008 7:00 pm

Re: Compiling Sjeng 7.0-11.2

Post by Gian-Carlo Pascutto »

outAtime wrote:Up to 7.5.1 compiles. 8.0 gives :

eval.c:254: error: initializer element is not constant
eval.c:254: error: <near initialization for 'ksafety_scaled[0][0]'>
Can you post the relevant source lines?

Sounds like an actual error that older GCC compilers didn't care about but do now.
outAtime
Posts: 226
Joined: Sun Mar 08, 2009 3:08 pm
Location: Canada

Re: Compiling Sjeng 7.0-11.2

Post by outAtime »

Here are the relavant source lines:

[compile text]
eval.c:254: error: initializer element is not constant
eval.c:254: error: <near initialization for 'ksafety_scaled[0][0]'>
etc.., "" same error lines 255,256,257,258,259,etc..to line 269
D:\cygwin\bin\make.exe[2]: *** [eval.o] Error 1

Code: Select all


252 int ksafety_scaled[15][9] =
253 { 
254    (  -5,   5,  10,  15,  50,  80, 150, 150, 150 ),   /* nothing */
255    (  -5,  15,  20,  25,  70, 150, 200, 200, 200 ),   /* 1 pawns */
256    (  -5,  15,  30,  30, 100, 200, 300, 300, 300 ),   /* 2 pawns */
257    ( -10,  20,  40,  40, 100, 200, 300, 300, 400 ),   /* 1 minor piece */
258    ( -10,  30,  50,  80, 150, 300, 400, 400, 500 ),   /* 1 minor piece +  pawn */
259    ( -10,  35,  60, 100, 200, 250, 400, 400, 500 ),   /* queen */
260    ( -10,  40,  70, 110, 210, 300, 500, 500, 600 ),   /* queen + pawn */
261    ( -10,  45,  75, 125, 215, 300, 500, 600, 700 ),   /* queen + 2 pawn */
262    ( -10,  60,  90, 130, 240, 350, 500, 600, 700 ),   /* queen + piece */
263    ( -15,  60,  95, 145, 260, 350, 500, 600, 700 ),   /* queen + piece + pawn */
264    ( -15,  60, 100, 150, 270, 350, 500, 600, 700 ),   /* 2 queen */
265    ( -15,  60, 110, 160, 280, 400, 600, 700, 800 ),
266    ( -20,  70, 115, 165, 290, 400, 600, 700, 800 ),
267    ( -20,  80, 120, 170, 300, 450, 700, 800, 900 ),
268    ( -20,  80, 125, 175, 310, 450, 700, 800, 900 )
269 };
270
271 void initialize_eval(void)

that is it note for note, I added only the line numbers for reference as they appear in the source.
outAtime
outAtime
Posts: 226
Joined: Sun Mar 08, 2009 3:08 pm
Location: Canada

Re: Compiling Sjeng 7.0-11.2

Post by outAtime »

I should add, it is quite interesting that 7.5.1 compiles with different code
in this section, and 10.0 keeps the same code as 8.0 in this section, however returns the make <e=87> parameter error, while 11.2 has also
the same code (although later in lines, more has been added before this
section) and compiles without the make error or the initializer element
errors we are discussing. !?
outAtime