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: Sun Dec 20, 2020 1:01 pm 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
I will test tonight.
When i say it is not optimum it's because they are not pgo builds and i don't know if your builds are making use of Neon, popcnt, prefetch of Rpi4.
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 »

Pi4Chess wrote: Sun Dec 20, 2020 12:43 pmWhy ?
Because it's not easy, not reliable, and not desirable: https://akkadia.org/drepper/no_static_linking.html

Specifically for Android, position independent executables (PIE) are required, and I remember problems with static linkage because PIEs are technically dynamic libraries, just as executables.
If you can help about compiling from other platform than Rpi4 usind target aarch64-linux-gnu you are very welcome :-)
That's indeed difficult because binary compatibility under Linux is flat out bad. That's the main reason why Linux distros have always had a package manager, and why container formats such as Flatpak have emerged as dirty workaround.

For targeting 32bit Raspbian, I'm using a ready-made Windows (!) GCC toolchain and run that under Wine.
Rasmus Althoff
https://www.ct800.net
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 »

May be you can also test the following build (also a non static build).

Ethereal 12.77:
https://app.box.com/s/qnux5hdebovnj8elmnc0vnx0ydwwk1il
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 1:30 pm
For targeting 32bit Raspbian, I'm using a ready-made Windows (!) GCC toolchain and run that under Wine.
So what we need is an expert in those things that create a nice toolchain for aarch64-linux-gnu for raspi4 under gcc or clang, under Windows or Linux and we are done ! 😁
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: Sun Dec 20, 2020 1:09 pmI will test tonight.
When i say it is not optimum it's because they are not pgo builds and i don't know if your builds are making use of Neon, popcnt, prefetch of Rpi4.
Yes of course, e. g. all arm64-v8a devices are able to use neon instructions. Android NDK is aware of that. And if there are source dependent compiler definitions for supporting such instructions, like -DUSE_NEON, -DHAS_PREFETCH and so on, i used them for optimal runtime performance. In very rare cases, not all compiler definitions can be used, because the clang compiler produces a lot of errors and i'm not willing to rewrite a lot of code only for successful compiling for Android. And with the clang compiler, you have to change very often the source code for successful compiling, but always in a minimal invasive way.
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 »

I've also added the last Cheng version.

As long the static builds are appreciated, i will update them, when i compile a new version for Android. But i will compile only those chess engines as static builds which you are missing. Seems to be a not so bad interim solution.
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 2:58 pm I've also added the last Cheng version.

As long the static builds are appreciated, i will update them, when i compile a new version for Android. But i will compile only those chess engines as static builds which you are missing. Seems to be a not so bad interim solution.
Thank you for your implication and help. I will test all new static builds you put in and the 2 Ethereal builds but later tonight.
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 »

You wrote about lagging threads with Rodent engines. I found out, that the thread feature in the Rodent engines doesn't work on Android. My first compiles only works for 32 bit and introducing more than 1 thread do nothing for better runtime performance. 64 bit versions crashes after the first moves.

Then i encountered, with disabling the thread feature, with the compiler definition -DNO_THREADS, 64 bit versions now also working, without any crashes.
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 8:09 pm You wrote about lagging threads with Rodent engines. I found out, that the thread feature in the Rodent engines doesn't work on Android. My first compiles only works for 32 bit and introducing more than 1 thread do nothing for better runtime performance. 64 bit versions crashes after the first moves.

Then i encountered, with disabling the thread feature, with the compiler definition -DNO_THREADS, 64 bit versions now also working, without any crashes.
Yes it is with Rodent IV ! Thanks for the tip ! I will see how i compiled and will change the threads flag then. :idea:

A little feedback about your static android compilations : after bit set Cheng, Tucano and Xiphos are working fine ! They all 3 are at 2000-2200 kns so pretty smooth.
On the other hand the 2 non-static Ethereal builds are not working at all on rpi4.
User avatar
jshriver
Posts: 1342
Joined: Wed Mar 08, 2006 9:41 pm
Location: Morgantown, WV, USA

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

Post by jshriver »

Amazon says my Pi will be here tomorrow, 2 days early woot :)

Can't wait to get testing.