Chess Engines binaries for Raspberry Pi 4 Linux 64 bits

Discussion of anything and everything relating to chess playing software and machines.

Moderators: hgm, Rebel, chrisw

Pi4Chess
Posts: 253
Joined: Mon Nov 16, 2020 12:13 pm
Full name: Manuel Rivera

Re: Chess Engines binaries for Raspberry Pi 4 Linux 64 bits

Post by Pi4Chess »

Archimedes wrote: Sat Dec 19, 2020 12:40 am May be you are using the native compiler flag, which is always a good idea when compiling for yourself, for your hardware (but could result in compatibility issues with other devices).
I was thinking that native builds may not be a problem at all with Rpi4 since it's a fixed architecture as hardware [ Only change is RAM (2, 4 or 8 Gb) ].
May be this flag limits usage to same OS then in this particular case but i am not sure at all.
Archimedes
Posts: 135
Joined: Tue Mar 05, 2019 3:43 pm
Full name: Archimedes

Re: Chess Engines binaries for Raspberry Pi 4 Linux 64 bits

Post by Archimedes »

Pi4Chess wrote: Sat Dec 19, 2020 4:05 amThat's nice :-) In the list you just provided I did not managed to compile : Seer (compiled but not working) , Scorpio (this is a big factory omg even on windows 7 i couldn't make it work properly), Xiphos, Tucano, Koivisto, Zurichess,Cheng 4, Frankygo, Hakkapellita, Topple, Hippocampe, monchester, ceechess.

