Zrok on raspberry says "Floating point exception"

Hello,

I'm trying to make zrok work on raspberry pi 4, using 32bit raspbian os. I have tried installing zrok either from deb package (zrok_0.4.35-1_armhf.deb) or from tarball (zrok_0.4.35_linux_armv7.tar.gz), in both cases it says:

root@rapik:~# zrok version
Floating point exception

Some more info:

root@rapik:~# uname -a
Linux rapik 6.6.31+rpt-rpi-v7l #1 SMP Raspbian 1:6.6.31-1+rpt1 (2024-05-29) armv7l GNU/Linux

root@rapik:~# uname -m
armv7l

root@rapik:~# file /opt/openziti/bin/zrok
/opt/openziti/bin/zrok: ELF 32-bit LSB executable, ARM, EABI5 version 1 (SYSV), dynamically linked, interpreter /lib/ld-linux.so.3, BuildID[sha1]=a834950618f0a3820225f575176a648edd3eea29, for GNU/Linux 3.2.0, stripped

Please help...

I can reproduce this floating point exception in an emulated arm/v7 container and I'm working to diagnose the issue.

I noticed that it was necessary to link the interpreter before zrok would run in that environment (Debian 11, 12).

ln -sfvn /lib/ld-linux-armhf.so.3 /lib/ld-linux.so.3

@pakagi I can also reproduce the error with an arm/v7 emulated chroot and found it did not recur if zrok is statically linked. Can you confirm this branch works on your arm64 Raspberry Pi with a 32bit OS?

If you check out that branch with Git and change to the working directory you can build it with Docker like this and the binary will be in ./dist/zrok-armv7_linux_arm_7/zrok.

docker buildx build -t zrok-builder ./docker/images/cross-build --load;
docker run --user "$UID" --rm --volume=${HOME}/.cache/go-build:/usr/share/go --volume $PWD:/mnt zrok-builder arm;

If you DM me I can attach a binary build for you instead.

I ended up taking a different approach and changed the compiler to target armhf specifically. It is now available as a release: https://github.com/openziti/zrok/releases/download/v0.4.36/zrok_0.4.36_linux_armv7.tar.gz

Please let us know if it works on your 32bit OS w/ ARM/v7 CPU!

If you happen to have an ARM/v7 CPU that is armel, not armhf, there are build instructions available in the repo here: zrok/docker/images/cross-build/README.md at v0.4.36 · openziti/zrok · GitHub

TL;DR

Substitite latest release for v0.4.36 from Release v0.4.36 · openziti/zrok · GitHub

git clone --branch=v0.4.36 --single-branch --depth=1 https://github.com/openziti/zrok.git;
cd ./zrok;
docker buildx build -t zrok-builder ./docker/images/cross-build --load;
docker run --user "${UID}" --rm --volume=${HOME}/.cache/go-build:/usr/share/go --volume "${PWD}:/mnt" zrok-builder armel;
file dist/zrok-armel_linux_arm_7/zrok;