gnuchess 5.07.1b

Discussions about Winboard/Xboard. News about engines or programs to use with these GUIs (e.g. tournament managers or adapters) belong in this sub forum.

Moderator: Andres Valverde

Re: gnuchess 5.07.1b

Postby Michel » 26 Oct 2009, 10:50

I posted 5.07.9b. This is another cosmetic enhancement which implements the nps command.

Recall that the nps command (invented by HGM and now part of the xboard protocol) makes the engine play at a fixed noderate. E.g. when you issue the command

xboard -fcp gnuchess -firstNPS 8000 -xponder

gnuchess will pretend to search at 8knps.

http://alpha.uhasselt.be/Research/Algeb ... s-release/

For other engine authors: the nps command is trivial to implement: just make the function which computes the search time (normally based on wall clock time) return a simulated search time based on the value of the nps command and the number of nodes searched.
Michel
 
Posts: 513
Joined: 01 Oct 2008, 12:15

Re: gnuchess 5.07.1b

Postby ignacioalex » 26 Oct 2009, 13:07

I hit one more problem when playing games with fixed time per move time controls:

When setting a game of Gnuchess versus Gnuchess and configuring pondering on for both engines (using the "hard" command), Gnuchess will forfeit on time. Under a 2s per move time control it will even forfeit in the very beginning of the game, while still in its openings book. I have also observed that it does not obey to the move now command ("?").

This problem does not occur with pondering disabled, when both engines become quite responsive to the move now command.

It also happens just under Windows, and not under Linux on the same hardware. The machine I'm testing on is a dual core CPU, so with both engines playing with pondering on the CPU activity meter is keep in the 100% mark all the time.

I have built the Windows executable from source (from the latest 5.07.9b revision) using Cygwin. Maybe the problem lies with the pthreads implementation of Cygwin??? Maybe someone could kindly post a binary built with another compiler so that I could give it a try?
ignacioalex
 
Posts: 22
Joined: 02 Sep 2009, 21:38

Re: gnuchess 5.07.1b

Postby Michel » 26 Oct 2009, 13:11

Maybe someone could kindly post a binary built with another compiler so that I could give it a try?


On the website there is a mingw built exectutable. Does that exhibit the same problem? The executable and the the pthreads.dll need to be in the same directory.
Michel
 
Posts: 513
Joined: 01 Oct 2008, 12:15

Re: gnuchess 5.07.1b

Postby ignacioalex » 26 Oct 2009, 18:12

The executable on the website works without any problems! :)

I have no idea what's wrong with my executable built with Cygwin... I usually go with Cygwin instead of MinGW since with the former I find it easier to get the necessary third-party libraries and tools commonly used on Unix development.

So I'll try to generate an executable with MinGW too. Could you please tell me where did you get the necessary libraries required by Gnuchess?
As far as I know, these are: flex, libncurses and libreadline. Also, where did you get the pthreads library?
I think that flex would not be really necessary, as I see you distribute the generated lexpgn.c, isn't it? If so, do you think it would be convenient to remove the check from the configure script? As a curiosity, was this lexpgn.c you distribute hand tuned or is it just the output of running lex?

A few more points about using Gnuchess with fixed time per move time controls:
- It usually does not make use of all the available time. Whatever the amount of time per move you set, it will use only 5 seconds of it most of the time.
- On very short games (like 2s per move) it will eventually forfeit on time at some point during the game. For me this is no problem at all, as my GUI sends out a move now command to prevent this from happening and Gnuchess is now very responsive to it.
ignacioalex
 
Posts: 22
Joined: 02 Sep 2009, 21:38

Re: gnuchess 5.07.1b

Postby Michel » 26 Oct 2009, 19:29

ignacioalex wrote:The executable on the website works without any problems! :)

I have no idea what's wrong with my executable built with Cygwin... I usually go with Cygwin instead of MinGW since with the former I find it easier to get the necessary third-party libraries and tools commonly used on Unix development.

So I'll try to generate an executable with MinGW too. Could you please tell me where did you get the necessary libraries required by Gnuchess?
As far as I know, these are: flex, libncurses and libreadline. Also, where did you get the pthreads library?

I cross compiled it on Linux. Apart from the mingw toolchain one only needs pthreads which one can get here http://sourceware.org/pthreads-win32/ After installing the latter I just did

Code: Select all
CC=/usr/bin/i586-mingw32msvc-gcc ./configure
make clean
make


The advantage of a mingw executable is that it works in wine (cygwin executables do not).

A few more points about using Gnuchess with fixed time per move time controls:
- It usually does not make use of all the available time. Whatever the amount of time per move you set, it will use only 5 seconds of it most of the time.
- On very short games (like 2s per move) it will eventually forfeit on time at some point during the game. For me this is no problem at all, as my GUI sends out a move now command to prevent this from happening and Gnuchess is now very responsive to it.


This should have been fixed in 5.07.8b. At least on xboard it seems to be have normally. What commands does your GUI send?
Michel
 
Posts: 513
Joined: 01 Oct 2008, 12:15

Re: gnuchess 5.07.1b

Postby ignacioalex » 30 Oct 2009, 14:44

Michel wrote:This should have been fixed in 5.07.8b. At least on xboard it seems to be have normally. What commands does your GUI send?

I'm still having this issue with gnuchess-5.07.9b. Below is a sample output of a 60 seconds per move game where a human player is playing as white and gnuchess is playing as black. Gnuchess uses only 5 seconds of the total available time per move.

