Re: llama.cpp, whisper.cpp, ggml: Next steps
- To: debian-ai@lists.debian.org
- Subject: Re: llama.cpp, whisper.cpp, ggml: Next steps
- From: Christian Kastner <ckk@debian.org>
- Date: Mon, 3 Mar 2025 18:49:56 +0100
- Message-id: <[🔎] 40b1f0f9-88bc-40c8-8ead-a0c92c1bd670@debian.org>
- In-reply-to: <sa6ikovt4t6.fsf@hjemme.reinholdtsen.name>
- References: <da7bd40e-9157-4b3a-b9d7-629ea0761e63@debian.org> <sa634gb1msz.fsf@hjemme.reinholdtsen.name> <31ba38cb-7601-4f89-a186-3dc5420856ea@debian.org> <sa6zfia6wys.fsf@hjemme.reinholdtsen.name> <a0985ace-6275-4949-aef2-21f355a55389@debian.org> <sa6ikowlnph.fsf@hjemme.reinholdtsen.name> <sa6a5a8laa1.fsf@hjemme.reinholdtsen.name> <9482324c-e3d7-4ed1-a3da-4cf5ac91e7f1@debian.org> <sa6ikovt4t6.fsf@hjemme.reinholdtsen.name>
On 2025-02-27 23:12, Petter Reinholdtsen wrote:
> Thanks. Tried this approach, and get the same result. But the binaries
> are missing the required rpath/runpath:
>
> % ldd debian/whisper.cpp/usr/bin/whisper-stream |grep not
> libggml.so => not found
> libggml-base.so => not found
I managed to reproduce this last week, but now no longer can. Odd, I did
push some ggml changes, but nothing that seems related or even noteworthy.
Here's the sole modification to whisper.cpp HEAD:
diff --git a/debian/rules b/debian/rules
index 040b6e6..f94b6b0 100755
--- a/debian/rules
+++ b/debian/rules
@@ -13,6 +13,8 @@ GPUSUPPORT = -DWHISPER_CLBLAST=ON
override_dh_auto_configure:
dh_auto_configure -- \
-DCMAKE_LIBRARY_ARCHITECTURE="$(DEB_TARGET_MULTIARCH)" \
+ -DCMAKE_INSTALL_RPATH=/usr/lib/$(DEB_HOST_MULTIARCH)/ggml \
+ -DCMAKE_INSTALL_RPATH_USE_LINK_PATH=OFF \
$(GPUSUPPORT) \
-DWHISPER_SDL2=1 \
-DCMAKE_BUILD_TYPE=Release
I built ggml, and installed libggml and libggml-cpu. I then started up a
container and installed these packages; in that container I then built
whisper.cpp with the above patch.
root@3f84051f196e:/package/build-area/whisper.cpp-1.7.4# ldd debian/whisper.cpp/usr/bin/whisper-stream | grep ggml
libggml.so => /usr/lib/x86_64-linux-gnu/ggml/glibc-hwcaps/x86-64-v4/libggml.so (0x00007fd4e5ced000)
libggml-base.so => /usr/lib/x86_64-linux-gnu/ggml/glibc-hwcaps/x86-64-v4/libggml-base.so (0x00007fd4e566b000)
libggml-cpu.so => /usr/lib/x86_64-linux-gnu/ggml/glibc-hwcaps/x86-64-v4/libggml-cpu.so (0x00007fd4e5154000)
root@3f84051f196e:/package/build-area/whisper.cpp-1.7.4# debian/whisper.cpp/usr/bin/whisper-stream -h
usage: debian/whisper.cpp/usr/bin/whisper-stream [options]
options:
-h, --help [default] show this help message and exit
-t N, --threads N [4 ] number of threads to use during
computation
[...]
Could you give it another try, with the newest ggml?
Best,
Christian
Reply to: