Compiling Winboard from Xboard GIT

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

Moderators: hgm, Andres Valverde

Compiling Winboard from Xboard GIT

Postby vsoljan » 16 Aug 2010, 15:40

I downloaded latest snapshot of Xboard/Winboard from GIT repository ( http://git.savannah.gnu.org/cgit/xboard ... 20c.tar.gz ) and managed to compile it on Ubuntu 10.04 with no problems, but in Windows XP I get all kind of error messages and can't compile it. I did read "COMPILING" in Winboard dir.
I am using Dev-Cpp portable (http://sourceforge.net/projects/devcpp- ... e/download) but I don't think these errors are compiler related because when I tried to compile it in MS Visual Studio 2008 I got same kind of errors.
First when I load Winboard.dev from Winboard dir I get error that parser.c is not found.
Than I tried to copy parser.* from xboard dir to winboard dir and after that project loaded ok, but when compiling I got 5 errors. Here is Compile log:

Compiler: Default compiler
Building Makefile: "D:\Temp\xboard-4.5a\winboard\Makefile.win"
Executing make...
make.exe -f "D:\Temp\xboard-4.5a\winboard\Makefile.win" all
gcc.exe -c wsockerr.c -o ./objs/wsockerr.o -I"D:/PortableApps/Dev-CppPortable/App/devcpp/include" -I.. -I. -DNDEBUG -O3

gcc.exe -c parser.c -o ./objs/parser.o -I"D:/PortableApps/Dev-CppPortable/App/devcpp/include" -I.. -I. -DNDEBUG -O3

In file included from D:/PortableApps/Dev-CppPortable/App/devcpp/include/io.h:21,
from D:/PortableApps/Dev-CppPortable/App/devcpp/include/unistd.h:10,
from parser.c:1817:

D:/PortableApps/Dev-CppPortable/App/devcpp/include/stdint.h:72:1: warning: "INT16_MIN" redefined
parser.c:63:1: warning: this is the location of the previous definition
D:/PortableApps/Dev-CppPortable/App/devcpp/include/stdint.h:73:1: warning: "INT32_MIN" redefined
parser.c:66:1: warning: this is the location of the previous definition
D:/PortableApps/Dev-CppPortable/App/devcpp/include/stdint.h:76:1: warning: "INT8_MAX" redefined
parser.c:69:1: warning: this is the location of the previous definition

D:/PortableApps/Dev-CppPortable/App/devcpp/include/stdint.h:77:1: warning: "INT16_MAX" redefined
parser.c:72:1: warning: this is the location of the previous definition
D:/PortableApps/Dev-CppPortable/App/devcpp/include/stdint.h:78:1: warning: "INT32_MAX" redefined
parser.c:75:1: warning: this is the location of the previous definition
D:/PortableApps/Dev-CppPortable/App/devcpp/include/stdint.h:81:1: warning: "UINT8_MAX" redefined
parser.c:78:1: warning: this is the location of the previous definition
D:/PortableApps/Dev-CppPortable/App/devcpp/include/stdint.h:82:1: warning: "UINT16_MAX" redefined
parser.c:81:1: warning: this is the location of the previous definition
D:/PortableApps/Dev-CppPortable/App/devcpp/include/stdint.h:83:1: warning: "UINT32_MAX" redefined

parser.c:84:1: warning: this is the location of the previous definition

gcc.exe -c wclipbrd.c -o ./objs/wclipbrd.o -I"D:/PortableApps/Dev-CppPortable/App/devcpp/include" -I.. -I. -DNDEBUG -O3

gcc.exe -c wedittags.c -o ./objs/wedittags.o -I"D:/PortableApps/Dev-CppPortable/App/devcpp/include" -I.. -I. -DNDEBUG -O3

gcc.exe -c wevalgraph.c -o ./objs/wevalgraph.o -I"D:/PortableApps/Dev-CppPortable/App/devcpp/include" -I.. -I. -DNDEBUG -O3

gcc.exe -c wgamelist.c -o ./objs/wgamelist.o -I"D:/PortableApps/Dev-CppPortable/App/devcpp/include" -I.. -I. -DNDEBUG -O3

gcc.exe -c whistory.c -o ./objs/whistory.o -I"D:/PortableApps/Dev-CppPortable/App/devcpp/include" -I.. -I. -DNDEBUG -O3

gcc.exe -c winboard.c -o ./objs/winboard.o -I"D:/PortableApps/Dev-CppPortable/App/devcpp/include" -I.. -I. -DNDEBUG -O3

gcc.exe -c wlayout.c -o ./objs/wlayout.o -I"D:/PortableApps/Dev-CppPortable/App/devcpp/include" -I.. -I. -DNDEBUG -O3

gcc.exe -c woptions.c -o ./objs/woptions.o -I"D:/PortableApps/Dev-CppPortable/App/devcpp/include" -I.. -I. -DNDEBUG -O3

gcc.exe -c wsnap.c -o ./objs/wsnap.o -I"D:/PortableApps/Dev-CppPortable/App/devcpp/include" -I.. -I. -DNDEBUG -O3

gcc.exe -c ../uci.c -o ./objs/uci.o -I"D:/PortableApps/Dev-CppPortable/App/devcpp/include" -I.. -I. -DNDEBUG -O3

gcc.exe -c ../backend.c -o ./objs/backend.o -I"D:/PortableApps/Dev-CppPortable/App/devcpp/include" -I.. -I. -DNDEBUG -O3

In file included from ../backend.c:13772:
../backend.c: In function `ParseFeatures':
../backend.c:13639: warning: passing arg 3 of `StringFeature' from incompatible pointer type

In file included from ../backend.c:13780:
../backend.c:13639: warning: passing arg 3 of `StringFeature' from incompatible pointer type

In file included from ../backend.c:13804:
../backend.c:13639: warning: passing arg 3 of `StringFeature' from incompatible pointer type

In file included from ../backend.c:13805:
../backend.c:13639: warning: passing arg 3 of `StringFeature' from incompatible pointer type

gcc.exe -c ../book.c -o ./objs/book.o -I"D:/PortableApps/Dev-CppPortable/App/devcpp/include" -I.. -I. -DNDEBUG -O3

gcc.exe -c ../gamelist.c -o ./objs/gamelist.o -I"D:/PortableApps/Dev-CppPortable/App/devcpp/include" -I.. -I. -DNDEBUG -O3

gcc.exe -c ../lists.c -o ./objs/lists.o -I"D:/PortableApps/Dev-CppPortable/App/devcpp/include" -I.. -I. -DNDEBUG -O3

gcc.exe -c ../moves.c -o ./objs/moves.o -I"D:/PortableApps/Dev-CppPortable/App/devcpp/include" -I.. -I. -DNDEBUG -O3

gcc.exe -c ../pgntags.c -o ./objs/pgntags.o -I"D:/PortableApps/Dev-CppPortable/App/devcpp/include" -I.. -I. -DNDEBUG -O3

gcc.exe -c ../zippy.c -o ./objs/zippy.o -I"D:/PortableApps/Dev-CppPortable/App/devcpp/include" -I.. -I. -DNDEBUG -O3

gcc.exe -c help.c -o ./objs/help.o -I"D:/PortableApps/Dev-CppPortable/App/devcpp/include" -I.. -I. -DNDEBUG -O3

gcc.exe -c wsettings.c -o ./objs/wsettings.o -I"D:/PortableApps/Dev-CppPortable/App/devcpp/include" -I.. -I. -DNDEBUG -O3

gcc.exe -c wchat.c -o ./objs/wchat.o -I"D:/PortableApps/Dev-CppPortable/App/devcpp/include" -I.. -I. -DNDEBUG -O3

gcc.exe -c wengineoutput.c -o ./objs/wengineoutput.o -I"D:/PortableApps/Dev-CppPortable/App/devcpp/include" -I.. -I. -DNDEBUG -O3

gcc.exe -c ../evalgraph.c -o ./objs/evalgraph.o -I"D:/PortableApps/Dev-CppPortable/App/devcpp/include" -I.. -I. -DNDEBUG -O3

gcc.exe -c ../engineoutput.c -o ./objs/engineoutput.o -I"D:/PortableApps/Dev-CppPortable/App/devcpp/include" -I.. -I. -DNDEBUG -O3

windres.exe -i Winboard_private.rc --input-format=rc -o ./objs/Winboard_private.res -O coff --include-dir ..

gcc.exe ./objs/wsockerr.o ./objs/parser.o ./objs/wclipbrd.o ./objs/wedittags.o ./objs/wevalgraph.o ./objs/wgamelist.o ./objs/whistory.o ./objs/winboard.o ./objs/wlayout.o ./objs/woptions.o ./objs/wsnap.o ./objs/uci.o ./objs/backend.o ./objs/book.o ./objs/gamelist.o ./objs/lists.o ./objs/moves.o ./objs/pgntags.o ./objs/zippy.o ./objs/help.o ./objs/wsettings.o ./objs/wchat.o ./objs/wengineoutput.o ./objs/evalgraph.o ./objs/engineoutput.o ./objs/Winboard_private.res -o "Winboard.exe" -L"D:/PortableApps/Dev-CppPortable/App/devcpp/lib" -mwindows -fpic -s -mwindows -lwsock32 -lwinmm -lcomctl32 -s

./objs/whistory.o(.text+0x3df):whistory.c: undefined reference to `RefreshMemoContent'
./objs/whistory.o(.text+0x3e4):whistory.c: undefined reference to `MemoContentUpdated'
./objs/whistory.o(.text+0x608):whistory.c: undefined reference to `FindMoveByCharIndex'
./objs/winboard.o(.text+0x1d974):winboard.c: undefined reference to `MoveHistorySet'
collect2: ld returned 1 exit status

make.exe: *** [Winboard.exe] Error 1

Execution terminated


Am I doing something wrong or is this Winboard source from GIT somehow broken?
Please help!

Regards,
Vinko Soljan
Last edited by vsoljan on 17 Aug 2010, 14:16, edited 1 time in total.
vsoljan
 
Posts: 24
Joined: 28 Sep 2009, 14:15

Re: Compiling Winboard from Xboard GIT

Postby vsoljan » 17 Aug 2010, 08:54

Today I compiled Winboard-4.4.3 and Winboard-4.4.4.20100806 with Dev-Cpp portable without any problems (just few compiler warnings) so I guess the compiler is ok and I am not doing anything wrong. So what is wrong with the latest snapshot of Winboard (Winboard with ics seek graph) in GIT repository?
vsoljan
 
Posts: 24
Joined: 28 Sep 2009, 14:15

Re: Compiling Winboard from Xboard GIT

Postby H.G.Muller » 17 Aug 2010, 21:32

The main problem is that the .dev file is not updated. There has been a change in the code organization, where part of whistory.c has now been separated off, and put in its own file ../history.c, to be able to use it in XBoard. So this file should be added to the project.

I don't use devcpp, so I only know how to update the gcc and ms makefiles. Fortunately these files need very little updating, because we hardly ever change the file structure for WinBoard. (Much unlike XBoard, where we add new files all the time, mostly replicas of files that already exist for WinBoard but have no XBoard counterpart yet..)

I am not sure about the warnings. They are probably harmless, but it is still strange that you have them. The only warnings I get when compiling WinBoard under Cygwin / gcc is for the four 64-bit formats in printf statements, caused by a mismatch between the MSVC run-time library printf function, and what gcc thinks a printf should do (%I64u formats).
User avatar
H.G.Muller
 
Posts: 3453
Joined: 16 Nov 2005, 12:02
Location: Diemen, NL

Re: Compiling Winboard from Xboard GIT

Postby vsoljan » 18 Aug 2010, 10:58

Thanks, I hope .dev file will be updated soon so I can build and test latest version of Winboard...
Dev-Cpp can import Visual C++ project files (.dsp) so I tried that too, but it seems that file is also not updated.
vsoljan
 
Posts: 24
Joined: 28 Sep 2009, 14:15

Re: Compiling Winboard from Xboard GIT

Postby vsoljan » 18 Aug 2010, 14:33

I did it!!! I managed to fix .dev file myself. It was much easier than I thought.

I changed:

UnitCount=26 --> UnitCount=27,

Fixed the line with parser.c (path was wrong):

FileName=parser.c --> FileName=..\parser.c

And added file history.c at the end of .dev file:

[Unit27]
FileName=..\history.c
CompileCpp=0
Folder=Winboard
Compile=1
Link=1
Priority=1000
OverrideBuildCmd=0
BuildCmd=

It compiled ok!

Thanks for the tip about history.c !
vsoljan
 
Posts: 24
Joined: 28 Sep 2009, 14:15

Re: Compiling Winboard from Xboard GIT

Postby H.G.Muller » 18 Aug 2010, 19:20

Can you mail me the working dev file? then I will put it in the repository.
User avatar
H.G.Muller
 
Posts: 3453
Joined: 16 Nov 2005, 12:02
Location: Diemen, NL

Re: Compiling Winboard from Xboard GIT

Postby vsoljan » 18 Aug 2010, 19:39

My email could not get through so you can download Winboard.dev and WB4Jaws.dev (also fixed) frome here:
http://albatros.pondi.hr/Winboard_dev.zip
vsoljan
 
Posts: 24
Joined: 28 Sep 2009, 14:15


Return to WinBoard development and bugfixing

Who is online

Users browsing this forum: No registered users and 10 guests