Code: Select all
GNU Chess 5.07.9b
Adjusting HashSize to 1024 slots
Transposition table:  Entries=1K Size=48K
Pawn hash table: Entries=0K Size=32K
White (1) : xboard
protover 2
feature done=0
feature myname="GNU Chess 5.07.9b"
feature setboard=1
feature analyze=1
feature ping=1
feature draw=0
feature sigint=0
feature memory=1
feature nps=1
feature variants="normal"
feature done=1
accepted done
accepted myname
accepted setboard
accepted analyze
accepted ping
accepted draw
accepted sigint
rejected memory
rejected nps
accepted variants
post
hard
st 60
new
time 6000
otim 5818
a2a3
move c7c5
1 -55 0 21  (e4)
2 -5 0 155  (d4) e6
3 -41 0 474  (e4) e5 Nc3
4 -25 0 2038  (d4) e6 dxc5 Bxc5 Nf3
5 -34 1 7769  (Nf3) Nc6 Nc3 e5 e4
6 -19 2 13667  (Nf3) Nc6 d4 cxd4
7 -19 6 42008  (Nf3) Nf6 Nc3 Nc6 d4 cxd4
8 -14 14 97247  (Nf3) Nc6 Nc3 e5 e4 Nf6
9 -23 32 215370  (Nf3) Nc6 Nc3 e5 e4
time 6000
otim 6000
1 -55 0 21  (e4)
2 -23 0 113  (Nf3) Nc6 Nc3 e5 e4 Nf6 Bb5
3 -23 0 136  (Nf3) Nc6 Nc3 e5 e4 Nf6 Bb5
4 -23 0 159  (Nf3) Nc6 Nc3 e5 e4 Nf6 Bb5
5 -23 0 200  (Nf3) Nc6 Nc3 e5 e4 Nf6 Bb5
6 -23 0 243  (Nf3) Nc6 Nc3 e5 e4 Nf6 Bb5
7 -23 0 313  (Nf3) Nc6 Nc3 e5 e4 Nf6 Bb5
8 -23 0 704  (Nf3) Nc6 Nc3 e5 e4 Nf6 Bb5
9 -23 0 1620  (Nf3) Nc6 Nc3 e5 e4 Nf6 Bb5
10 -23 93 592817  (e4) Nc6 Nc3 e5 Nf3
time 6000
otim 5909
a3a4
1 -55 0 21  (e4)
2 -23 0 45  (e4) Nc6 Nc3
3 -23 0 69  (e4) Nc6 Nc3
4 -23 0 93  (e4) Nc6 Nc3
5 -23 0 117  (e4) Nc6 Nc3
6 -23 0 141  (e4) Nc6 Nc3
7 -23 0 165  (e4) Nc6 Nc3
8 -23 0 393  (e4) Nc6 Nc3
9 -23 0 1129  (e4) Nc6 Nc3
10 -23 0 3789  (e4) Nc6 Nc3
1 -55 0 21  (e4)
2 -23 0 44  (e4) Nc6 Nc3
3 -23 0 68  (e4) Nc6 Nc3
4 -23 0 92  (e4) Nc6 Nc3
5 -23 0 116  (e4) Nc6 Nc3
6 -23 0 140  (e4) Nc6 Nc3
7 -23 0 164  (e4) Nc6 Nc3
8 -23 0 191  (e4) Nc6 Nc3
9 -23 0 218  (e4) Nc6 Nc3
10 -23 0 249  (e4) Nc6 Nc3
1 55 0 24  e5
2 2 0 93  e5 e3
3 52 0 235  e5 e3 Nc6
4 2 0 717  e5 Nc3 Nc6 e3
5 45 0 2609  e5 Nc3 Nc6 e3 Nf6
6 -10 2 15896  Nf6 Nc3 e5
7 5 5 34022  Nf6 Nc3 e5
8 2 13 91776  Nf6 e3 Nc6
9 10 30 204143  Nf6 Nf3 Nc6 Nc3 d5 d3
10 -1 122 789650  d5 e3 c4 Nc3
11 8 238 1524749  d5 e3 Nc6 Nf3 Nf6
move d7d5
1 -14 0 27  (d4)
2 5 0 100  (d4) Qd6
3 8 0 228  (e3) Nc6
4 8 0 257  (e3) Nc6
5 8 0 752  (e3) Nc6
6 8 0 1231  (e3) Nc6
7 8 0 1948  (e3) Nc6
8 8 0 3936  (e3) Nc6
9 8 1 8657  (e3) Nc6
10 8 16 116075  (e3) Nc6
time 6000
otim 6000
1 -14 0 27  (d4)
2 5 0 100  (d4) Qd6
3 8 0 228  (e3) Nc6
4 8 0 257  (e3) Nc6
5 8 0 501  (e3) Nc6
6 8 0 664  (e3) Nc6
7 8 0 1022  (e3) Nc6
8 8 0 2010  (e3) Nc6
9 8 0 4954  (e3) Nc6
10 8 0 4958  (e3) Nc6
1 -14 0 27  (d4)
2 5 0 98  (d4) Qd6
3 8 0 226  (e3) Nc6
4 8 0 255  (e3) Nc6
5 8 0 290  (e3) Nc6
6 8 0 372  (e3) Nc6
7 8 0 487  (e3) Nc6
8 8 0 587  (e3) Nc6
9 8 0 937  (e3) Nc6
10 8 1 16880  (e3) Nc6
time 6000
otim 5875
b2b3
1 98 0 31  Nf6
2 45 0 125  Nf6 e3
3 95 0 503  Nc6 e3 Nf6
4 47 0 1460  Nf6 Nf3 Nc6 Nc3
5 87 1 7698  Nc6
6 53 2 18238  Bg4 Bb2
7 51 13 88862  Nf6 Bb2
8 60 27 181138  Nf6 Bb2 Bg4
9 51 75 486936  e5 Bb2 Nc6 e3
10 48 414 2634466  Nc6 Bb2 Bf5 e3
move b8c6
1 64 0 25  (e3)
2 115 0 119  (e3) Nf6
3 50 0 304  (Bb2) Nf6 e4
4 48 0 372  (Bb2) Bf5
5 48 0 776  (Bb2) Bf5
6 48 0 1319  (Bb2) Bf5
7 48 0 3401  (Bb2) Bf5
8 48 1 8109  (Bb2) Bf5
9 48 13 87549  (Bb2) Nf6
time 6000
otim 6000
1 64 0 25  (e3)
2 115 0 110  (e3) Nf6
3 65 0 350  (e3) Nf6 Nc3
4 67 0 915  (e3) Nf6 Bb2 e5
5 67 0 3832  (e3) Nf6
1 64 0 25  (e3)
2 115 0 105  (e3) Nf6
3 65 0 344  (e3) Nf6 Nc3
4 67 0 784  (e3) Nf6 Bb2 e5
5 67 0 2492  (e3) Nf6
6 67 1 7610  (e3) Nf6 Bb2 e5
7 67 5 26546  (e3)
8 67 14 84105  (e3)
9 67 55 344376  (e3) Nf6 Bb2 e5
10 64 144 901926  (e3) Nf6 Bb5 Bg4
time 6000
otim 5840
g1f3
1 97 0 34  Nf6
2 47 0 143  Nf6 e3
3 97 0 624  Bf5 Nc3 Nf6
4 56 0 2057  Bg4 Nc3 e5 e3
5 66 1 9167  e5
6 66 3 26500  e5
7 69 12 88036  Nf6
8 67 43 253000  Nf6 e3 Bg4
9 67 88 545574  Nf6 e3 d4
10 89 395 2427563  e5 Bb2 e4
move e7e5
1 55 0 37  (Nc3)
2 89 0 121  (Bb2) e4
3 89 0 153  (Bb2) e4
4 89 0 185  (Bb2) e4
5 89 0 690  (Bb2) e4
6 89 0 1201  (Bb2) e4
7 89 0 3437  (Bb2) e4
8 89 1 9761  (Bb2) e4
9 89 31 203360  (Bb2) e4
time 6000
otim 6000
1 55 0 34  (Nc3)
2 89 0 120  (Bb2) e4
3 89 0 151  (Bb2) e4
4 89 0 182  (Bb2) e4
5 89 0 532  (Bb2) e4
6 89 0 976  (Bb2) e4
7 89 0 1843  (Bb2) e4
8 89 0 3169  (Bb2) e4
9 89 1 10121  (Bb2) e4
1 55 0 34  (Nc3)
2 89 0 120  (Bb2) e4
3 89 0 151  (Bb2) e4
4 89 0 182  (Bb2) e4
5 89 0 500  (Bb2) e4
6 89 0 874  (Bb2) e4
7 89 0 1458  (Bb2) e4
8 89 0 2704  (Bb2) e4
9 89 1 10306  (Bb2) e4
time 6000
otim 5867
c2c3
10 121 145 947581  (Bb2) Bd6 e3 Nf6 Bb5
1 161 0 41  Nf6
2 147 0 539  Bf5 e3
3 204 0 1652  e4 Ng1 Nf6
4 161 0 4145  Nf6 e3 Bg4 Bb2
5 196 2 14794  e4 Ng1 Bf5 e3
6 165 7 45301  e4
7 173 24 208288  e4
8 175 75 589334  e4 Ng1
9 169 260 1825610  e4 Ng1
10 199 391 2683223  e4 Ng1 Be7
move e5e4
1 181 0 124  (Ng1)
2 199 0 193  (Ng1) Be7
3 199 0 964  (Ng1) Be7
4 199 0 1033  (Ng1) Be7
5 199 0 1401  (Ng1) Be7
6 199 0 1623  (Ng1) Be7
7 199 0 2021  (Ng1) Be7
8 199 0 3519  (Ng1) Be7
9 199 1 25110  (Ng1) Be7
time 6000
otim 6000
1 181 0 134  (Ng1)
2 199 0 179  (Ng1) Be7
3 199 0 553  (Ng1) Be7
4 199 0 577  (Ng1) Be7
5 199 0 627  (Ng1) Be7
6 199 0 730  (Ng1) Be7
7 199 0 904  (Ng1) Be7
8 199 0 1476  (Ng1) Be7
9 199 0 2434  (Ng1) Be7
1 181 0 134  (Ng1)
2 199 0 179  (Ng1) Be7
3 199 0 376  (Ng1) Be7
4 199 0 400  (Ng1) Be7
5 199 0 450  (Ng1) Be7
6 199 0 553  (Ng1) Be7
7 199 0 701  (Ng1) Be7
8 199 0 1045  (Ng1) Be7
9 199 0 1461  (Ng1) Be7
10 192 116 781334  (Ng1) Bd6 d3
time 6000
otim 5806
f3g1
1 204 0 42  Nf6
2 192 0 240  Bd6 d3
3 192 0 398  Bd6 d3
4 192 0 464  Bd6 d3
5 192 0 1962  Bd6 d3
6 192 0 4492  Bd6 d3
7 192 2 10921  Bd6 d3
8 192 4 23870  Bd6 d3
9 192 24 168176  Bd6 d3
10 172 500 3316653  Bd6 d3
move f8d6
1 162 0 27  (e3)
2 162 0 361  (d3) exd3 exd3 Nge7
3 172 0 1106  (e3) Nge7 Bb5
4 162 0 2849  (d3) exd3 exd3 Nge7
5 162 1 6681  (d3) exd3 exd3 Nge7
6 162 3 22523  (d3)
7 177 20 117208  (d3)
8 163 44 253135  (d3)
time 6000
otim 6000
1 162 0 27  (e3)
2 162 0 367  (d3) exd3 exd3 Nge7
3 172 0 1069  (e3) Nge7 Bb5
4 162 0 2551  (d3) exd3 exd3 Nge7
5 162 1 6982  (d3) exd3 exd3 Nge7
6 162 4 25415  (d3)
7 163 8 52916  (d3)
8 163 24 150954  (d3)
9 172 138 856882  (d3)
10 203 801 5206766  (d3) Nf6 Bg5 exd3
11 195 2043 13099331  (d3) Nf6 Bg5 h6
ignacioalex
 
