Building HailoRT on Slackware AArch64 Linux

It seems, in a nutshell, building HailoRT (runtime software) on Slackware AArch64 Linux is a classic case of the operating system being too bleeding edge and advanced for specialised hardware SDKs.

Slackware AArch64 -current is presently shipping cmake 4.3.1, whereas the HailoRT source tree, and scripts used by Raspberry Pi, are tuned for the stable versions found in Debian-based systems (typically 3.28.3-3.31.6). When we try to build HailoRT, the process seems to use an older syntax that cmake 4.3.1 considers a terminal error rather than a warning:

CMake Error at common/genai/serializer/CMakeLists.txt:5 (protobuf_generate_cpp): Unknown CMake command “protobuf_generate_cpp”.

This error is the smoking-gun for the version conflict we’ve been experiencing. ‘protobuf_generate_cpp’ is now a legacy cmake command provided by the FindProtobuf.cmake module. In cmake 4.3.1 (the version our Slackware AArch64 system has installed), this command has been officially deprecated and listed as such in the following official cmake.org pages:

The protobuf_generate_cpp() and protobuf_generate_python() commands… are deprecated since version 4.1. Use protobuf_generate().

The FindProtobuf module’s protobuf_generate_cpp() and protobuf_generate_python() commands, together with their Protobuf_IMPORT_DIRS and PROTOBUF_GENERATE_CPP_APPEND_PATH hint variables, are now deprecated in favor of the protobuf_generate() command.

We need to find another way. :nerd_face: Or HailoRT needs to update its source. :grinning_face_with_smiling_eyes:

SUCCESS! Although it has not been simple or straight-forward. :grin:

Currently, the HailoRT source requires cmake 3.3x to build. Slackware AArch64
has cmake 4.3.x installed which is incompatible with cmake 3.3. Any attempts
to build HailoRT software using cmake 4.3.x result in terminal errors which
crash the compile process.

We decided to build inside a chroot environment to fully isolate the
build environment from the host system.

The chroot approach was the right decision. It enabled us to work very
quickly and iron out any issues that arose. All totally separate and
independent of the running host system.

——

Build Environment:

Host OS : Slackware AArch64 current
Host Hardware : Raspberry Pi 5
Chroot : /tmp/sairpi-chroot
cmake (legacy) : 3.31.12 (/usr/local/cmake-3.31/bin/cmake)
cmake (system) : 4.3.2 (/usr/bin/cmake) - NOT used for HailoRT
gcc : 15.2.0
Kernel built : 6.18.24-v8-sairpi5_64
HailoRT version : 5.3.0
protobuf version : 21.12 (v3.21.12, built from source via FetchContent)

——

  1. Error seen with cmake 4.x:
    CMake Error at hailort/common/genai/serializer/CMakeLists.txt:5
    (protobuf_generate_cpp): Unknown CMake command “protobuf_generate_cpp”.

Resolution:
Build and install cmake 3.31.12 from source as a legacy cmake alongside
the system cmake 4.3.2. cmake 3.31.12 installs to /usr/local/cmake-3.31/.

——

  1. Even with cmake 3.31.12, cmake configure failed with:
    CMake Error at hailort/common/genai/serializer/CMakeLists.txt:5
    (protobuf_generate_cpp): Unknown CMake command “protobuf_generate_cpp”.

Resolution:
Patch hailort/cmake/external/protobuf.cmake to detect lib64 first on
non-Windows platforms, falling back to lib if lib64 does not exist.

——

  1. Initial cmake configure used -DHAILO_BUILD_TOOLS=ON assuming this built
    hailortcli. It doesn’t. It references an internal ‘tools’ subdirectory
    that is not included in the public HailoRT release:
CMake Error at hailort/CMakeLists.txt:119 (add_subdirectory):
  add_subdirectory given source "tools" which is not an existing directory.

Resolution:
Set -DHAILO_BUILD_TOOLS=OFF in cmake configure command.
hailortcli is still built automatically regardless of this flag.

——

  1. linux/vdma/monitor.c:53 calls del_timer_sync() which was removed in
    Linux 6.15 and replaced by timer_delete_sync(). Build fails with:
../vdma/monitor.c:53:5: error: implicit declaration of function
'del_timer_sync' [-Wimplicit-function-declaration]

Resolution:
Replace del_timer_sync() with timer_delete_sync() in monitor.c:53.

——

Results…
HailoRT v5.3.0 built and installed successfully on Slackware AArch64 Linux [2026-04-26].

Installed:
/usr/lib64/libhailort.so.5.3.0
/usr/lib64/libhailort.so
/usr/lib64/libhailopp.so.1.0.0
/usr/lib64/libhailopp.so.1
/usr/lib64/libhailopp.so
/usr/lib64/cmake/HailoRT/
/usr/lib64/cmake/HailoPP/
/usr/include/hailo/
/usr/bin/hailortcli

HailoRT drivers v5.3.0 built and installed successfully on 2026-04-26.

Installed:
/lib/modules/6.18.24-v8-sairpi5_64/kernel/drivers/misc/hailo1x_pci.ko.xz
/lib/modules/6.18.24-v8-sairpi5_64/kernel/drivers/misc/hailo_integrated_nnc.ko.xz