Problems with gcc compiling Stockfish

Discussion of chess software programming and technical issues.

Moderators: hgm, Rebel, chrisw

Joerg Oster
Posts: 937
Joined: Fri Mar 10, 2006 4:29 pm
Location: Germany

Problems with gcc compiling Stockfish

Post by Joerg Oster »

Yesterday I managed to install MinGW (gcc version 4.5.0 for Windows).
But when I try to compile Stockfish 1.8 and it comes to 'Testing config sanity' I get an error message.
Der Befehl "test" ist entweder falsch geschrieben oder konnte nicht gefunden werden. Which means, the command 'test' could not be found.

Am I still missing some files?
In most packages I tried to install 'make' was not included. So I guess there are some more files absent...

Please enlighten me. :)
User avatar
Jim Ablett
Posts: 1383
Joined: Fri Jul 14, 2006 7:56 am
Location: London, England
Full name: Jim Ablett

Re: Problems with gcc compiling Stockfish

Post by Jim Ablett »

Joerg Oster wrote:Yesterday I managed to install MinGW (gcc version 4.5.0 for Windows).
But when I try to compile Stockfish 1.8 and it comes to 'Testing config sanity' I get an error message.
Der Befehl "test" ist entweder falsch geschrieben oder konnte nicht gefunden werden. Which means, the command 'test' could not be found.

Am I still missing some files?
In most packages I tried to install 'make' was not included. So I guess there are some more files absent...

Please enlighten me. :)
Hi Joerg,

In makefile 'Section 4. Public targets'

comment out >

Code: Select all

build:
#	$(MAKE) ARCH=$(ARCH) COMP=$(COMP) config-sanity
Jim.
Joerg Oster
Posts: 937
Joined: Fri Mar 10, 2006 4:29 pm
Location: Germany

Re: Problems with gcc compiling Stockfish

Post by Joerg Oster »

Hi Jim,

many thanks.
Finally i can compile my own builds, 32- and 64-bit.

However, if I try to do a profile-build I get another errror message:
process_begin: CreateProcess(NULL, rm -rf *.gcda *.gcno bench.txt, ...) failed
make (e=2): Das System kann die angegebene Datei nicht finden

Any idea?

Another 'problem': Threads are 1 by default, though I have a Quad CPU.
Changing the line "["Threads"] = Option(4, 1, MAX_THREADS);" in ucioption.cpp doesn't seem to help.
Maybe Marco can help on this one?

Joerg.
mcostalba
Posts: 2684
Joined: Sat Jun 14, 2008 9:17 pm

Re: Problems with gcc compiling Stockfish

Post by mcostalba »

Joerg Oster wrote: Another 'problem': Threads are 1 by default, though I have a Quad CPU.
Changing the line "["Threads"] = Option(4, 1, MAX_THREADS);" in ucioption.cpp doesn't seem to help.
Maybe Marco can help on this one?

Joerg.
Set UCI "Threads" parameter to the number you prefer before to start the game.
Joerg Oster
Posts: 937
Joined: Fri Mar 10, 2006 4:29 pm
Location: Germany

Re: Problems with gcc compiling Stockfish

Post by Joerg Oster »

Hi Marco,

wow, you're fast. :)

Yes, playing in a GUI or even with cutechess-cli this is no problem.
But I also wanted to do some benching with different settings. Hence the question.

Joerg.
mcostalba
Posts: 2684
Joined: Sat Jun 14, 2008 9:17 pm

Re: Problems with gcc compiling Stockfish

Post by mcostalba »

Joerg Oster wrote:Hi Marco,

wow, you're fast. :)

Yes, playing in a GUI or even with cutechess-cli this is no problem.
But I also wanted to do some benching with different settings. Hence the question.

Joerg.
Try this:

Code: Select all

--- a/src/ucioption.cpp
+++ b/src/ucioption.cpp
@@ -178,7 +178,7 @@ void init_uci_options() {
   Option& thr = options["Threads"];
   Option& msd = options["Minimum Split Depth"];
 
-  thr.defaultValue = thr.currentValue = stringify(cpu_count());
+  thr.defaultValue = thr.currentValue = 4;
 
   if (cpu_count() >= 8)
       msd.defaultValue = msd.currentValue = stringify(7);
zamar
Posts: 613
Joined: Sun Jan 18, 2009 7:03 am

Re: Problems with gcc compiling Stockfish

Post by zamar »

Joerg Oster wrote:Hi Jim,

However, if I try to do a profile-build I get another errror message:
process_begin: CreateProcess(NULL, rm -rf *.gcda *.gcno bench.txt, ...) failed
make (e=2): Das System kann die angegebene Datei nicht finden

Any idea?
Makefile is designed for Linux/Unix, so some parts won't work under Windows. Anyway ordinary builds are more than enough if you want to experiment with your own ideas. With profile-builds you can get around 5% more speed, but because you are usually only interested in strength difference between original and modified versions, it doesn't matter.
Joona Kiiski
Joerg Oster
Posts: 937
Joined: Fri Mar 10, 2006 4:29 pm
Location: Germany

Re: Problems with gcc compiling Stockfish

Post by Joerg Oster »

Hi Joona,

of course, you are right.
Anyway, thanks for the explanation.

Joerg.
Joerg Oster
Posts: 937
Joined: Fri Mar 10, 2006 4:29 pm
Location: Germany

Re: Problems with gcc compiling Stockfish

Post by Joerg Oster »

Hi Marco,

thanks for your help.
But I just noticed, that with the bench command you can specify how many threads to be used, as well. :oops:

Joerg.