Posts: 22
Joined: 02 Sep 2009, 21:38

Re: gnuchess 5.07.1b

Postby Michel » 30 Oct 2009, 15:41

I'll have a look. The issue may be the time commands. Winboard does not send time commands in st mode so I do not know what happens in that case.

EDIT: No the issue is caused by the fact that GnuChess clears the sec/move value after new. The specs for "new" say

Reset clocks and time controls to the start of a new game.


and the st command is listed under the section Time Control. So I think this implies that GnuChess acts correctly in this case.
Michel
 
Posts: 513
Joined: 01 Oct 2008, 12:15

Re: gnuchess 5.07.1b

Postby ignacioalex » 31 Oct 2009, 12:38

Thanks for diagnosing the problem. I've changed my GUI to configure the time control after the "new" command and it now works as expected.

I'm still puzzled with the Winboard specification as I can't figure out what "resetting the time controls" would mean. It appears that Gnuchess interprets it as "if a fixed time per move time control was previously set, keep it that way, but reset the time per move value to 5s per move". Maybe some other engine would interpret that differently... :(
ignacioalex
 
Posts: 22
Joined: 02 Sep 2009, 21:38

Re: gnuchess 5.07.1b

Postby H.G.Muller » 31 Oct 2009, 12:53

Indeed, this is a bad spec, unless one assumes there is a default for time controls just like there is a default for the initial position. Perhaps there originally was. It makes no sense to specify that new should set up the initial position and clocks if you tell what variant is to be played and what the time control is only after it!
User avatar
H.G.Muller
 
Posts: 3453
Joined: 16 Nov 2005, 12:02
Location: Diemen, NL

Re: gnuchess 5.07.1b

Postby ignacioalex » 31 Oct 2009, 18:55

Is there any proposal to improve this situation?

Perhaps it would be difficult to change the "new" command without breaking compatibility with previous implementations, so maybe it should be deprecated and its functionality replaced by a new command.

I would suggest introducing a "reset" command, which could be used for resetting the board, the clock or both:
reset board # resets the board
reset clock # resets the clock
reset # resets both

This command should be issued in force mode, after the variant and time control have already been specified, and would not have any side effects on any other setting.
The engine would leave force mode and the game effectively started with either a "go" or "playother" command, depending on the engine's color.
ignacioalex
 
Posts: 22
Joined: 02 Sep 2009, 21:38

Re: gnuchess 5.07.1b

Postby H.G.Muller » 31 Oct 2009, 22:42

It is going to be fixed by updating the specs for new. I will put in it there that new should reset the depth to infinite and switch to using wall-clock time, and leave the time-control parameters in an undefined state. Switching variant to normal and setting up the board for it should stay in the specs, with the addition that in engines that do not support variant "normal" it leaves the game state undefined until reception of a variant command.

On TalkCess there currently is a thread running where I already propose a reset command. (Well, this was not my idea, and it seems ChessBase already implements it). But this is for clearing hash and killer tbles only, and should leave the game state undisturbed.
User avatar
H.G.Muller
 
Posts: 3453
Joined: 16 Nov 2005, 12:02
Location: Diemen, NL

Re: gnuchess 5.07.1b

Postby Michel » 05 Nov 2009, 08:56

Well I found the analysis bug. It seems to be a problem with mate in N positions.

GnuChess does a form of mate pruning. If the root score is already mate in a certain number of plies then
searches at larger height than this return immediately.

GnuChess essentially returns a random score in that case and sometimes this score finds its way into the hash table.
Such incorrect entries may wreak havoc later (sometimes GnuChess does not see the mate anymore when the opponent
plays moves which are not on the PV).

I observed this only in analysis but perhaps it might also be a problem in a real game. I must confess I have
not gotten to the bottom of this problem. For now I have just commented out the lines which implement the
mate pruning. A better solution would be to set some flag to disable hash saving (GnuChess already does
this for timeouts).

There are still more bugs I suspect. I have a game in which GnuChess blunders despite the analysis after
the fact being fine. Unfortunately I don't have logs from that game so I don't know what GnuChess was thinking.
Michel
 
Posts: 513
Joined: 01 Oct 2008, 12:15

Re: gnuchess 5.07.1b

Postby ignacioalex » 11 Nov 2009, 15:31

I'm now trying to cross compile the source of gnuchess-5.07.9b without success. I don't have any experience with cross compiling, but maybe you can give me a hand? :)

I installed the MinGW toolchain in my Ubuntu 8.04 box and followed the instructions above:

Code: Select all
CC=i586-mingw32msvc-gcc ./configure
make


However the output of configure points out missing dependencies (libncurses, libreadline, libintl and pthreads):

