Package Details: whisper.cpp-openvino 1.7.1-4

Git Clone URL: https://aur.archlinux.org/whisper.cpp.git (read-only, click to copy)
Package Base: whisper.cpp
Description: Port of OpenAI's Whisper model in C/C++ (with OpenVINO run-time)
Upstream URL: https://github.com/ggerganov/whisper.cpp
Licenses: MIT
Conflicts: whisper.cpp
Provides: whisper.cpp
Submitter: robertfoster
Maintainer: robertfoster
Last Packager: robertfoster
Votes: 11
Popularity: 0.53
First Submitted: 2023-03-10 17:32 (UTC)
Last Updated: 2024-11-04 13:56 (UTC)

Latest Comments

1 2 3 Next › Last »

xuiqzy commented on 2024-11-13 19:59 (UTC)

Vulkan variant failed to build even with shaderc and vulkan-headers installed. Full output: https://pastebin.com/HzaxTUvd Partial:

-- CUDA found
-- Using CUDA architectures: 52;61;70;75
CMake Error at /usr/share/cmake/Modules/CMakeDetermineCompilerId.cmake:865 (message):
  Compiling the CUDA compiler identification source file
  "CMakeCUDACompilerId.cu" failed.

  Compiler: /opt/cuda/bin/nvcc

  Build flags:

  Id flags: --keep;--keep-dir;tmp -v



  The output was:

  2

  #$ _NVVM_BRANCH_=nvvm

  #$ _SPACE_=

  #$ _CUDART_=cudart

  #$ _HERE_=/opt/cuda/bin

  #$ _THERE_=/opt/cuda/bin

  #$ _TARGET_SIZE_=

  #$ _TARGET_DIR_=

  #$ _TARGET_DIR_=targets/x86_64-linux

  #$ TOP=/opt/cuda/bin/..

  #$ CICC_PATH=/opt/cuda/bin/../nvvm/bin

  #$ NVVMIR_LIBRARY_DIR=/opt/cuda/bin/../nvvm/libdevice

  #$ LD_LIBRARY_PATH=/opt/cuda/bin/../lib:

  #$
  PATH=/opt/cuda/bin/../nvvm/bin:/opt/cuda/bin:/home/xuiqzy/.cargo/bin:/usr/local/bin:/usr/bin:/var/lib/snapd/snap/bin:/usr/bin/site_perl:/usr/bin/vendor_perl:/usr/bin/core_perl:/opt/cuda/bin


  #$ INCLUDES="-I/opt/cuda/bin/../targets/x86_64-linux/include"

  #$ LIBRARIES= "-L/opt/cuda/bin/../targets/x86_64-linux/lib/stubs"
  "-L/opt/cuda/bin/../targets/x86_64-linux/lib"

  #$ CUDAFE_FLAGS=

  #$ PTXAS_FLAGS=

  #$ rm tmp/a_dlink.reg.c

  #$ gcc -D__CUDA_ARCH_LIST__=520 -D__NV_LEGACY_LAUNCH -E -x c++ -D__CUDACC__
  -D__NVCC__ "-I/opt/cuda/bin/../targets/x86_64-linux/include"
  -D__CUDACC_VER_MAJOR__=12 -D__CUDACC_VER_MINOR__=6
  -D__CUDACC_VER_BUILD__=77 -D__CUDA_API_VER_MAJOR__=12
  -D__CUDA_API_VER_MINOR__=6 -D__NVCC_DIAG_PRAGMA_SUPPORT__=1 -include
  "cuda_runtime.h" -m64 "CMakeCUDACompilerId.cu" -o
  "tmp/CMakeCUDACompilerId.cpp4.ii"

  #$ cudafe++ --c++17 --gnu_version=140201 --display_error_number
  --orig_src_file_name "CMakeCUDACompilerId.cu" --orig_src_path_name
  "/tmp/makepkg/whisper.cpp/src/whisper.cpp-cuda/build/CMakeFiles/3.31.0/CompilerIdCUDA/CMakeCUDACompilerId.cu"
  --allow_managed --m64 --parse_templates --gen_c_file_name
  "tmp/CMakeCUDACompilerId.cudafe1.cpp" --stub_file_name
  "CMakeCUDACompilerId.cudafe1.stub.c" --gen_module_id_file
  --module_id_file_name "tmp/CMakeCUDACompilerId.module_id"
  "tmp/CMakeCUDACompilerId.cpp4.ii"

  /usr/include/c++/14.2.1/x86_64-pc-linux-gnu/bits/c++config.h(827): error:
  user-defined literal operator not found

      typedef __decltype(0.0bf16) __bfloat16_t;
                         ^



  /usr/include/c++/14.2.1/type_traits(529): error: type name is not allowed

        : public __bool_constant<__is_array(_Tp)>
                                            ^



  /usr/include/c++/14.2.1/type_traits(529): error: identifier "__is_array" is
  undefined

        : public __bool_constant<__is_array(_Tp)>
                                 ^



  /usr/include/c++/14.2.1/type_traits(581): error: type name is not allowed

        : public __bool_constant<__is_member_object_pointer(_Tp)>
                                                            ^



  /usr/include/c++/14.2.1/type_traits(581): error: identifier
  "__is_member_object_pointer" is undefined

        : public __bool_constant<__is_member_object_pointer(_Tp)>
                                 ^



  /usr/include/c++/14.2.1/type_traits(603): error: type name is not allowed

        : public __bool_constant<__is_member_function_pointer(_Tp)>
                                                              ^



  /usr/include/c++/14.2.1/type_traits(603): error: identifier
  "__is_member_function_pointer" is undefined

        : public __bool_constant<__is_member_function_pointer(_Tp)>
                                 ^



  /usr/include/c++/14.2.1/type_traits(695): error: type name is not allowed

        : public __bool_constant<__is_reference(_Tp)>
                                                ^



