Skip to content

Compiling Fairy Stockfish

Fabian Fichter edited this page Sep 13, 2023 · 17 revisions

This page is about compiling Fairy-Stockfish from source in case you want to use a development version. Otherwise, you can just download a binary from the releases. You can also get automatically built Windows and Linux binaries for development versions from the github actions. Just click on the most recent run and then download the artifact ZIP (you need to be logged in on github), which contains the exe files.

Compiling Fairy-Stockfish works analogous to official Stockfish.

Compiling version for large boards (>8x8)

In order to compile the version for large-board variants (>8x8 board) just add largeboards=yes to your normal make command, e.g., use make build ARCH=x86-64 largeboards=yes instead of make build ARCH=x86-64. It is required to do a make clean before compiling the large-board version in order to avoid mixing up object files of both versions.

Compiling with support for variants with large branching factor (duck, amazons)

Similarly, in order to include special variants with a very high branching factor such as duck chess and game of the amazons, you need to add all=yes to the make command.

Compiling on Windows

See https://github.com/official-stockfish/Stockfish/wiki/Compiling-from-source#windows for instructions on how to compile Stockfish on Windows. It works analogous for Fairy-Stockfish, you just need to clone/download this repository instead of official Stockfish, i.e., replace https://github.com/official-stockfish/Stockfish by https://github.com/fairy-stockfish/Fairy-Stockfish and Stockfish-master by Fairy-Stockfish-master.

Compiling on MacOS

See https://github.com/official-stockfish/Stockfish/wiki/Compiling-from-source#macos for instructions on how to compile Stockfish on MacOS. It works analogous for Fairy-Stockfish, you just need to clone/download this repository instead of official Stockfish.

Troubleshooting

If you encounter errors when compiling with certain compilers or hardware, please create an issue. Most of the common compilers (gcc, clang, mingw, MSVC), OS (Windows/Linux), and hardware (64/32 bit) are tested and should work.