Code: Select all
alex@alex-desktop:~/lixo/gnuchess/gnuchess-5.07.9b$ CC=i586-mingw32msvc-gcc ./configure
checking for a BSD-compatible install... /usr/bin/install -c
checking whether build environment is sane... yes
checking for a thread-safe mkdir -p... /bin/mkdir -p
checking for gawk... gawk
checking whether make sets $(MAKE)... yes
checking for gcc... i586-mingw32msvc-gcc
checking for C compiler default output file name... a.exe
checking whether the C compiler works... yes
checking whether we are cross compiling... no
checking for suffix of executables... .exe
checking for suffix of object files... o
checking whether we are using the GNU C compiler... yes
checking whether i586-mingw32msvc-gcc accepts -g... yes
checking for i586-mingw32msvc-gcc option to accept ISO C89... none needed
checking for style of include used by make... GNU
checking dependency style of i586-mingw32msvc-gcc... gcc3
checking for a BSD-compatible install... /usr/bin/install -c
checking for gawk... (cached) gawk
checking whether ln -s works... yes
checking whether struct tm is in sys/time.h or time.h... time.h
checking for flex... flex
checking lex output file root... lex.yy
checking lex library... none needed
checking whether yytext is a pointer... no
checking for tputs in -lncurses... no
checking for readline in -lreadline... no
checking how to run the C preprocessor... i586-mingw32msvc-gcc -E
checking for grep that handles long lines and -e... /bin/grep
checking for egrep... /bin/grep -E
checking for ANSI C header files... yes
checking for sys/types.h... yes
checking for sys/stat.h... yes
checking for stdlib.h... yes
checking for string.h... yes
checking for memory.h... yes
checking for strings.h... yes
checking for inttypes.h... yes
checking for stdint.h... yes
checking for unistd.h... yes
checking readline/readline.h usability... no
checking readline/readline.h presence... no
checking for readline/readline.h... no
checking readline/history.h usability... no
checking readline/history.h presence... no
checking for readline/history.h... no
checking for ANSI C header files... (cached) yes
checking time.h usability... yes
checking time.h presence... yes
checking for time.h... yes
checking sys/time.h usability... yes
checking sys/time.h presence... yes
checking for sys/time.h... yes
checking for unistd.h... (cached) yes
checking errno.h usability... yes
checking errno.h presence... yes
checking for errno.h... yes
checking fcntl.h usability... yes
checking fcntl.h presence... yes
checking for fcntl.h... yes
checking libintl.h usability... no
checking libintl.h presence... no
checking for libintl.h... no
checking for an ANSI C-conforming const... yes
checking for working volatile... yes
checking for stdlib.h... (cached) yes
checking for GNU libc compatible realloc... yes
checking for stdbool.h that conforms to C99... yes
checking for _Bool... yes
checking for inline... inline
checking for size_t... yes
checking whether time.h and sys/time.h may both be included... yes
checking for stdint types... stdint.h (shortcircuit)
make use of stdint.h in src/GCint.h (assuming C99 compatible system)
checking return type of signal handlers... void
checking for stdlib.h... (cached) yes
checking for GNU libc compatible malloc... yes
checking for working memcmp... yes
checking for gettimeofday... yes
checking for strchr... yes
checking for strcspn... yes
checking for strstr... yes
checking for strerror... yes
checking for memset... yes
checking for strdup... yes
checking for strtol... yes
checking build system type... x86_64-unknown-linux-gnu
checking host system type... x86_64-unknown-linux-gnu
checking for the pthreads library -lpthreads... no
checking whether pthreads work without any flags... no
checking whether pthreads work with -Kthread... no
checking whether pthreads work with -kthread... no
checking for the pthreads library -llthread... no
checking whether pthreads work with -pthread... no
checking whether pthreads work with -pthreads... no
checking whether pthreads work with -mthreads... no
checking for the pthreads library -lpthread... no
checking whether pthreads work with --thread-safe... no
checking whether pthreads work with -mt... no
configure: creating ./config.status
config.status: creating Makefile
config.status: creating src/Makefile
config.status: creating src/config.h
config.status: executing depfiles commands
config.status: executing src/GCint.h commands
config.status: creating src/GCint.h : _GNUCHESS_SRC_GCINT_H


My Ubuntu system has these libraries installed, but as native Linux binaries. Should I have to cross compile all of these libraries from source?

The pthreads library I've downloaded from http://sourceware.org/pthreads-win32/. I've placed the pthread.h, sched.h and semaphore.h header files under the src directory, and pthreadGC2.dll under the src and root directories.

Trying to build the code with make yields a few warnings when compiling main.c and errors in the final link step about undefined references to pthreads functions:

