Windows compilers - general question

Discussion of anything and everything relating to chess playing software and machines.

Moderator: Ras

Norbert Raimund Leisner
Posts: 1643
Joined: Tue May 20, 2008 4:57 pm
Location: Augsburg - Germany

Windows compilers - general question

Post by Norbert Raimund Leisner »

Hello together,

what is in your opinion a suitable compiler for the source code of Galjoen Chess Engine ~ http://www.goudengaljoen.be/ , e.g.
MinGW http://www.mingw.org/ respectively Cygwin https://www.cygwin.com/ ?

It seems that GCC https://gcc.gnu.org/ is not working - Dann Corbit tried it out.

I use Windows 7 OS (32-bit and 64-bit) at the moment.

Best wishes,
Norbert
jdart
Posts: 4431
Joined: Fri Mar 10, 2006 5:23 am
Location: http://www.arasanchess.org

Re: Windows compilers - general question

Post by jdart »

The cygwin compiler is gcc, just with a linux-like C library that interfaces to Windows. MingW is also gcc but supports Windows system calls. You probably want cygwin, because as far as I can tell this engine was not designed as a Windows app. But if gcc linux did not work probably cygwin won't either.

The newly released gcc 5.0 has better support for C++ 11 but may not be available in a cygwin distribution yet.

You could try the free MSVC edition (http://www.visualstudio.com/).

--Jon
User avatar
velmarin
Posts: 1600
Joined: Mon Feb 21, 2011 9:48 am

Re: Windows compilers - general question

Post by velmarin »

jdart wrote: You could try the free MSVC edition (http://www.visualstudio.com/).

--Jon
Impossible, not microsoft, nor Intel nor LLVM, too many errors for a short life.
:shock:
Dann Corbit
Posts: 12870
Joined: Wed Mar 08, 2006 8:57 pm
Location: Redmond, WA USA

Re: Windows compilers - general question

Post by Dann Corbit »

Norbert Raimund Leisner wrote:Hello together,

what is in your opinion a suitable compiler for the source code of Galjoen Chess Engine ~ http://www.goudengaljoen.be/ , e.g.
MinGW http://www.mingw.org/ respectively Cygwin https://www.cygwin.com/ ?

It seems that GCC https://gcc.gnu.org/ is not working - Dann Corbit tried it out.

I use Windows 7 OS (32-bit and 64-bit) at the moment.

Best wishes,
Norbert
Mingw GCC works fine, but not on that source code base.
There is enough stuff that is highly Posix specific that it can't compile with mingw.
A cross compiler might work.
Cygwin might work.
I just don't want to spend the effort to try to port it.
Another example of a program that Mingw won't compile properly is the current GNU Chess (FSF version).

It often seems to me that people aim to make programs non-portable. It is not difficult to write portable code, especially with a console driven text based engine.

I don't particularly like cygwin because the binaries are not quite as fast and the license for using it is ambiguous to me.
I much prefer mingw, and if mingw can't compile it then it is likely to be poorly written anyway. Sometimes, the fixes are trivial, and a few quick edits will fix a source code base.

I have plenty to do such that I don't need to spend dozens of hours trying to iron the wrinkles out of other people's non-portable code.

If there was something interesting about the program that I wanted to investigate I might do it anyway. But not in general.
Sven
Posts: 4052
Joined: Thu May 15, 2008 9:57 pm
Location: Berlin, Germany
Full name: Sven Schüle

Re: Windows compilers - general question

Post by Sven »

Norbert Raimund Leisner wrote:Hello together,

what is in your opinion a suitable compiler for the source code of Galjoen Chess Engine ~ http://www.goudengaljoen.be/ , e.g.
MinGW http://www.mingw.org/ respectively Cygwin https://www.cygwin.com/ ?

It seems that GCC https://gcc.gnu.org/ is not working - Dann Corbit tried it out.

I use Windows 7 OS (32-bit and 64-bit) at the moment.

Best wishes,
Norbert
Hi Norbert,

you could try the Intel compiler v15.0 (30 days trial?), it is possible that it supports more C++11 features than MinGW, CygWin, and VS2013.

In any case, porting a C++11 program to Windows that has been written for Linux with a recent gcc could be a non-trivial task. You could ask the author whether he is interested in porting his engine to a current popular Windows compiler. Or you wait until he publishes Windows binaries.

Sven
User avatar
Jim Ablett
Posts: 2454
Joined: Fri Jul 14, 2006 7:56 am
Location: London, England
Full name: Jim Ablett

Re: Windows compilers - general question

Post by Jim Ablett »

The engine part of the program can be compiled successfully if you use a Mingw version with posix support >
http://sourceforge.net/projects/mingw-w ... lds/4.9.2/

Unfortunately it crashes on 'go' command. A 'divide by zero' bug I think.

Here's the engine src of Galjoen 0.24 ready to compile for anyone interested (buggy win32 binary included) > http://tinyurl.com/osbg7jd

Jim.
User avatar
Werner Taelemans
Posts: 122
Joined: Mon Feb 03, 2014 11:57 am
Location: Belgium
Full name: Werner Taelemans

Re: Windows compilers - general question

Post by Werner Taelemans »

A possible work around: first change the time control, before the go-command.

I can repeat the crash like this:

Code: Select all

xboard
protover 2
feature myname="Galjoen_v0.25" variants="normal" usermove=1 time=0 sigint=0 sigterm=0 ping=1 analyze=1 colors=0 san=1 setboard=1 nps=0 draw=0 debug=1 done=1
new
force
go
Drijvendekomma-berekeningsfout
but adding the level-command gives:

Code: Select all

xboard
protover 2
feature myname="Galjoen_v0.25" variants="normal" usermove=1 time=0 sigint=0 sigterm=0 ping=1 analyze=1 colors=0 san=1 setboard=1 nps=0 draw=0 debug=1 done=1
level 40 1 0
new
force
go
move Nc3
^C
If someone can confirm that this solves the problem, I'll put a new version on my website. If it doesn't solve the problem, can anybody post a debug file from winboard?
That would be helpful.
User avatar
Jim Ablett
Posts: 2454
Joined: Fri Jul 14, 2006 7:56 am
Location: London, England
Full name: Jim Ablett

Re: Windows compilers - general question

Post by Jim Ablett »

Still crashes here but includes error report which may help you >
xboard
protover 2
feature myname="Galjoen_v0.24" variants="normal" usermove=1 time=0 sigint=0 sigt
erm=0 ping=1 analyze=1 colors=0 san=1 setboard=1 nps=0 draw=0 debug=1 done=1
level 40 1 0
new
force
go
terminate called after throwing an instance of 'std::runtime_error'
what(): TTmove::TTmove(const Move&) impossible EP move
from=0 to=125
Jim.
User avatar
Werner Taelemans
Posts: 122
Joined: Mon Feb 03, 2014 11:57 am
Location: Belgium
Full name: Werner Taelemans

Re: Windows compilers - general question

Post by Werner Taelemans »

Thanks. I'll take a look at this one.
User avatar
Werner Taelemans
Posts: 122
Joined: Mon Feb 03, 2014 11:57 am
Location: Belgium
Full name: Werner Taelemans

Re: Windows compilers - general question

Post by Werner Taelemans »

I have a new version (0.26) available. I added a map with a 32bit exe crosscompiled on Ubuntu 14.04 with MinGW and a screenshot showing Galjoen running on Winboard under Wine.
The problem is not completely solved yet, since this exe runs ten times slower than it should.