Although it was primary intended for making Stockfish compiles, the CECSA script can easiliy be extended for usage with other chess engines too die to its modular approach. In the meanwhile the following chess engines are supported: Berserk, BrainLearn, CorChess, Crystal, Demolito, ShashChess, Stockfish, SugaR AI and SugaR AI ICCF.
The main environemnt variables are as follow:
Code: Select all
CECSA_ABI_ARMEABI_V7A=true
CECSA_ABI_X86=false
CECSA_ABI_X86_64=false
CECSA_COMPILER=gcc
CECSA_PGO=true
CECSA_HOME=/storage/emulated/0/Download
CECSA_MAKE_JOBS=1
CECSA_ONLINE=true
CECSA_VERSION=2021.11.11
CECSA_WAKE_LOCK=true
CECSA_ZIP_JNI=false
CECSA_ZIP_NETWORK=false
CECSA_ZIP_README=false
CECSA_ZIP_SOURCE=false
The most essential environment variables are at the bottom of the script. As you can see, there is a new option "CECSA_PGO". With CECSA_PGO=true, profile guided optimization will be used (if available).
CECSA_ONLINE=true means, that the source code of an chess engine will download first from GitHub before the compilation process starts (this is the default behavior). If CECSA_ONLINE=false the script doesn't download any sources from GitHub. The script assumes that the source code is already in the src directory. With this feature you can do now an offline compilation. Download the source code manually, extract it to src directory (take care of the directory structure and names, must be identical with GitHub), set CECSA_ONLINE to false and start the script. CECSA will not donwload any sources from GitHub now, instead it starts the compile immediately. Stockfish for example needs the directory name "Stockfish" in the src directory (as you can see it, after downloading from GitHub), otherwise the script will not find the sources.
With CECSA_ZIP_JNI=true the files for Android NDK will be included in the zip archive.
With CECSA_ZIP_NETWORK=true the current network file will be included in the zip archive (only works, when you have choosen non embedded network at the begin of compile).
With CECSA_ZIP_SOURCE=true the source code (may be changed from the script itself for proper compiling) will be included in the zip archive.
The most essential environment variables in the script can be overwritten by engine settings (could be helpful in some situations).
Example:
Code: Select all
# Berserk
CECSA_BERSERK_ABI_ARMEABI_V7A=
CECSA_BERSERK_ABI_X86=
CECSA_BERSERK_ABI_X86_64=
CECSA_BERSERK_COMPILER=
CECSA_BERSERK_PGO=
CECSA_BERSERK_MAKEFILE=makefile
Always keep in mind, when there is a compilation error during the compilation process, the script may not responsible for that. It is only executing the make command as you will do it manually. Crystal and Sugar AI ICCF for example can't be compiled for armeabi-v7a based CPUs (need changes in the source code). And so on.
And as a compiler, you must always take care of libraries which have to be present on your environment. For example, to compile BrainLearn and ShashChess you need at least the follwowing packages on your system (if not already present). Assuming, you have installed the GCC compiler correctly. However, when a library is missing, you will see that in an error message.
Code: Select all
apt-get install curl, libcurl-static libnghttp2-static libssh2-static openssl-static zlib-static
apt-get install ndk-multilib
CECSA 2021.11.11:
https://app.box.com/s/prvc6k62m9f4qcq8vs4r8xqy4qswg2tz