<... cut off, kept the end again>


Call Stack (most recent call first):
  /usr/share/cmake/Modules/CMakeDetermineCompilerId.cmake:8 (CMAKE_DETERMINE_COMPILER_ID_BUILD)
  /usr/share/cmake/Modules/CMakeDetermineCompilerId.cmake:53 (__determine_compiler_id_test)
  /usr/share/cmake/Modules/CMakeDetermineCUDACompiler.cmake:131 (CMAKE_DETERMINE_COMPILER_ID)
  ggml/src/CMakeLists.txt:299 (enable_language)


xiota commented on 2024-11-10 20:50 (UTC) (edited on 2024-11-10 21:06 (UTC) by xiota)

Rather than delete libggml related files, should configure to link statically. Appears each variant needs its own version of libggml, which the aur/libggml-git package can't handle.

AUR is not a personal repo, is public

That statement supports creating separate PKGBUILDs for each subpackage. Few people need every variant. Forcing users to build them all of them, edit the PKGBUILD every update, etc is cumbersome. If you expect users to modify the package before building, the base package should support baseline x86_64 with ability to build with other options.

jsimonrichard commented on 2024-11-10 00:43 (UTC)

This may have been caused by the deletion of ggml.so (not sure), but I'm getting the following error (even though I also installed libggml-git).

$ whisper.cpp --help
whisper.cpp: symbol lookup error: /usr/lib/libwhisper.so.1: undefined symbol: ggml_backend_cuda_init

n4r3n commented on 2024-11-09 00:03 (UTC)

Please add vulkan-headers and shaderc to makedepends, without those the vulkan variant won't build

Also, a few commits before you added a line which deletes the ggml.so lib, which is a dependency of all the binaries:

$ whisper.cpp --help
whisper.cpp: error while loading shared libraries: libggml.so: cannot open shared object file: No such file or directory
$ ldd /usr/bin/whisper.cpp
        linux-vdso.so.1 (0x000070ccacdbd000)
        libwhisper.so.1 => /usr/lib/libwhisper.so.1 (0x000070ccaccd6000)
        libstdc++.so.6 => /usr/lib/libstdc++.so.6 (0x000070ccaca00000)
        libm.so.6 => /usr/lib/libm.so.6 (0x000070ccac911000)
        libgcc_s.so.1 => /usr/lib/libgcc_s.so.1 (0x000070ccacca8000)
        libc.so.6 => /usr/lib/libc.so.6 (0x000070ccac720000)
        /lib64/ld-linux-x86-64.so.2 => /usr/lib64/ld-linux-x86-64.so.2 (0x000070ccacdbf000)
        libggml.so => not found

Marzal commented on 2024-11-04 13:37 (UTC) (edited on 2024-11-04 13:44 (UTC) by Marzal)

Hi, there is copy/paste errata on package_whisper.cpp-vulkan()

cd "${pkgbase}-openvino"

Also did you check -DCMAKE_SKIP_RPATH=YES ? fixes a lot of warnings on my compilations.

My /etc/makepkg.conf looks like upstream https://gitlab.archlinux.org/archlinux/packaging/packages/pacman/-/blob/main/makepkg.conf?ref_type=heads#L98 I think Arch enabled debug a while ago (1 year) https://gitlab.archlinux.org/archlinux/packaging/packages/pacman/-/commit/90bf367e61b4f77f8351d0412be3d0c4ddadb85a

robertfoster commented on 2024-11-04 11:58 (UTC) (edited on 2024-11-04 12:12 (UTC) by robertfoster)

@Marzal clblas removed and vulkan added. (!debug) option is already the default (check /etc/makepkg.conf).

@sixtyfive, here there are no models, it's up to you.

@BrainDamage. I don't agree with you. You can always manually edit the PKGBUILD, skip the makedepends or use the chaotic aur repo to fetch binaries. AUR is not a personal repo, is public

BrainDamage commented on 2024-10-23 09:02 (UTC) (edited on 2024-10-23 09:02 (UTC) by BrainDamage)

I'd strongly suggest to split the package into separate files, there's nothing in their compilation steps in common apart from downloading <1MB sources and in order to do that, you're making impossible to programmatically select the packages and forcing everyone to either:

  • install the 5GB/10GB of cuda/openvino make dependencies irregardless if they need the relevant packages

  • edit the pkbuild every update cutting out the unneeded packages, operation further complicated by the unnecessary pkgbuild splitting functionality plastering the sections all around the code

Official arch packages always build with all variants because they end up in a public repository, so it doesn't make sense for them to even consider selecting a single one so they often adopt a split system for maintainer's ease. Here we're talking about personal repos and I'd argue that being able to save downloading 5/10/15 GB of useless makedeps would be a worthy feature

You'd have to edit the version number/hash in 3 files instead of one, but in exchange the pkgbuild themselves would be much cleaner

sixtyfive commented on 2024-10-21 16:09 (UTC) (edited on 2024-10-21 16:10 (UTC) by sixtyfive)

With this package, (1) how does one access "command"? (as in ./command -m ./models/ggml-small.en.bin -t 8) and (2) where in the filesystem are the models stored? Thank you kindly!

homocomputeris commented on 2024-10-11 16:59 (UTC) (edited on 2024-10-11 17:05 (UTC) by homocomputeris)

The flag for openblas has changed:

make clean
GGML_OPENBLAS=1 make -j
ifdef GGML_OPENBLAS
    MK_CPPFLAGS += -DGGML_USE_BLAS $(shell pkg-config --cflags-only-I openblas)
    MK_CFLAGS   += $(shell pkg-config --cflags-only-other openblas)
    MK_LDFLAGS  += $(shell pkg-config --libs openblas)
    OBJ_GGML    += ggml/src/ggml-blas.o
endif # GGML_OPENBLAS

ifdef GGML_OPENBLAS64
    MK_CPPFLAGS += -DGGML_USE_BLAS $(shell pkg-config --cflags-only-I openblas64)
    MK_CFLAGS   += $(shell pkg-config --cflags-only-other openblas64)
    MK_LDFLAGS  += $(shell pkg-config --libs openblas64)
    OBJ_GGML    += ggml/src/ggml-blas.o
endif # GGML_OPENBLAS64

Marzal commented on 2024-10-11 16:38 (UTC) (edited on 2024-10-19 22:17 (UTC) by Marzal)

CLBLAST it's no longer supported on 1.7 https://github.com/ggerganov/whisper.cpp/issues/2292

But Vulkan it's faster on my RX580

makedepends=(
  'vulkan-icd-loader'
  'cmake'
  'git'
)

  local _cmake_vulkan_args=(
    "${_cmake_args[@]}"
    -DGGML_VULKAN=ON
  )

package_whisper.cpp-vulkan() {
  pkgdesc="$pkgdesc (with vulkan optimizations)"
  depends+=('vulkan-icd-loader vulkan-driver')
  provides=("${pkgbase}=${pkgver}")
  conflicts=("${pkgbase}")

  cd "${pkgbase}-vulkan"
  DESTDIR="${pkgdir}" cmake --install build
  _package
}

I would also add: OPTIONS+=(!debug) after makdepends or source

and -DCMAKE_SKIP_RPATH=YES in build()

PD: +1 to NOT have this packages as a split package, compiling cuda + openvino is overkill for my computer. But thanks for your work in any case. https://bbs.archlinux.org/viewtopic.php?id=223171