How to Compile and Cross-Compile llama.cpp for ARM64 on Debian 12/13
llama.cpp is a lightweight C/C++ inference runtime for running large language models locally using the GGUF format on x86_64 servers and ARM64 devices. Developers can perform a native build on Debian 12 or 13 by installing core dependencies such as CMake, Ninja, and build-essential, then cloning the official llama.cpp repository before compiling with standard CMake commands. For cross-compilation targeting ARM64 from an x86_64 machine, the GCC AArch64 cross-compiler toolchain must be installed and specified via CMake flags, producing binaries verified as ARM64 ELF executables using the file command. Optional OpenBLAS integration can accelerate CPU matrix operations, though developers must clear the CMake cache when changing build flags to avoid stale configurations. Compiled binaries and shared libraries can be deployed to ARM-based single-board computers such as Orange Pi via SCP, with LD_LIBRARY_PATH configured when libraries are placed in non-standard directories.
This is an AI-generated summary. ShortSingh links to the original source for the complete article.
Discussion (0)
Log in to join the discussion and vote.
Log in