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

User avatar
mvanthoor
Posts: 1784
Joined: Wed Jul 03, 2019 4:42 pm
Location: Netherlands
Full name: Marcel Vanthoor

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

Post by mvanthoor »

Ras wrote: Thu Dec 03, 2020 12:36 pm
mvanthoor wrote: Thu Dec 03, 2020 11:29 amI still wonder if these engines keep working if the kernel and/or glibc are updated on the Raspberry Pi.
Generally: yes. It's the other direction that often doesn't work, i.e. if you compile under a newer Linux, you cannot reliably expect the binary to run on an older Linux. That's why you compile on the oldest Linux that you intend to target.
OK, thanks. In that case, I'm going to compile the Linux binaries on Debian Stable. (Are they then also going to run on Red Hat distributions? Don't know... I've only ever used Debian, or Debian-derivatives, apart from some short stints with SUSE in 2001 and Arch in 2015.) I'll have to look into how to get the newest versions of Rust to run on Debian Stable.

Compiling my engine for the Raspberry Pi 4 is not an issue; I've already tried it. If the Rust version is new enough, it'll work. Assuming your statement above is correct, it'll then keep working in the future.
Then again, having an easy way to build from source also allows the compiler to optimise for the CPU of the system if using -march=native. A big difference to Windows is that building from source is usually difficult under Windows, at least compared to Linux.
Under Windows, I use MSYS2. I a program compiles cleanly under Linux with either GCC or CLANG, it normally compiles under MSYS2 without issue.

Rust only has one compiler, and no make-files. Compiling a Rust executable should work exactly the same on any system. I actually use the Windows-version of Rust, but I compile using the windows-gnu toolchain instead of windows-msvc (difference: the first uses the GNU LD linker, the second the Microsoft link.exe linker); and I also compile using MSYS2 as a shell.
Author of Rustic, an engine written in Rust.
Releases | Code | Docs | Progress | CCRL
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 »

mvanthoor wrote: Thu Dec 03, 2020 3:56 pm
Compiling my engine for the Raspberry Pi 4 is not an issue; I've already tried it. If the Rust version is new enough, it'll work. Assuming your statement above is correct, it'll then keep working in the future.
Hello, i am compiling in Ubuntu Mate 20.04 mostly only chess engines in C or C++. I think I tried one in D language with gdc but did not work.

I have found some engines coded in Rust but did not try to compile them.
If you compile your Rust engine for your Raspberry Pi 4 into your Debian, plz share your binary in this topic. I will try it on Ubuntu and tell you if it works. Thanks
Ras
Posts: 2488
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 »

mvanthoor wrote: Thu Dec 03, 2020 3:56 pmOK, thanks. In that case, I'm going to compile the Linux binaries on Debian Stable.
The current stable is Debian 10 "Buster" from 2019. Anyone running an older Debian or Debian derivative will be out of luck. Btw., which libraries does a Rust executable use? Assuming that a chess engine won't need any special libraries, i.e. basically glibc for C based engines.
Are they then also going to run on Red Hat distributions?
I guess so. What's different is the package format, .de vs .rpm, but a single binary doesn't need a package.
Under Windows, I use MSYS2.
Setting up that is a lot more work than under Linux because Linux distros have GCC just installed by default, so the user doesn't need to do anything. The consequence is that you can't expect a Windows end user (non-developer) to compile from source, but Linux end users can. At least with C/C++ engines that have either a makefile or a build script.
Pi4Chess wrote: Thu Dec 03, 2020 4:59 pmIf you compile your Rust engine for your Raspberry Pi 4 into your Debian, plz share your binary in this topic. I will try it on Ubuntu and tell you if it works.
Since Ubuntu is based directly on Debian, that should work easily as long as the Ubuntu version is not older than the Debian version used for compilation. The latter won't be the case here because Ubuntu 20 is the current version.
Rasmus Althoff
https://www.ct800.net
abulmo2
Posts: 433
Joined: Fri Dec 16, 2016 11:04 am
Location: France
Full name: Richard Delorme

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

