Belofte
version 2.1.5
A promising chess program using the UCI or Winboard interface
|
How to compile, debug and test Belofte
This is the Building/Compiling/Debugging file for belofte, a promising chess program released under GNU - GPL v2.0.
Please refer to the manual for more information on using the program.
If the binaries for your platform are not released, or you want to create a custom build, you need to compile from source. Your toolset needs to support C++11. See C++ reference for more information.
preferred method
--gcc
: prefer gcc complier;--clang
: prefer clang compiler;--cross
: cross compile with mingw from linux to windows;--opt
: also generate optimized build (32/64) and a static build (64) for your machine;--profile
: build non optimized profilable build;--32
: build 32 bit target only;--64
: build 64 bit target only;--all
: build 32 and 64 bit (on 64 bit platform) please note building 64 bit on 32 bit platform is not possible;next
: if not passed, will detect version number from source code.Cmake is not supported yet.
By default, your platform is only configured to compile compatible programs. Therefore, on a 64 bit system, 32 bit compilation must be enabled manually first. See below. Not doing so will result in an error during compilation that can be ignored.
compile.sh
.Make sure static libraries are available, alongside gcc and clang.
Replace dnf
with yum
/apt-get
/...
according to your linux flavour. Use sudo
if required.
Install the cross compiler and compile. See below example for Fedora 34.
See below example for Ubuntu 21.10. (still issue with std::thread not supported)
compile.sh
.You cannot run or debug 64 bit code on a 32 bit platform.
When compiling, following conditionals (#define) can be turned on or passed as -D parameter in the compile script. See project/compile.sh
for more details.
BELOFTE_NORANDOM
: set modus to no random by default, evaluation will never add random;BELOFTE_UCIMODE
: creates a binary that defaults to UCI protocol;BELOFTE_NOSIGNALS
: suppress reaction to signals. (SIGINT
, SIGTERM
);BELOFTE_NOUNICODE
: compile for platforms that do not support UTF-8 console output, defined for all targets in release mode;INCOMPLETE_C11
: compile with compiler that does not support full C++11, defined for GCC before version 6;CHRONO_MISSING
: compile on platform that does not have <chrono> header;NODIRENT
: compile on platform that does not have dirent.h or that lacks runtime support for it (e.g. cross compiler);After compilation, it is always good to test if your conpile is correct. For this a numer of test suites are available.
Belofte supports epd to test a position. Launch epd pos
, epd file
commands with valid epd strings. Please refer to the documentation for more information.
Belofte also supports executing commands from a command file. Use exec
to run a test.
Run benchmark:
Run benchmark against specific compile (i.e. GCC popcnt):
Run windows (32/64 bit) executable from linux through wine:
eof