And others that are not in your list and i couldn't compile : Winter, Fabchess.
Seer needs the absolute path to the binary weights file "save.bin" (https://github.com/connormcmonigle/seer ... tag/v1.2.1). This option must be set.

Zurichess is developed in the go language and easy to compile with the "go build" or "go install" command (you have to install the go compiler first). Same with FrankyGo and Counter. May be, this versions already works for you.

Winter are developed exclusively for windows environment and needs a lot of changes for proper compiling with Android NDK and the clang compiler.

FabChess is developed in Rust.

I have create a new sub directory in the "Chess Engines for Android" directory, called "Static Builds". When i compiled a new version and the version is working properly (i always make a short test), i will add a static build (same compiler settings, only with the additional -static option) to that directory. Needs no extra time and you can benefit from the compilations.
Last edited by Archimedes on Sat Dec 19, 2020 12:36 pm, edited 2 times in total.
Archimedes
Posts: 135
Joined: Tue Mar 05, 2019 3:43 pm
Full name: Archimedes

Re: Chess Engines binaries for Raspberry Pi 4 Linux 64 bits

Post by Archimedes »

Pi4Chess wrote: Sat Dec 19, 2020 11:58 am
Archimedes wrote: Sat Dec 19, 2020 12:40 am May be you are using the native compiler flag, which is always a good idea when compiling for yourself, for your hardware (but could result in compatibility issues with other devices).
I was thinking that native builds may not be a problem at all with Rpi4 since it's a fixed architecture as hardware [ Only change is RAM (2, 4 or 8 Gb) ].
May be this flag limits usage to same OS then in this particular case but i am not sure at all.
When it is a fixed hardware, there is no problem with it and you and all others can benefit from an optimal runtime performance. Normally, on android devices there are a wide range of processor architecture used. You have to take care about and find a good balance.
Pi4Chess
Posts: 253
Joined: Mon Nov 16, 2020 12:13 pm
Full name: Manuel Rivera

Re: Chess Engines binaries for Raspberry Pi 4 Linux 64 bits

Post by Pi4Chess »

Archimedes wrote: Sat Dec 19, 2020 12:21 pm Seer needs the absolute path to the binary weights file "save.bin" (https://github.com/connormcmonigle/seer ... tag/v1.2.1). This option must be set.

Zurichess is developed in the go language and easy to compile with the "go build" or "go install" command (you have to install the go compiler first). Same with FrankyGo and Counter. May be, this versions already works for you.

Winter are developed exclusively for windows environment and needs a lot of changes for proper compiling with Android NDK and the clang compiler.

FabChess is developed in Rust.

I have create a new sub directory in the "Chess Engines for Android" directory, called "Static Builds". When i compiled a new version and the version is working properly (i always make a short test), i will add a static build (same compiler settings, only with the additional -static option) to that directory. Needs no extra time and you can benefit from the compilations.
Ok thanks ! i will look for static builds to test them :-) As for Zurichess it compiled but did not run. same with Frankygo.

I have just compiled Minic 3.02 and Vivien Clauzon has made fantastic scripts for his makefile. When compiling with my rpi4 it delivers this information and compiles as a Linux64 dev with native and not with arm android libs. Here is some information that the scripts show from the specs (may be it can be of some interest to guide others compilations :

Code: Select all

Using built-in specs.
COLLECT_GCC=g++
COLLECT_LTO_WRAPPER=/usr/lib/gcc/aarch64-linux-gnu/9/lto-wrapper
Target: aarch64-linux-gnu
Configured with: ../src/configure -v --with-pkgversion='Ubuntu 9.3.0-17ubuntu1~20.04' --with-bugurl=file:///usr/share/doc/gcc-9/README.Bugs --enable-languages=c,ada,c++,go,d,fortran,objc,obj-c++,gm2 --prefix=/usr --with-gcc-major-version-only --program-suffix=-9 --program-prefix=aarch64-linux-gnu- --enable-shared --enable-linker-build-id --libexecdir=/usr/lib --without-included-gettext --enable-threads=posix --libdir=/usr/lib --enable-nls --enable-clocale=gnu --enable-libstdcxx-debug --enable-libstdcxx-time=yes --with-default-libstdcxx-abi=new --enable-gnu-unique-object --disable-libquadmath --disable-libquadmath-support --enable-plugin --enable-default-pie --with-system-zlib --with-target-system-zlib=auto --enable-objc-gc=auto --enable-multiarch --enable-fix-cortex-a53-843419 --disable-werror --enable-checking=release --build=aarch64-linux-gnu --host=aarch64-linux-gnu --target=aarch64-linux-gnu
Thread model: posix
Pi4Chess
Posts: 253
Joined: Mon Nov 16, 2020 12:13 pm
Full name: Manuel Rivera

Re: Chess Engines binaries for Raspberry Pi 4 Linux 64 bits

Post by Pi4Chess »

Archimedes wrote: Sat Dec 19, 2020 12:21 pm Seer needs the absolute path to the binary weights file "save.bin" (https://github.com/connormcmonigle/seer ... tag/v1.2.1). This option must be set.

Zurichess is developed in the go language and easy to compile with the "go build" or "go install" command (you have to install the go compiler first). Same with FrankyGo and Counter. May be, this versions already works for you.

Winter are developed exclusively for windows environment and needs a lot of changes for proper compiling with Android NDK and the clang compiler.

FabChess is developed in Rust.

I have create a new sub directory in the "Chess Engines for Android" directory, called "Static Builds". When i compiled a new version and the version is working properly (i always make a short test), i will add a static build (same compiler settings, only with the additional -static option) to that directory. Needs no extra time and you can benefit from the compilations.
I just tried your static versions of Koivisto and Scorpio... After the bit set none works. Cannot open their uci options in Arena and they do not search nor move after book.
Seems if i cannot compile myself is that some incompatibility with the arch seems in the coding itself (aarch64-linux-gnu)

I compiled again seer and put an absolute path for save.bin in the uci options but same behavior: seer does not search or move. :-/
Archimedes
Posts: 135
Joined: Tue Mar 05, 2019 3:43 pm
Full name: Archimedes

Re: Chess Engines binaries for Raspberry Pi 4 Linux 64 bits

Post by Archimedes »

Pi4Chess wrote: Sat Dec 19, 2020 9:57 pmI just tried your static versions of Koivisto and Scorpio... After the bit set none works. Cannot open their uci options in Arena and they do not search nor move after book.
Seems if i cannot compile myself is that some incompatibility with the arch seems in the coding itself (aarch64-linux-gnu)

I compiled again seer and put an absolute path for save.bin in the uci options but same behavior: seer does not search or move. :-/
Was the same problem here, the static builds didn't work. I didn't test the static builds explicitly, because the not static builds are working. :wink:

I lately switched to the new Android NDK r22 release. And this release makes trouble, when building static builds, as we have seen. When i switched back to the long term release r21d, static builds are working (if they working for me, they should also working for you). In the meanwhile, i will use Android NDK r21d again for building static builds.
Ras
Posts: 2487
Joined: Tue Aug 30, 2016 8:19 pm
Full name: Rasmus Althoff

Re: Chess Engines binaries for Raspberry Pi 4 Linux 64 bits

Post by Ras »

In general, you shouldn't use static linkage with glibc under Linux. Under Android, it also often leads to problems with the required PIE because that's only an option with dynamically linked programs.
Rasmus Althoff
https://www.ct800.net
Pi4Chess
Posts: 253
Joined: Mon Nov 16, 2020 12:13 pm
Full name: Manuel Rivera

Re: Chess Engines binaries for Raspberry Pi 4 Linux 64 bits

Post by Pi4Chess »

Archimedes wrote: Sun Dec 20, 2020 11:01 am
Pi4Chess wrote: Sat Dec 19, 2020 9:57 pmI just tried your static versions of Koivisto and Scorpio... After the bit set none works. Cannot open their uci options in Arena and they do not search nor move after book.
Seems if i cannot compile myself is that some incompatibility with the arch seems in the coding itself (aarch64-linux-gnu)

I compiled again seer and put an absolute path for save.bin in the uci options but same behavior: seer does not search or move. :-/
Was the same problem here, the static builds didn't work. I didn't test the static builds explicitly, because the not static builds are working. :wink:

I lately switched to the new Android NDK r22 release. And this release makes trouble, when building static builds, as we have seen. When i switched back to the long term release r21d, static builds are working (if they working for me, they should also working for you). In the meanwhile, i will use Android NDK r21d again for building static builds.
Just tested the new static builds of Seer, Koivisto and Scorpio.

Koivisto and Seer are indeed working after bit set :-) . Koivisto with nice 2000+ kns and Seer at 200 kns only with absolute path to save.bin
I have access to scorpio options so it may run well. I have just to figure out what are the best net options for the Rpi4 ^^ before testing this big factory.
Thanks i will include this static builds in the collection until a better solution comes up. I think i will put a distinctive letters in name to remember like "stand" for static android.
Last edited by Pi4Chess on Sun Dec 20, 2020 12:44 pm, edited 1 time in total.
Pi4Chess
Posts: 253
Joined: Mon Nov 16, 2020 12:13 pm
Full name: Manuel Rivera

Re: Chess Engines binaries for Raspberry Pi 4 Linux 64 bits

Post by Pi4Chess »

Ras wrote: Sun Dec 20, 2020 12:04 pm In general, you shouldn't use static linkage with glibc under Linux.
Why ?
We are just experimenting a non optimum solution to have certain engines to work in Rpi4 Linux 64.
Of course a better way would be to succeed in compiling properly with the required libs with no error. If you can help about compiling from other platform than Rpi4 usind target aarch64-linux-gnu you are very welcome :-)

As already said 2 examples : I compiled Seer with no errors onto my Rpi4 but id does not run. Archimedes static android build runs...
for Koivisto i always got asm errors after trying compile with the provided makefile and toying with the flags. Archimedes static build runs...
Archimedes
Posts: 135
Joined: Tue Mar 05, 2019 3:43 pm
Full name: Archimedes

Re: Chess Engines binaries for Raspberry Pi 4 Linux 64 bits

Post by Archimedes »

Could you also try the following version from Ethereal (it's a non static version).

Ethereal 12.77:
https://app.box.com/s/p9zmt9jerqqs0yqtljzfiu8k90013j41

By the way, i've tested the runtime performance of the non static and static builds from Koivisto. I did not see any differences between them. So we can not say, non static builds have less performance in general. I would say, if the static builds works for you, they are not so bad at all. :D