Post by abulmo2 »

I compiled a version of amoeba-3.2 for pi4 64 bits under ubuntu-20.04:
https://github.com/abulmo/amoeba/releas ... 2-rpi4.tgz
Richard Delorme
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 »

abulmo2 wrote: Fri Dec 04, 2020 11:40 am I compiled a version of amoeba-3.2 for pi4 64 bits under ubuntu-20.04:
https://github.com/abulmo/amoeba/releas ... 2-rpi4.tgz
Thanks for your sharing ! Have you tried it ? It does not work on my rpi4 with same OS as you under Arena :-/
elcabesa
Posts: 855
Joined: Sun May 23, 2010 1:32 pm

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

Post by elcabesa »

Vajolet can be compiled for raspberry too.
if you need help I can help you
abulmo2
Posts: 433
Joined: Fri Dec 16, 2016 11:04 am
Location: France
Full name: Richard Delorme

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

Post by abulmo2 »

Pi4Chess wrote: Fri Dec 04, 2020 12:58 pm
abulmo2 wrote: Fri Dec 04, 2020 11:40 am I compiled a version of amoeba-3.2 for pi4 64 bits under ubuntu-20.04:
https://github.com/abulmo/amoeba/releas ... 2-rpi4.tgz
Thanks for your sharing ! Have you tried it ? It does not work on my rpi4 with same OS as you under Arena :-/
What error do you have when running it from a terminal?
You may need to install libphobos2-ldc-shared and libruntime-ldc-shared using apt-get to have it work.
Richard Delorme
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 »

abulmo2 wrote: Fri Dec 04, 2020 2:48 pm
Pi4Chess wrote: Fri Dec 04, 2020 12:58 pm
abulmo2 wrote: Fri Dec 04, 2020 11:40 am I compiled a version of amoeba-3.2 for pi4 64 bits under ubuntu-20.04:
https://github.com/abulmo/amoeba/releas ... 2-rpi4.tgz
Thanks for your sharing ! Have you tried it ? It does not work on my rpi4 with same OS as you under Arena :-/
What error do you have when running it from a terminal?
You may need to install libphobos2-ldc-shared and libruntime-ldc-shared using apt-get to have it work.
I did not try from terminal. Will try tonight when I get home and report back.
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 »

elcabesa wrote: Fri Dec 04, 2020 2:25 pm Vajolet can be compiled for raspberry too.
if you need help I can help you
Hello, i already managed to compile version 2.8 (see second post) but don't know if it's optimized in performance. It would be nice if you include rpi4 in your future releases ☺️

Perhaps my next step is going to compile again each engine with all Nice optimizing flags like - O3, -flto or -DUSE_NEON since i don't remember if I used them, and check nodes performance with some fixed position and depth for example.
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 »

abulmo2 wrote: Fri Dec 04, 2020 2:48 pm
Pi4Chess wrote: Fri Dec 04, 2020 12:58 pm
abulmo2 wrote: Fri Dec 04, 2020 11:40 am I compiled a version of amoeba-3.2 for pi4 64 bits under ubuntu-20.04:
https://github.com/abulmo/amoeba/releas ... 2-rpi4.tgz
Thanks for your sharing ! Have you tried it ? It does not work on my rpi4 with same OS as you under Arena :-/
What error do you have when running it from a terminal?
You may need to install libphobos2-ldc-shared and libruntime-ldc-shared using apt-get to have it work.
Terminal was closing on launch even as administrator.

So i have installed the 2 libphobos2-ldc-shared-dev and dev90 from synaptic and now the engine is running in Arena without problem and nice kns:-)
I did not installed the libruntime-ldc-shared since i did not found it in synaptic.

May be you should include this requirement as a readme text in the release (libphobos2-ldc-shared).

Your contribution is really appreciated :-)