Code: Select all
alex@alex-desktop:~/lixo/gnuchess/gnuchess-5.07.9b$ make
Making all in src
make[1]: Entering directory `/home/alex/lixo/gnuchess/gnuchess-5.07.9b/src'
make  all-am
make[2]: Entering directory `/home/alex/lixo/gnuchess/gnuchess-5.07.9b/src'
i586-mingw32msvc-gcc -DHAVE_CONFIG_H -I.     -g -O2  -MT atak.o -MD -MP -MF .deps/atak.Tpo -c -o atak.o atak.c
mv -f .deps/atak.Tpo .deps/atak.Po
i586-mingw32msvc-gcc -DHAVE_CONFIG_H -I.     -g -O2  -MT book.o -MD -MP -MF .deps/book.Tpo -c -o book.o book.c
mv -f .deps/book.Tpo .deps/book.Po
i586-mingw32msvc-gcc -DHAVE_CONFIG_H -I.     -g -O2  -MT cmd.o -MD -MP -MF .deps/cmd.Tpo -c -o cmd.o cmd.c
mv -f .deps/cmd.Tpo .deps/cmd.Po
i586-mingw32msvc-gcc -DHAVE_CONFIG_H -I.     -g -O2  -MT debug.o -MD -MP -MF .deps/debug.Tpo -c -o debug.o debug.c
mv -f .deps/debug.Tpo .deps/debug.Po
i586-mingw32msvc-gcc -DHAVE_CONFIG_H -I.     -g -O2  -MT epd.o -MD -MP -MF .deps/epd.Tpo -c -o epd.o epd.c
mv -f .deps/epd.Tpo .deps/epd.Po
i586-mingw32msvc-gcc -DHAVE_CONFIG_H -I.     -g -O2  -MT eval.o -MD -MP -MF .deps/eval.Tpo -c -o eval.o eval.c
mv -f .deps/eval.Tpo .deps/eval.Po
i586-mingw32msvc-gcc -DHAVE_CONFIG_H -I.     -g -O2  -MT genmove.o -MD -MP -MF .deps/genmove.Tpo -c -o genmove.o genmove.c
mv -f .deps/genmove.Tpo .deps/genmove.Po
i586-mingw32msvc-gcc -DHAVE_CONFIG_H -I.     -g -O2  -MT getopt.o -MD -MP -MF .deps/getopt.Tpo -c -o getopt.o getopt.c
mv -f .deps/getopt.Tpo .deps/getopt.Po
i586-mingw32msvc-gcc -DHAVE_CONFIG_H -I.     -g -O2  -MT getopt1.o -MD -MP -MF .deps/getopt1.Tpo -c -o getopt1.o getopt1.c
mv -f .deps/getopt1.Tpo .deps/getopt1.Po
i586-mingw32msvc-gcc -DHAVE_CONFIG_H -I.     -g -O2  -MT hash.o -MD -MP -MF .deps/hash.Tpo -c -o hash.o hash.c
mv -f .deps/hash.Tpo .deps/hash.Po
i586-mingw32msvc-gcc -DHAVE_CONFIG_H -I.     -g -O2  -MT hung.o -MD -MP -MF .deps/hung.Tpo -c -o hung.o hung.c
mv -f .deps/hung.Tpo .deps/hung.Po
i586-mingw32msvc-gcc -DHAVE_CONFIG_H -I.     -g -O2  -MT init.o -MD -MP -MF .deps/init.Tpo -c -o init.o init.c
mv -f .deps/init.Tpo .deps/init.Po
i586-mingw32msvc-gcc -DHAVE_CONFIG_H -I.     -g -O2  -MT input.o -MD -MP -MF .deps/input.Tpo -c -o input.o input.c
mv -f .deps/input.Tpo .deps/input.Po
i586-mingw32msvc-gcc -DHAVE_CONFIG_H -I.     -g -O2  -MT iterate.o -MD -MP -MF .deps/iterate.Tpo -c -o iterate.o iterate.c
mv -f .deps/iterate.Tpo .deps/iterate.Po
i586-mingw32msvc-gcc -DHAVE_CONFIG_H -I.     -g -O2  -MT main.o -MD -MP -MF .deps/main.Tpo -c -o main.o main.c
main.c: In function ‘main’:
main.c:339: warning: passing argument 1 of ‘getopt_long’ makes pointer from integer without a cast
main.c:339: warning: passing argument 2 of ‘getopt_long’ from incompatible pointer type
mv -f .deps/main.Tpo .deps/main.Po
i586-mingw32msvc-gcc -DHAVE_CONFIG_H -I.     -g -O2  -MT move.o -MD -MP -MF .deps/move.Tpo -c -o move.o move.c
mv -f .deps/move.Tpo .deps/move.Po
i586-mingw32msvc-gcc -DHAVE_CONFIG_H -I.     -g -O2  -MT null.o -MD -MP -MF .deps/null.Tpo -c -o null.o null.c
mv -f .deps/null.Tpo .deps/null.Po
i586-mingw32msvc-gcc -DHAVE_CONFIG_H -I.     -g -O2  -MT output.o -MD -MP -MF .deps/output.Tpo -c -o output.o output.c
mv -f .deps/output.Tpo .deps/output.Po
i586-mingw32msvc-gcc -DHAVE_CONFIG_H -I.     -g -O2  -MT players.o -MD -MP -MF .deps/players.Tpo -c -o players.o players.c
mv -f .deps/players.Tpo .deps/players.Po
i586-mingw32msvc-gcc -DHAVE_CONFIG_H -I.     -g -O2  -MT pgn.o -MD -MP -MF .deps/pgn.Tpo -c -o pgn.o pgn.c
mv -f .deps/pgn.Tpo .deps/pgn.Po
i586-mingw32msvc-gcc -DHAVE_CONFIG_H -I.     -g -O2  -MT ponder.o -MD -MP -MF .deps/ponder.Tpo -c -o ponder.o ponder.c
mv -f .deps/ponder.Tpo .deps/ponder.Po
i586-mingw32msvc-gcc -DHAVE_CONFIG_H -I.     -g -O2  -MT quiesce.o -MD -MP -MF .deps/quiesce.Tpo -c -o quiesce.o quiesce.c
mv -f .deps/quiesce.Tpo .deps/quiesce.Po
i586-mingw32msvc-gcc -DHAVE_CONFIG_H -I.     -g -O2  -MT random.o -MD -MP -MF .deps/random.Tpo -c -o random.o random.c
mv -f .deps/random.Tpo .deps/random.Po
i586-mingw32msvc-gcc -DHAVE_CONFIG_H -I.     -g -O2  -MT repeat.o -MD -MP -MF .deps/repeat.Tpo -c -o repeat.o repeat.c
mv -f .deps/repeat.Tpo .deps/repeat.Po
i586-mingw32msvc-gcc -DHAVE_CONFIG_H -I.     -g -O2  -MT search.o -MD -MP -MF .deps/search.Tpo -c -o search.o search.c
mv -f .deps/search.Tpo .deps/search.Po
i586-mingw32msvc-gcc -DHAVE_CONFIG_H -I.     -g -O2  -MT solve.o -MD -MP -MF .deps/solve.Tpo -c -o solve.o solve.c
mv -f .deps/solve.Tpo .deps/solve.Po
i586-mingw32msvc-gcc -DHAVE_CONFIG_H -I.     -g -O2  -MT sort.o -MD -MP -MF .deps/sort.Tpo -c -o sort.o sort.c
mv -f .deps/sort.Tpo .deps/sort.Po
i586-mingw32msvc-gcc -DHAVE_CONFIG_H -I.     -g -O2  -MT swap.o -MD -MP -MF .deps/swap.Tpo -c -o swap.o swap.c
mv -f .deps/swap.Tpo .deps/swap.Po
i586-mingw32msvc-gcc -DHAVE_CONFIG_H -I.     -g -O2  -MT test.o -MD -MP -MF .deps/test.Tpo -c -o test.o test.c
mv -f .deps/test.Tpo .deps/test.Po
i586-mingw32msvc-gcc -DHAVE_CONFIG_H -I.     -g -O2  -MT ttable.o -MD -MP -MF .deps/ttable.Tpo -c -o ttable.o ttable.c
mv -f .deps/ttable.Tpo .deps/ttable.Po
i586-mingw32msvc-gcc -DHAVE_CONFIG_H -I.     -g -O2  -MT util.o -MD -MP -MF .deps/util.Tpo -c -o util.o util.c
mv -f .deps/util.Tpo .deps/util.Po
i586-mingw32msvc-gcc -DHAVE_CONFIG_H -I.     -g -O2  -MT lexpgn.o -MD -MP -MF .deps/lexpgn.Tpo -c -o lexpgn.o lexpgn.c
mv -f .deps/lexpgn.Tpo .deps/lexpgn.Po
i586-mingw32msvc-gcc  -g -O2    -o gnuchess.exe atak.o book.o cmd.o debug.o epd.o eval.o genmove.o getopt.o getopt1.o hash.o hung.o init.o input.o iterate.o main.o move.o null.o output.o players.o pgn.o ponder.o quiesce.o random.o repeat.o search.o solve.o sort.o swap.o test.o ttable.o util.o lexpgn.o 
input.o: In function `CleanupInput':
/home/alex/lixo/gnuchess/gnuchess-5.07.9b/src/input.c:199: undefined reference to `__imp__pthread_join'
input.o: In function `InitInput':
/home/alex/lixo/gnuchess/gnuchess-5.07.9b/src/input.c:194: undefined reference to `__imp__pthread_create'
input.o: In function `wait_for_input':
/home/alex/lixo/gnuchess/gnuchess-5.07.9b/src/input.c:173: undefined reference to `__imp__pthread_mutex_lock'
/home/alex/lixo/gnuchess/gnuchess-5.07.9b/src/input.c:173: undefined reference to `__imp__pthread_mutex_unlock'
/home/alex/lixo/gnuchess/gnuchess-5.07.9b/src/input.c:176: undefined reference to `__imp__pthread_cond_wait'
input.o: In function `input_wakeup':
/home/alex/lixo/gnuchess/gnuchess-5.07.9b/src/input.c:162: undefined reference to `__imp__pthread_mutex_lock'
/home/alex/lixo/gnuchess/gnuchess-5.07.9b/src/input.c:164: undefined reference to `__imp__pthread_mutex_unlock'
/home/alex/lixo/gnuchess/gnuchess-5.07.9b/src/input.c:166: undefined reference to `__imp__pthread_cond_signal'
input.o: In function `input_func':
/home/alex/lixo/gnuchess/gnuchess-5.07.9b/src/input.c:128: undefined reference to `__imp__pthread_mutex_lock'
/home/alex/lixo/gnuchess/gnuchess-5.07.9b/src/input.c:128: undefined reference to `__imp__pthread_mutex_unlock'
/home/alex/lixo/gnuchess/gnuchess-5.07.9b/src/input.c:128: undefined reference to `__imp__pthread_cond_wait'
/home/alex/lixo/gnuchess/gnuchess-5.07.9b/src/input.c:141: undefined reference to `__imp__pthread_cond_signal'
collect2: ld returned 1 exit status
make[2]: *** [gnuchess.exe] Error 1
make[2]: Leaving directory `/home/alex/lixo/gnuchess/gnuchess-5.07.9b/src'
make[1]: *** [all] Error 2
make[1]: Leaving directory `/home/alex/lixo/gnuchess/gnuchess-5.07.9b/src'
make: *** [all-recursive] Error 1


Any help is appreciated!
ignacioalex
 
Posts: 22
Joined: 02 Sep 2009, 21:38

Re: gnuchess 5.07.1b

Postby Jim Ablett » 11 Nov 2009, 19:49

ignacioalex wrote:I'm now trying to cross compile the source of gnuchess-5.07.9b without success. I don't have any experience with cross compiling, but maybe you can give me a hand? :)

I installed the MinGW toolchain in my Ubuntu 8.04 box and followed the instructions above:

Code: Select all
CC=i586-mingw32msvc-gcc ./configure
make


However the output of configure points out missing dependencies (libncurses, libreadline, libintl and pthreads):

Code: Select all
alex@alex-desktop:~/lixo/gnuchess/gnuchess-5.07.9b$ CC=i586-mingw32msvc-gcc ./configure
checking for a BSD-compatible install... /usr/bin/install -c
checking whether build environment is sane... yes
checking for a thread-safe mkdir -p... /bin/mkdir -p
checking for gawk... gawk
checking whether make sets $(MAKE)... yes
checking for gcc... i586-mingw32msvc-gcc
checking for C compiler default output file name... a.exe
checking whether the C compiler works... yes
checking whether we are cross compiling... no
checking for suffix of executables... .exe
checking for suffix of object files... o
checking whether we are using the GNU C compiler... yes
checking whether i586-mingw32msvc-gcc accepts -g... yes
checking for i586-mingw32msvc-gcc option to accept ISO C89... none needed
checking for style of include used by make... GNU
checking dependency style of i586-mingw32msvc-gcc... gcc3
checking for a BSD-compatible install... /usr/bin/install -c
checking for gawk... (cached) gawk
checking whether ln -s works... yes
checking whether struct tm is in sys/time.h or time.h... time.h
checking for flex... flex
checking lex output file root... lex.yy
checking lex library... none needed
checking whether yytext is a pointer... no
checking for tputs in -lncurses... no
checking for readline in -lreadline... no
checking how to run the C preprocessor... i586-mingw32msvc-gcc -E
checking for grep that handles long lines and -e... /bin/grep
checking for egrep... /bin/grep -E
checking for ANSI C header files... yes
checking for sys/types.h... yes
checking for sys/stat.h... yes
checking for stdlib.h... yes
checking for string.h... yes
checking for memory.h... yes
checking for strings.h... yes
checking for inttypes.h... yes
checking for stdint.h... yes
checking for unistd.h... yes
checking readline/readline.h usability... no
checking readline/readline.h presence... no
checking for readline/readline.h... no
checking readline/history.h usability... no
checking readline/history.h presence... no
checking for readline/history.h... no
checking for ANSI C header files... (cached) yes
checking time.h usability... yes
checking time.h presence... yes
checking for time.h... yes
checking sys/time.h usability... yes
checking sys/time.h presence... yes
checking for sys/time.h... yes
checking for unistd.h... (cached) yes
checking errno.h usability... yes
checking errno.h presence... yes
checking for errno.h... yes
checking fcntl.h usability... yes
checking fcntl.h presence... yes
checking for fcntl.h... yes
checking libintl.h usability... no
checking libintl.h presence... no
checking for libintl.h... no
checking for an ANSI C-conforming const... yes
checking for working volatile... yes
checking for stdlib.h... (cached) yes
checking for GNU libc compatible realloc... yes
checking for stdbool.h that conforms to C99... yes
checking for _Bool... yes
checking for inline... inline
checking for size_t... yes
checking whether time.h and sys/time.h may both be included... yes
checking for stdint types... stdint.h (shortcircuit)
make use of stdint.h in src/GCint.h (assuming C99 compatible system)
checking return type of signal handlers... void
checking for stdlib.h... (cached) yes
checking for GNU libc compatible malloc... yes
checking for working memcmp... yes
checking for gettimeofday... yes
checking for strchr... yes
checking for strcspn... yes
checking for strstr... yes
checking for strerror... yes
checking for memset... yes
checking for strdup... yes
checking for strtol... yes
checking build system type... x86_64-unknown-linux-gnu
checking host system type... x86_64-unknown-linux-gnu
checking for the pthreads library -lpthreads... no
checking whether pthreads work without any flags... no
checking whether pthreads work with -Kthread... no
checking whether pthreads work with -kthread... no
checking for the pthreads library -llthread... no
checking whether pthreads work with -pthread... no
checking whether pthreads work with -pthreads... no
checking whether pthreads work with -mthreads... no
checking for the pthreads library -lpthread... no
checking whether pthreads work with --thread-safe... no
checking whether pthreads work with -mt... no
configure: creating ./config.status
config.status: creating Makefile
config.status: creating src/Makefile
config.status: creating src/config.h
config.status: executing depfiles commands
config.status: executing src/GCint.h commands
config.status: creating src/GCint.h : _GNUCHESS_SRC_GCINT_H


My Ubuntu system has these libraries installed, but as native Linux binaries. Should I have to cross compile all of these libraries from source?

The pthreads library I've downloaded from http://sourceware.org/pthreads-win32/. I've placed the pthread.h, sched.h and semaphore.h header files under the src directory, and pthreadGC2.dll under the src and root directories.

Trying to build the code with make yields a few warnings when compiling main.c and errors in the final link step about undefined references to pthreads functions:

Code: Select all
alex@alex-desktop:~/lixo/gnuchess/gnuchess-5.07.9b$ make
Making all in src
make[1]: Entering directory `/home/alex/lixo/gnuchess/gnuchess-5.07.9b/src'
make  all-am
make[2]: Entering directory `/home/alex/lixo/gnuchess/gnuchess-5.07.9b/src'
i586-mingw32msvc-gcc -DHAVE_CONFIG_H -I.     -g -O2  -MT atak.o -MD -MP -MF .deps/atak.Tpo -c -o atak.o atak.c
mv -f .deps/atak.Tpo .deps/atak.Po
i586-mingw32msvc-gcc -DHAVE_CONFIG_H -I.     -g -O2  -MT book.o -MD -MP -MF .deps/book.Tpo -c -o book.o book.c
mv -f .deps/book.Tpo .deps/book.Po
i586-mingw32msvc-gcc -DHAVE_CONFIG_H -I.     -g -O2  -MT cmd.o -MD -MP -MF .deps/cmd.Tpo -c -o cmd.o cmd.c
mv -f .deps/cmd.Tpo .deps/cmd.Po
i586-mingw32msvc-gcc -DHAVE_CONFIG_H -I.     -g -O2  -MT debug.o -MD -MP -MF .deps/debug.Tpo -c -o debug.o debug.c
mv -f .deps/debug.Tpo .deps/debug.Po
i586-mingw32msvc-gcc -DHAVE_CONFIG_H -I.     -g -O2  -MT epd.o -MD -MP -MF .deps/epd.Tpo -c -o epd.o epd.c
mv -f .deps/epd.Tpo .deps/epd.Po
i586-mingw32msvc-gcc -DHAVE_CONFIG_H -I.     -g -O2  -MT eval.o -MD -MP -MF .deps/eval.Tpo -c -o eval.o eval.c
mv -f .deps/eval.Tpo .deps/eval.Po
i586-mingw32msvc-gcc -DHAVE_CONFIG_H -I.     -g -O2  -MT genmove.o -MD -MP -MF .deps/genmove.Tpo -c -o genmove.o genmove.c
mv -f .deps/genmove.Tpo .deps/genmove.Po
i586-mingw32msvc-gcc -DHAVE_CONFIG_H -I.     -g -O2  -MT getopt.o -MD -MP -MF .deps/getopt.Tpo -c -o getopt.o getopt.c
mv -f .deps/getopt.Tpo .deps/getopt.Po
i586-mingw32msvc-gcc -DHAVE_CONFIG_H -I.     -g -O2  -MT getopt1.o -MD -MP -MF .deps/getopt1.Tpo -c -o getopt1.o getopt1.c
mv -f .deps/getopt1.Tpo .deps/getopt1.Po
i586-mingw32msvc-gcc -DHAVE_CONFIG_H -I.     -g -O2  -MT hash.o -MD -MP -MF .deps/hash.Tpo -c -o hash.o hash.c
mv -f .deps/hash.Tpo .deps/hash.Po
i586-mingw32msvc-gcc -DHAVE_CONFIG_H -I.     -g -O2  -MT hung.o -MD -MP -MF .deps/hung.Tpo -c -o hung.o hung.c
mv -f .deps/hung.Tpo .deps/hung.Po
i586-mingw32msvc-gcc -DHAVE_CONFIG_H -I.     -g -O2  -MT init.o -MD -MP -MF .deps/init.Tpo -c -o init.o init.c
mv -f .deps/init.Tpo .deps/init.Po
i586-mingw32msvc-gcc -DHAVE_CONFIG_H -I.     -g -O2  -MT input.o -MD -MP -MF .deps/input.Tpo -c -o input.o input.c
mv -f .deps/input.Tpo .deps/input.Po
i586-mingw32msvc-gcc -DHAVE_CONFIG_H -I.     -g -O2  -MT iterate.o -MD -MP -MF .deps/iterate.Tpo -c -o iterate.o iterate.c
mv -f .deps/iterate.Tpo .deps/iterate.Po
i586-mingw32msvc-gcc -DHAVE_CONFIG_H -I.     -g -O2  -MT main.o -MD -MP -MF .deps/main.Tpo -c -o main.o main.c
main.c: In function ‘main’:
main.c:339: warning: passing argument 1 of ‘getopt_long’ makes pointer from integer without a cast
main.c:339: warning: passing argument 2 of ‘getopt_long’ from incompatible pointer type
mv -f .deps/main.Tpo .deps/main.Po
i586-mingw32msvc-gcc -DHAVE_CONFIG_H -I.     -g -O2  -MT move.o -MD -MP -MF .deps/move.Tpo -c -o move.o move.c
mv -f .deps/move.Tpo .deps/move.Po
i586-mingw32msvc-gcc -DHAVE_CONFIG_H -I.     -g -O2  -MT null.o -MD -MP -MF .deps/null.Tpo -c -o null.o null.c
mv -f .deps/null.Tpo .deps/null.Po
i586-mingw32msvc-gcc -DHAVE_CONFIG_H -I.     -g -O2  -MT output.o -MD -MP -MF .deps/output.Tpo -c -o output.o output.c
mv -f .deps/output.Tpo .deps/output.Po
i586-mingw32msvc-gcc -DHAVE_CONFIG_H -I.     -g -O2  -MT players.o -MD -MP -MF .deps/players.Tpo -c -o players.o players.c
mv -f .deps/players.Tpo .deps/players.Po
i586-mingw32msvc-gcc -DHAVE_CONFIG_H -I.     -g -O2  -MT pgn.o -MD -MP -MF .deps/pgn.Tpo -c -o pgn.o pgn.c
mv -f .deps/pgn.Tpo .deps/pgn.Po
i586-mingw32msvc-gcc -DHAVE_CONFIG_H -I.     -g -O2  -MT ponder.o -MD -MP -MF .deps/ponder.Tpo -c -o ponder.o ponder.c
mv -f .deps/ponder.Tpo .deps/ponder.Po
i586-mingw32msvc-gcc -DHAVE_CONFIG_H -I.     -g -O2  -MT quiesce.o -MD -MP -MF .deps/quiesce.Tpo -c -o quiesce.o quiesce.c
mv -f .deps/quiesce.Tpo .deps/quiesce.Po
i586-mingw32msvc-gcc -DHAVE_CONFIG_H -I.     -g -O2  -MT random.o -MD -MP -MF .deps/random.Tpo -c -o random.o random.c
mv -f .deps/random.Tpo .deps/random.Po
i586-mingw32msvc-gcc -DHAVE_CONFIG_H -I.     -g -O2  -MT repeat.o -MD -MP -MF .deps/repeat.Tpo -c -o repeat.o repeat.c
mv -f .deps/repeat.Tpo .deps/repeat.Po
i586-mingw32msvc-gcc -DHAVE_CONFIG_H -I.     -g -O2  -MT search.o -MD -MP -MF .deps/search.Tpo -c -o search.o search.c
mv -f .deps/search.Tpo .deps/search.Po
i586-mingw32msvc-gcc -DHAVE_CONFIG_H -I.     -g -O2  -MT solve.o -MD -MP -MF .deps/solve.Tpo -c -o solve.o solve.c
mv -f .deps/solve.Tpo .deps/solve.Po
i586-mingw32msvc-gcc -DHAVE_CONFIG_H -I.     -g -O2  -MT sort.o -MD -MP -MF .deps/sort.Tpo -c -o sort.o sort.c
mv -f .deps/sort.Tpo .deps/sort.Po
i586-mingw32msvc-gcc -DHAVE_CONFIG_H -I.     -g -O2  -MT swap.o -MD -MP -MF .deps/swap.Tpo -c -o swap.o swap.c
mv -f .deps/swap.Tpo .deps/swap.Po
i586-mingw32msvc-gcc -DHAVE_CONFIG_H -I.     -g -O2  -MT test.o -MD -MP -MF .deps/test.Tpo -c -o test.o test.c
mv -f .deps/test.Tpo .deps/test.Po
i586-mingw32msvc-gcc -DHAVE_CONFIG_H -I.     -g -O2  -MT ttable.o -MD -MP -MF .deps/ttable.Tpo -c -o ttable.o ttable.c
mv -f .deps/ttable.Tpo .deps/ttable.Po
i586-mingw32msvc-gcc -DHAVE_CONFIG_H -I.     -g -O2  -MT util.o -MD -MP -MF .deps/util.Tpo -c -o util.o util.c
mv -f .deps/util.Tpo .deps/util.Po
i586-mingw32msvc-gcc -DHAVE_CONFIG_H -I.     -g -O2  -MT lexpgn.o -MD -MP -MF .deps/lexpgn.Tpo -c -o lexpgn.o lexpgn.c
mv -f .deps/lexpgn.Tpo .deps/lexpgn.Po
i586-mingw32msvc-gcc  -g -O2    -o gnuchess.exe atak.o book.o cmd.o debug.o epd.o eval.o genmove.o getopt.o getopt1.o hash.o hung.o init.o input.o iterate.o main.o move.o null.o output.o players.o pgn.o ponder.o quiesce.o random.o repeat.o search.o solve.o sort.o swap.o test.o ttable.o util.o lexpgn.o 
input.o: In function `CleanupInput':
/home/alex/lixo/gnuchess/gnuchess-5.07.9b/src/input.c:199: undefined reference to `__imp__pthread_join'
input.o: In function `InitInput':
/home/alex/lixo/gnuchess/gnuchess-5.07.9b/src/input.c:194: undefined reference to `__imp__pthread_create'
input.o: In function `wait_for_input':
/home/alex/lixo/gnuchess/gnuchess-5.07.9b/src/input.c:173: undefined reference to `__imp__pthread_mutex_lock'
/home/alex/lixo/gnuchess/gnuchess-5.07.9b/src/input.c:173: undefined reference to `__imp__pthread_mutex_unlock'
/home/alex/lixo/gnuchess/gnuchess-5.07.9b/src/input.c:176: undefined reference to `__imp__pthread_cond_wait'
input.o: In function `input_wakeup':
/home/alex/lixo/gnuchess/gnuchess-5.07.9b/src/input.c:162: undefined reference to `__imp__pthread_mutex_lock'
/home/alex/lixo/gnuchess/gnuchess-5.07.9b/src/input.c:164: undefined reference to `__imp__pthread_mutex_unlock'
/home/alex/lixo/gnuchess/gnuchess-5.07.9b/src/input.c:166: undefined reference to `__imp__pthread_cond_signal'
input.o: In function `input_func':
/home/alex/lixo/gnuchess/gnuchess-5.07.9b/src/input.c:128: undefined reference to `__imp__pthread_mutex_lock'
/home/alex/lixo/gnuchess/gnuchess-5.07.9b/src/input.c:128: undefined reference to `__imp__pthread_mutex_unlock'
/home/alex/lixo/gnuchess/gnuchess-5.07.9b/src/input.c:128: undefined reference to `__imp__pthread_cond_wait'
/home/alex/lixo/gnuchess/gnuchess-5.07.9b/src/input.c:141: undefined reference to `__imp__pthread_cond_signal'
collect2: ld returned 1 exit status
make[2]: *** [gnuchess.exe] Error 1
make[2]: Leaving directory `/home/alex/lixo/gnuchess/gnuchess-5.07.9b/src'
make[1]: *** [all] Error 2
make[1]: Leaving directory `/home/alex/lixo/gnuchess/gnuchess-5.07.9b/src'
make: *** [all-recursive] Error 1


Any help is appreciated!



Hi Alex,

Looks like you've done everything except link the pthread library >
Code: Select all
-lpthreadGCE2


Jim.
___________________________
http://jimablett.net63.net/
Jim Ablett
 
Posts: 721
Joined: 27 Sep 2004, 10:39
Location: Essex, England

Re: gnuchess 5.07.1b

Postby Jim Ablett » 11 Nov 2009, 19:54

..... Or in your case because you are using
Code: Select all
 pthreadGC2.dll
that should be
Code: Select all
 -lpthreadGC2


Jim.
___________________________
http://jimablett.net63.net/
Jim Ablett
 
Posts: 721
Joined: 27 Sep 2004, 10:39
Location: Essex, England

Re: gnuchess 5.07.1b

Postby Michel » 12 Nov 2009, 07:06

"configure" did not locate your pthread library.

You should copy libpthreadGC2.a to

/usr/i586-mingw32msvc/lib/

and make a symlink

/usr/i586-mingw32msvc/lib/libpthread.a -> /usr/i586-mingw32msvc/lib/libpthreadGC2.a

If you do "./configure" it should then be able to pick up your mingw pthread library.

I have also installed all .h files in /usr/i586-mingw32msvc/include/ but it seems
that in your case gcc is already able to find those.

EDIT: If configure fails you can you can always inspect config.log to see exactly
which test failed.
Michel
 
Posts: 513
Joined: 01 Oct 2008, 12:15

Re: gnuchess 5.07.1b

Postby ignacioalex » 13 Nov 2009, 00:17

Jim and Michel, thanks for your assistance! I've put in the pthreads header and library files into the appropriate places and now the compilation process flows smoothly.

Another point that confused me was that the libncurses and libreadline dependencies seem to be optional, as I ignored the related complaints in the output of configure and the executable is working nevertheless.

Indeed, the executable built with MinGW does not show the weird behaviour I was describing earlier with my executable built with Cygwin.
ignacioalex
 
Posts: 22
Joined: 02 Sep 2009, 21:38

Re: gnuchess 5.07.1b

Postby Michel » 13 Nov 2009, 10:56

Another point that confused me was that the libncurses and libreadline dependencies seem to be optional, as I ignored the related complaints in the output of configure and the executable is working nevertheless.


Yes these are optional dependencies. If you have readline then the console (i.e. non-xboard) mode of GnuChess is somewhat more pleasant to work with. But I doubt windows users will use GnuChess in console mode (this is really only for testing).
Michel
 
Posts: 513
Joined: 01 Oct 2008, 12:15

Re: gnuchess 5.07.1b

Postby Kirill Kryukov » 04 Mar 2010, 04:12

