Bug#1114747: ggml: please disable vector instructions on riscv64
Source: ggml
Version: 0.0~git20250712.d62df60-4
Severity: important
X-Debbugs-Cc: debian-riscv@lists.debian.org
User: debian-riscv@lists.debian.org
Usertags: riscv64
Control: affects -1 llama.cpp
Dear maintainer,
ggml enables vector instructions by default on riscv64. This is
currently not part of the ISA baseline in Debian and the build daemons
do not have support for them. This causes an autopkgtest failure:
| 178s autopkgtest [03:26:52]: test libggml0-backend-blas: /usr/libexec/ggml/runtests
| 178s autopkgtest [03:26:52]: test libggml0-backend-blas: [-----------------------
| 179s dpkg-architecture: warning: cannot determine CC system type, falling back to default (native compilation)
| 179s load_backend: loaded BLAS backend from /usr/lib/riscv64-linux-gnu/ggml/backends0/libggml-blas.so
| 179s load_backend: loaded CPU backend from /usr/lib/riscv64-linux-gnu/ggml/backends0/libggml-cpu.so
| 179s Illegal instruction
This also causes llama.cpp to FTBFS.
The patch below disables vector instructions on riscv64 and fix the issues:
--- ggml-0.0~git20250712.d62df60/debian/rules
+++ ggml-0.0~git20250712.d62df60/debian/rules
@@ -46,6 +46,11 @@
endif
endif
+# Do not enable vector instructions on riscv64, not part of the baseline
+ifeq ($(DEB_HOST_ARCH),riscv64)
+CMAKE_OPTS += -DGGML_RVV=OFF
+endif
+
endif # pkg.ggml.cuda
Regards
Aurelien
Reply to: