[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: llama.cpp, whisper.cpp, ggml: Next steps



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: