Compiling and testing Winboard development versions

Discussions about the WinBoard protocol. Here you can also report bugs and request new features.

Moderators: hgm, Andres Valverde

Re: Compiling and testing Winboard development versions

Postby lantonov » 08 Sep 2014, 17:52

The last patches introduce new errors in compiling:
Code: Select all
antonov@bdah9-laptop /mingw/xboard-50b7571/winboard
$ make -f makefile.gcc
 ../backend.c
 ../book.c
 ../gamelist.c
 ../lists.c
 ../moves.c
 ../pgntags.c
 ../uci.c
 ../zippy.c
 ../parser.c
windres -D_WIN32_IE=0x0300 -DWIN32 --use-temp-file --include-dir .. winboard.rc
-O coff -o wbres.o
 wclipbrd.c
 wedittags.c
 wengineoutput.c
wengineoutput.c: In function 'ResizeWindowControls':
wengineoutput.c:181:9: warning: variable 'npsWidth' set but not used [-Wunused-b
ut-set-variable]
     int npsWidth;
         ^
wengineoutput.c:180:9: warning: variable 'maxControlWidth' set but not used [-Wu
nused-but-set-variable]
     int maxControlWidth;
         ^
 wevalgraph.c
 wgamelist.c
 whistory.c
 ../history.c
 winboard.c
winboard.c: In function 'WinMain':
winboard.c:828:2: error: incompatible type for argument 1 of 'HandleMessage'
  HandleMessage(msg);
  ^
winboard.c:789:13: note: expected 'struct MSG *' but argument is of type 'MSG'
 static void HandleMessage P((MSG *message));
             ^
winboard.c: In function 'DoEvents':
winboard.c:941:2: error: incompatible type for argument 1 of 'HandleMessage'
  HandleMessage(msg);
  ^
winboard.c:836:1: note: expected 'struct MSG *' but argument is of type 'MSG'
 HandleMessage (MSG *message)
 ^
make: *** [winboard.o] Error 1
lantonov
 
Posts: 51
Joined: 28 Feb 2014, 08:43

Re: Compiling and testing Winboard development versions

Postby H.G.Muller » 08 Sep 2014, 19:23

Oh, sorry, my mistake. I prepare the code on Linux, where I have git, and then I load the tar ball on a Windows machine for testing it there. This then of course has all kind of bugs, which I fix, but there is no easy way to get the debugged code back to Linux, so I just retype the fixes by hand on Linux, if they are not too big. In this case I had forgotten to write &msg in stead of msg in two places.
User avatar
H.G.Muller
 
Posts: 3066
Joined: 16 Nov 2005, 12:02
Location: Diemen, NL

Re: Compiling and testing Winboard development versions

Postby lantonov » 08 Sep 2014, 19:29

No problem, glad to help. 8-)
lantonov
 
Posts: 51
Joined: 28 Feb 2014, 08:43

Re: Compiling and testing Winboard development versions

Postby lantonov » 05 Feb 2015, 21:57

The latest development version xboard-3096385 gives the following warnings when trying to compile winboard on mingw (gcc 4.8.1):
Code: Select all
$ make -f makefile.gcc
 ../backend.c
../backend.c: In function 'ApplyMove':
../backend.c:10017:45: warning: 'killed' may be used uninitialized in this funct
ion [-Wmaybe-uninitialized]
  board[toY][toX + (killX < fromX ? 1 : -1)] = killed;
                                             ^
 ../book.c
 ../gamelist.c
 ../lists.c
 ../moves.c
../moves.c: In function 'CollectPieceDescriptors':
../moves.c:195:21: warning: variable 'pieceName' set but not used [-Wunused-but-
set-variable]
     char *m, c, d, *pieceName = defaultName;
                     ^
 ../pgntags.c
 ../uci.c
 ../zippy.c
 ../parser.c
windres -D_WIN32_IE=0x0300 -DWIN32 --use-temp-file --include-dir .. winboard.rc
-O coff -o wbres.o
 wclipbrd.c
 wedittags.c
 wengineoutput.c
wengineoutput.c: In function 'ResizeWindowControls':
wengineoutput.c:181:9: warning: variable 'npsWidth' set but not used [-Wunused-b
ut-set-variable]
     int npsWidth;
         ^
wengineoutput.c:180:9: warning: variable 'maxControlWidth' set but not used [-Wu
nused-but-set-variable]
     int maxControlWidth;
         ^
 wevalgraph.c
 wgamelist.c
 whistory.c
 ../history.c
 winboard.c
 wlayout.c
 woptions.c
 wsnap.c
 wsockerr.c
 help.c
 wsettings.c
