Hi @kastrom!
Setting up a Ziti tunneler on a Raspberry Pi will occasionally require an extra step, but we can help you get it working.
You're correct! The 32-bit package was built incorrectly for the older, generic "arm" package architecture, which does not assume hardware support for floating-point operations, which is prevalent in modern 32-bit ARM devices (armhf
).
Still, the binary inside the package has the correct interpreter, /lib/ld-linux-armhf.so.3
, so, in this case, I think you can work around the architecture mismatch with dpkg --install --force-architecture
.
Alternatively:
Install a 64-bit OS
You have a 32-bit Debian OS installed on a device with a 64-bit CPU. If you cannot find software for your OS architecture, you can install a 64-bit OS. All Raspberry Pi v4 and v5 models have 64-bit armv8 CPU architecture.
You can confirm the OS and CPU architecture. The package manager will report the target architecture for which the OS was compiled, and the kernel will report the actual CPU architecture.
# ask the package manager
dpkg --print-architecture
# ask the kernel
uname -m
I assume dpkg
will, as before, say the target architecture is armhf
(i.e., 32-bit armv7), and uname
will report aarch64
(i.e., 64-bit armv8), which means your device supports 64-bit Raspbian, which may not have the same problem installing the Linux package.
Build the Debian package for armhf
I've sent a pull request in GitHub to change the target architecture for 32-bit Debian package to armhf
. In the meantime, here are the steps to build the package.
-
Clone the tunneler SDK repo on your x86_64 Linux system and change to the directory containing your working copy. Then, check out the latest stable release and perform the following steps to cross-compile ziti-edge-tunnel
and build the Debian package for armhf
.
git checkout v1.2.10
-
Patch the 32-bit arm toolchain.
patch -p1 <<EOF
diff --git a/toolchains/Linux-arm.cmake b/toolchains/Linux-arm.cmake
index 3d75c76..ad0cc03 100644
--- a/toolchains/Linux-arm.cmake
+++ b/toolchains/Linux-arm.cmake
@@ -6,7 +6,7 @@ set(triple arm-linux-gnueabihf)
set(CMAKE_C_COMPILER ${triple}-gcc)
set(CMAKE_CXX_COMPILER ${triple}-g++)
-set(CPACK_DEBIAN_PACKAGE_ARCHITECTURE arm)
+set(CPACK_DEBIAN_PACKAGE_ARCHITECTURE armhf)
set(CPACK_RPM_PACKAGE_ARCHITECTURE armv7l)
set(ENV{PKG_CONFIG_PATH} /usr/lib/${triple}/pkgconfig)
EOF
-
Build the Ubuntu Focal builder image.
cd ./.github/actions/openziti-tunnel-build-action/ubuntu-20.04/;
docker buildx build -t focal-builder . --load;
-
Run the Ubuntu Focal builder.
docker run --name focal-builder --rm --volume "${PWD}:/github/workspace" --workdir "/github/workspace" focal-builder ci-linux-arm Release
-
Verify the artifact's architecture.
dpkg-deb -I ./build/ziti-edge-tunnel-*.deb
gets:
...
Architecture: armhf
...
-
Finally, copy the package file to the 64-bit Raspberry Pi running 32-bit Raspbian and install it.
This package repo appears to have the same problem for arm or arm64 or both. I'll send a pull request to fix the architecture strings.