1 1
guidol

tutorial [Info] How to compile the actual 64Bit version of stockfish chess engine

Recommended Posts

Normally you could install (if you use a 64Bit arm-system/OS) the 64Bit version of stockfish with
apt install stockfish

stockfish is a uci-chess-engine where some Chessboard-Display-Apps can conenct to (later I would show how to use this with TCP)

Then you will get (at this time) the Version 8 64Bit = 8 64 = 11/2016

 

But the actual stockfish-engine is at Version 10 = 12/2018 ( see http://blog.stockfishchess.org/ )

 

So I did clone the git-master at https://github.com/official-stockfish/Stockfish as .zip

 

After unzipping and cd to ./Stockfish-master/src

you could do

-make clean

-make help

BUT there is for arm only a ARCH=armv7 (32Bit) option :(

 

When using the ARCH=general-64 option

make build ARCH=general64 COMP=gcc COMPCXX=g++

then the start of the compile did fail because g++ says that he didnt knows the -m64 commandline-option :(

 

I searched the Web and found there no solution :(

 

So I did take a look into the Makefile and first I didnt found anything about -m64, but then I discoverd in the gcc-options the follwing part which I then deleted:
 

	else
		CXXFLAGS += -m$(bits)
		LDFLAGS += -m$(bits)
	endif

after that I did create a aarch64-ARCH-section under the armv7-ARCH-section:

ifeq ($(ARCH),aarch64)
        arch = any
        prefetch = yes
        bits = 64
endif

arch = any is copied from the "general-64" section, prefetch is copied from the "armv7"-section and maybe the "bits = 64" is obsolete?

 

Now we can compile - there are two options:
 

dpkg -l|grep 'g++'
ii  g++                             4:6.3.0-4                         arm64        GNU C++ compiler
ii  g++-6                           6.3.0-18+deb9u1                   arm64        GNU C++ compiler

make build ARCH=aarch64 COMP=gcc COMPCXX=g++
make build ARCH=aarch64 COMP=gcc COMPCXX=g++-6

When the compile has completed you will have the executeable stockfish in your ./Stockfish-master/src directory.

see stockfish_10_64 as attached binary at the end of this thread-message :)

 

When started you will see:

Stockfish 140319 64 by T. Romstad, M. Costalba, J. Kiiski, G. Linscott

 

Enter uci and you will see the stockfish-info:
 

id name Stockfish 140319 64
id author T. Romstad, M. Costalba, J. Kiiski, G. Linscott

option name Debug Log File type string default
option name Contempt type spin default 24 min -100 max 100
option name Analysis Contempt type combo default Both var Off var White var Black var Both
option name Threads type spin default 1 min 1 max 512
option name Hash type spin default 16 min 1 max 131072
option name Clear Hash type button
option name Ponder type check default false
option name MultiPV type spin default 1 min 1 max 500
option name Skill Level type spin default 20 min 0 max 20
option name Move Overhead type spin default 30 min 0 max 5000
option name Minimum Thinking Time type spin default 20 min 0 max 5000
option name Slow Mover type spin default 84 min 10 max 1000
option name nodestime type spin default 0 min 0 max 10000
option name UCI_Chess960 type check default false
option name UCI_AnalyseMode type check default false
option name SyzygyPath type string default <empty>
option name SyzygyProbeDepth type spin default 1 min 1 max 100
option name Syzygy50MoveRule type check default true
option name SyzygyProbeLimit type spin default 7 min 0 max 7
uciok

You could leave the stockfish chess-engine with quit

 

I will add (these days) a tutorial for setting up stockfish as TCP-Service (via inetd) and then we could connect

via Windows/Android/Linux ChessBoard-Display-Apps to play with the stockfish engine on your 64Bit ARM-System :)

Preview-Information-Links for setting up , connecting and playing with the engine:
https://somoit.net/linux/linux-create-custom-inetd-service
https://jerrygreenblog.wordpress.com/2016/08/26/linux-stockfish-chess-engine-as-remote-service/
http://aartbik.blogspot.com/2012/03/connecting-chess-for-android-to-remote.html

 

 

Chess_for_Android_with_stockfish_server.jpg

stockfish_10_64

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
1 1