wsettings.c: In function 'AddOption':
wsettings.c:578:2: warning: case value '104' not in enumerated type 'Control' [-
Wswitch]
  case Spin+100:
  ^
 wchat.c
 ../engineoutput.c
 ../evalgraph.c
"C:/Help Workshop/hcrtf" -xn winboard.hpj && @cat winboard.err && @mv winboard.h
lp tmp.hlp && @mv tmp.hlp winboard.hlp || true # these moves to get the case rig
ht
/bin/sh: @cat: command not found
gcc  backend.o book.o gamelist.o lists.o moves.o pgntags.o uci.o zippy.o parser.
o wbres.o wclipbrd.o wedittags.o wengineoutput.o wevalgraph.o wgamelist.o whisto
ry.o history.o winboard.o wlayout.o woptions.o wsnap.o wsockerr.o help.o wsettin
gs.o wchat.o engineoutput.o evalgraph.o -lmsvcrt -DNDEBUG -fpic -s -mwindows -lw
sock32 -lwinmm -lcomctl32 -o winboard.exe

Not a big deal (maybe the AddOption warning is a tad more serious), just letting you know.
lantonov
 
Posts: 51
Joined: 28 Feb 2014, 08:43

Re: Compiling and testing Winboard development versions

Postby lantonov » 06 Feb 2015, 15:34

And these are the warnings with Cygwin (gcc 4.8.2)
Code: Select all
$ make -f makefile.gcc
 ../backend.c
../backend.c: In function ‘HandleMachineMove’:
../backend.c:9479:10: warning: unknown conversion type character ‘l’ in format [-Wformat]
../backend.c:9479:10: warning: format ‘%[^
’ expects argument of type ‘char *’, but argument 7 has type ‘long long unsigned int *’ [-Wformat]
../backend.c:9479:10: warning: too many arguments for format [-Wformat-extra-args]
../backend.c:9627:10: warning: unknown conversion type character ‘l’ in format [-Wformat]
../backend.c:9627:10: warning: format ‘%d’ expects argument of type ‘int *’, but argument 4 has type ‘long long unsigned int *’ [-Wformat]
../backend.c:9627:10: warning: format ‘%s’ expects argument of type ‘char *’, but argument 7 has type ‘int *’ [-Wformat]
../backend.c:9627:10: warning: too many arguments for format [-Wformat-extra-args]
../backend.c:9690:10: warning: unknown conversion type character ‘l’ in format [-Wformat]
../backend.c:9690:10: warning: format ‘%[^
’ expects argument of type ‘char *’, but argument 7 has type ‘long long unsigned int *’ [-Wformat]
../backend.c:9690:10: warning: too many arguments for format [-Wformat-extra-args]
../backend.c: In function ‘ApplyMove’:
../backend.c:10017:45: warning: ‘killed’ may be used uninitialized in this function [-Wmaybe-uninitialized]
 ../book.c
 ../gamelist.c
 ../lists.c
 ../moves.c
../moves.c: In function ‘CollectPieceDescriptors’:
../moves.c:195:21: warning: variable ‘pieceName’ set but not used [-Wunused-but-set-variable]
 ../pgntags.c
 ../uci.c
 ../zippy.c
 ../parser.c
windres -D_WIN32_IE=0x0300 -DWIN32 --use-temp-file --include-dir .. winboard.rc -O coff -o wbres.o
cygwin warning:
  MS-DOS style path detected: res\winboard.exe.manifest
  Preferred POSIX equivalent is: res/winboard.exe.manifest
  CYGWIN environment variable option "nodosfilewarning" turns off this warning.
  Consult the user's guide for more details about POSIX paths:
    http://cygwin.com/cygwin-ug-net/using.html#using-pathnames
 wclipbrd.c
 wedittags.c
 wengineoutput.c
wengineoutput.c: In function ‘ResizeWindowControls’:
wengineoutput.c:181:9: warning: variable ‘npsWidth’ set but not used [-Wunused-but-set-variable]
wengineoutput.c:180:9: warning: variable ‘maxControlWidth’ set but not used [-Wunused-but-set-variable]
 wevalgraph.c
 wgamelist.c
 whistory.c
 ../history.c
 winboard.c
 wlayout.c
 woptions.c
 wsnap.c
 wsockerr.c
 help.c
 wsettings.c
wsettings.c: In function ‘AddOption’:
wsettings.c:578:2: warning: case value ‘104’ not in enumerated type ‘Control’ [-Wswitch]
 wchat.c
wchat.c: In function ‘ChatProc’:
wchat.c:316:7: warning: value computed is not used [-Wunused-value]
wchat.c: In function ‘OutputChatMessage’:
wchat.c:408:6: warning: value computed is not used [-Wunused-value]
 ../engineoutput.c
../engineoutput.c: In function ‘UpdateControls’:
../engineoutput.c:578:13: warning: unknown conversion type character ‘l’ in format [-Wformat]
../engineoutput.c:578:13: warning: format ‘%s’ expects argument of type ‘char *’, but argument 4 has type ‘long long unsigned int’ [-Wformat]
../engineoutput.c:578:13: warning: too many arguments for format [-Wformat-extra-args]
 ../evalgraph.c
"C:/Program Files/Help Workshop/hcrtf" -xn winboard.hpj && @cat winboard.err && @mv winboard.hlp tmp.hlp && @mv tmp.hlp winboard.hlp || true # these moves to get the case right
/bin/sh: C:/Program Files/Help Workshop/hcrtf: No such file or directory
i686-pc-mingw32-gcc  backend.o book.o gamelist.o lists.o moves.o pgntags.o uci.o zippy.o parser.o wbres.o wclipbrd.o wedittags.o wengineoutput.o wevalgraph.o wgamelist.o whistory.o history.o winboard.o wlayout.o woptions.o wsnap.o wsockerr.o help.o wsettings.o wchat.o engineoutput.o evalgraph.o  -DNDEBUG -fpic -s -mwindows -lwsock32 -lwinmm -lcomctl32 -o winboard.exe
lantonov
 
Posts: 51
Joined: 28 Feb 2014, 08:43

Re: Compiling and testing Winboard development versions

Postby lantonov » 05 Dec 2015, 21:06

Been away from this forum for a while. Now with the latest development version of Winboard (xboard-f782a12) and somewhat older gcc (4.7.3) I get the following when try to compile:
Code: Select all
C:\mingw64\xboard-f782a12\winboard>make -f makefile.gcc
 ../backend.c
../backend.c: In function 'ApplyMove':
../backend.c:9989:70: warning: variable 'killed2' set but not used [-Wunused-but-set-variable]
../backend.c:10091:45: warning: 'killed' may be used uninitialized in this function [-Wmaybe-uninitialized]
 ../book.c
 ../gamelist.c
 ../lists.c
 ../moves.c
../moves.c: In function 'CollectPieceDescriptors':
../moves.c:208:21: warning: variable 'pieceName' set but not used [-Wunused-but-set-variable]
 ../pgntags.c
 ../uci.c
 ../zippy.c
 ../parser.c
windres -D_WIN32_IE=0x0300 -DWIN32 --use-temp-file --include-dir .. winboard.rc -O coff -o wbres.o
 wclipbrd.c
 wedittags.c
wedittags.c: In function 'EitherTagsPopUp':
wedittags.c:258:5: warning: statement with no effect [-Wunused-value]
 wengineoutput.c
wengineoutput.c: In function 'ResizeWindowControls':
wengineoutput.c:181:9: warning: variable 'npsWidth' set but not used [-Wunused-but-set-variable]
wengineoutput.c:180:9: warning: variable 'maxControlWidth' set but not used [-Wunused-but-set-variable]
wengineoutput.c: In function 'EngineOutputPopUp':
wengineoutput.c:405:5: warning: statement with no effect [-Wunused-value]
 wevalgraph.c
wevalgraph.c: In function 'EvalGraphPopUp':
wevalgraph.c:291:5: warning: statement with no effect [-Wunused-value]
 wgamelist.c
wgamelist.c: In function 'GameListPopUp':
wgamelist.c:413:5: warning: statement with no effect [-Wunused-value]
 whistory.c
whistory.c: In function 'MoveHistoryPopUp':
whistory.c:276:5: warning: statement with no effect [-Wunused-value]
 ../history.c
 winboard.c
winboard.c: In function 'TranslateMenus':
winboard.c:469:67: warning: cast from pointer to integer of different size [-Wpointer-to-int-cast]
winboard.c: In function 'InitInstance':
winboard.c:1148:16: error: 'ChessProgramState' has no member named 'prog'
winboard.c:1151:7: warning: implicit declaration of function 'StartChessProgram' [-Wimplicit-function-declaration]
winboard.c:1152:49: warning: cast from pointer to integer of different size [-Wpointer-to-int-cast]
winboard.c: In function 'SaveFontArg':
winboard.c:1526:34: warning: cast from pointer to integer of different size [-Wpointer-to-int-cast]
winboard.c: In function 'SaveColor':
winboard.c:1566:46: warning: cast from pointer to integer of different size [-Wpointer-to-int-cast]
winboard.c: In function 'PopUpStartupDialog':
winboard.c:1642:5: warning: statement with no effect [-Wunused-value]
winboard.c: In function 'InitDrawingSizes':
winboard.c:2391:2: warning: cast from pointer to integer of different size [-Wpointer-to-int-cast]
winboard.c:2530:1: warning: cast to pointer from integer of different size [-Wint-to-pointer-cast]
winboard.c: In function 'PromotionPopup':
winboard.c:4641:3: warning: statement with no effect [-Wunused-value]
winboard.c: In function 'WndProc':
winboard.c:5428:51: warning: cast from pointer to integer of different size [-Wpointer-to-int-cast]
winboard.c:5437:61: warning: cast from pointer to integer of different size [-Wpointer-to-int-cast]
winboard.c:5458:7: warning: statement with no effect [-Wunused-value]
winboard.c: In function 'OpenFileDialog':
winboard.c:6047:36: warning: cast from pointer to integer of different size [-Wpointer-to-int-cast]
winboard.c:6050:36: warning: cast to pointer from integer of different size [-Wint-to-pointer-cast]
winboard.c: In function 'StartupDialog':
winboard.c:6413:52: warning: cast from pointer to integer of different size [-Wpointer-to-int-cast]
winboard.c: In function 'EitherCommentPopUp':
winboard.c:6652:5: warning: statement with no effect [-Wunused-value]
winboard.c: In function 'PopUpMoveDialog':
winboard.c:6710:7: warning: statement with no effect [-Wunused-value]
winboard.c: In function 'PopUpNameDialog':
winboard.c:6771:7: warning: statement with no effect [-Wunused-value]
winboard.c: In function 'ErrorPopUp':
winboard.c:6816:5: warning: statement with no effect [-Wunused-value]
winboard.c: In function 'GothicPopUp':
winboard.c:6936:5: warning: statement with no effect [-Wunused-value]
winboard.c: In function 'ModeHighlight':
winboard.c:8245:21: error: 'IDM_TwoMachine' undeclared (first use in this function)
winboard.c:8245:21: note: each undeclared identifier is reported only once for each function it appears in
winboard.c:8247:3: error: expected ';' before 'CheckMark'
winboard.c: In function 'AskQuestion':
winboard.c:8570:5: warning: statement with no effect [-Wunused-value]
make: *** [winboard.o] Error 1
lantonov
 
Posts: 51
Joined: 28 Feb 2014, 08:43

Re: Compiling and testing Winboard development versions

Postby Josh Pettus » 07 Dec 2015, 00:12

I don't think it compiles out side of the ancient copy of GCC (4.4?) Harm uses that can build windows builds (as oppose to for cygwin) with the -no-cygwin flag. That functionality has long been replaced with mingw compilers, but I couldn't get it to work last time I tried many months ago. Bit of a pain considering Cygwin doesn't let you install old versions of GCC. You have to compile it yourself.
Josh Pettus
 
Posts: 309
Joined: 11 Mar 2009, 01:11

Re: Compiling and testing Winboard development versions

Postby beneficii » 08 Dec 2015, 02:27

I was able to get Winboard 4.8 to compile in Visual Studio 2015 (Community). I opened the VC6 project and updated it to the current version. There are some changes that have to be made, like turning off the warnings. There were a few errors, the biggest being snprintf being #defined, which is not supposed to happen in user code in Visual Studio 2015. I just did a preprocessor conditional which prevented snprintf from being #defined by the Winboard code in this version of VC. There might have been one or two others, but I have been able to compile.

As for the development versions, I don't know anything about those.

EDIT: I remember now. I had to remove the manifest from the resource file.
beneficii
 
Posts: 43
Joined: 07 May 2010, 05:17

Re: Compiling and testing Winboard development versions

Postby lantonov » 08 Dec 2015, 10:33

If you look through the previous posts in this thread, there were problems with Cygwin and Mingw for development versions before, after, and including Winboard 4.8. I remember that there were problems for snprintf in gcc, too. These were cleared with hgm to a point that Winboard 4.8 gave only a few insignificant warnings. The errors and warnings in the last post are mostly for a code added after Winboard 4.8. Some are easy to correct such as a missing semicolon, but for others like not defined values, one (hgm) must know the code in details to correct.

beneficii wrote:I was able to get Winboard 4.8 to compile in Visual Studio 2015 (Community). I opened the VC6 project and updated it to the current version. There are some changes that have to be made, like turning off the warnings. There were a few errors, the biggest being snprintf being #defined, which is not supposed to happen in user code in Visual Studio 2015. I just did a preprocessor conditional which prevented snprintf from being #defined by the Winboard code in this version of VC. There might have been one or two others, but I have been able to compile.

As for the development versions, I don't know anything about those.

EDIT: I remember now. I had to remove the manifest from the resource file.
lantonov
 
Posts: 51
Joined: 28 Feb 2014, 08:43

Previous

Return to WinBoard development and bugfixing

Who is online

Users browsing this forum: No registered users and 1 guest