"GNU Chess 5.07.9b 64-bit JA" is starting to play in my tournament. After 1088 games it has rating of 2440 points, which is 120 points higher than "GNU Chess 5.07 64-bit JA". I think that at least 100 points of this improvement can be attributed to the fixed time management with external book. Also this version is much more stable than 5.07. It still crashes approximately once every 30 or 40 games in my tests.

Thanks to Michel for providing the bug-fixed version and to Jim for making a fast compile!

EDIT: Comparison of GNU Chess versions
User avatar
Kirill Kryukov
 
Posts: 127
Joined: 21 Sep 2005, 09:56

Re: gnuchess 5.07.1b

Postby Michel » 07 Mar 2010, 09:55

I guess I missed this post.

After 1088 games it has rating of 2440 points, which is 120 points higher than "GNU Chess 5.07 64-bit JA"


Good! It is good to have some objective data on the strength of GuChess

Also this version is much more stable than 5.07. It still crashes approximately once every 30 or 40 games in my tests.



The crashes you still observe are due to buffer overflows (search extensions that overflow the statically declared move arrays).

Rather than making more adhoc fixes I started a complete refactoring of GnuChess' code. Once it is done GnuChess
will not contain such bugs anymore.

It will also be easy to add features like UCI, MultiPV, polyglot books, Gaviota table bases etc...

Of course I hope that eventually I can make Gnuchess stronger by auto tuning its search and eval but I am not there yet.




.
Michel
 
Posts: 513
Joined: 01 Oct 2008, 12:15

PreviousNext

Return to Winboard and related Topics

Who is online

Users browsing this forum: No registered users and 16 guests