tazz4843 / whisper-rs

Rust bindings to https://github.com/ggerganov/whisper.cpp
The Unlicense
607 stars 105 forks source link

CUDA compilation fails with cmake error (windows+linux) #132

Closed kartonrad closed 2 months ago

kartonrad commented 2 months ago

It says: does not appear to contain CMakeLists.txt.

I realize that this isnt the most helpful issue, but unfortunately i have no idea how to use cmake. C/C++ Tooling in general just remains a mystery for me :(

error: failed to run custom build command for `whisper-rs-sys v0.8.1 (/home/konni/whisper-rs/sys)`

Caused by:
  process didn't exit successfully: `/home/konni/whisper-rs/target/debug/build/whisper-rs-sys-daf28c002353378a/build-script-build` (exit status: 101)
  --- stdout
  cargo:rustc-link-lib=dylib=stdc++
  cargo:rustc-link-lib=cublas
  cargo:rustc-link-lib=cudart
  cargo:rustc-link-lib=cublasLt
  cargo:rustc-link-lib=cuda
  cargo:rustc-link-lib=culibos
  cargo:rustc-link-search=/usr/local/cuda/lib64
  cargo:rustc-link-search=/opt/cuda/lib64
  cargo:rerun-if-changed=wrapper.h
  cargo:rerun-if-env-changed=TARGET
  cargo:rerun-if-env-changed=BINDGEN_EXTRA_CLANG_ARGS_x86_64-unknown-linux-gnu
  cargo:rerun-if-env-changed=BINDGEN_EXTRA_CLANG_ARGS_x86_64_unknown_linux_gnu
  cargo:rerun-if-env-changed=BINDGEN_EXTRA_CLANG_ARGS
  cargo:rerun-if-changed=wrapper.h
  cargo:rerun-if-changed=./whisper.cpp/whisper.h
  cargo:rerun-if-changed=./whisper.cpp/ggml.h
  cargo:rerun-if-changed=/usr/lib/clang/17/include/stdint.h
  cargo:rerun-if-changed=/usr/include/stdint.h
  cargo:rerun-if-changed=/usr/include/bits/libc-header-start.h
  cargo:rerun-if-changed=/usr/include/features.h
  cargo:rerun-if-changed=/usr/include/features-time64.h
  cargo:rerun-if-changed=/usr/include/bits/wordsize.h
  cargo:rerun-if-changed=/usr/include/bits/timesize.h
  cargo:rerun-if-changed=/usr/include/bits/wordsize.h
  cargo:rerun-if-changed=/usr/include/stdc-predef.h
  cargo:rerun-if-changed=/usr/include/sys/cdefs.h
  cargo:rerun-if-changed=/usr/include/bits/wordsize.h
  cargo:rerun-if-changed=/usr/include/bits/long-double.h
  cargo:rerun-if-changed=/usr/include/gnu/stubs.h
  cargo:rerun-if-changed=/usr/include/gnu/stubs-64.h
  cargo:rerun-if-changed=/usr/include/bits/types.h
  cargo:rerun-if-changed=/usr/include/features.h
  cargo:rerun-if-changed=/usr/include/bits/wordsize.h
  cargo:rerun-if-changed=/usr/include/bits/timesize.h
  cargo:rerun-if-changed=/usr/include/bits/wordsize.h
  cargo:rerun-if-changed=/usr/include/bits/typesizes.h
  cargo:rerun-if-changed=/usr/include/bits/time64.h
  cargo:rerun-if-changed=/usr/include/bits/wchar.h
  cargo:rerun-if-changed=/usr/include/bits/wordsize.h
  cargo:rerun-if-changed=/usr/include/bits/stdint-intn.h
  cargo:rerun-if-changed=/usr/include/bits/types.h
  cargo:rerun-if-changed=/usr/include/bits/stdint-uintn.h
  cargo:rerun-if-changed=/usr/include/bits/types.h
  cargo:rerun-if-changed=/usr/include/bits/stdint-least.h
  cargo:rerun-if-changed=/usr/include/bits/types.h
  cargo:rerun-if-changed=/usr/lib/clang/17/include/stddef.h
  cargo:rerun-if-changed=/usr/lib/clang/17/include/__stddef_max_align_t.h
  cargo:rerun-if-changed=/usr/lib/clang/17/include/stdbool.h
  cargo:rerun-if-changed=/usr/lib/clang/17/include/stddef.h
  cargo:rerun-if-changed=/usr/lib/clang/17/include/stdint.h
  cargo:rerun-if-changed=/usr/lib/clang/17/include/stdbool.h
  cargo:rerun-if-changed=./whisper.cpp/ggml.h
  CMAKE_TOOLCHAIN_FILE_x86_64-unknown-linux-gnu = None
  CMAKE_TOOLCHAIN_FILE_x86_64_unknown_linux_gnu = None
  HOST_CMAKE_TOOLCHAIN_FILE = None
  CMAKE_TOOLCHAIN_FILE = None
  CMAKE_GENERATOR_x86_64-unknown-linux-gnu = None
  CMAKE_GENERATOR_x86_64_unknown_linux_gnu = None
  HOST_CMAKE_GENERATOR = None
  CMAKE_GENERATOR = None
  CMAKE_PREFIX_PATH_x86_64-unknown-linux-gnu = None
  CMAKE_PREFIX_PATH_x86_64_unknown_linux_gnu = None
  HOST_CMAKE_PREFIX_PATH = None
  CMAKE_PREFIX_PATH = None
  CMAKE_x86_64-unknown-linux-gnu = None
  CMAKE_x86_64_unknown_linux_gnu = None
  HOST_CMAKE = None
  CMAKE = None
  running: cd "/home/konni/whisper-rs/target/debug/build/whisper-rs-sys-1088564b4b4a99ff/out/build" && CMAKE_PREFIX_PATH="" "cmake" "-Wdev" "--debug-output" "/home/konni/whisper-rs/target/debug/build/whisper-rs-sys-1088564b4b4a99ff/out/whisper.cpp/" "-DBUILD_SHARED_LIBS=OFF" "-DWHISPER_ALL_WARNINGS=OFF" "-DWHISPER_ALL_WARNINGS_3RD_PARTY=OFF" "-DWHISPER_BUILD_TESTS=OFF" "-DWHISPER_BUILD_EXAMPLES=OFF" "-DWHISPER_CUBLAS=ON" "-DWHISPER_METAL=OFF" "-DCMAKE_BUILD_TYPE=RelWithDebInfo" "-DCMAKE_INSTALL_PREFIX=/home/konni/whisper-rs/target/debug/build/whisper-rs-sys-1088564b4b4a99ff/out" "-DCMAKE_C_FLAGS= -ffunction-sections -fdata-sections -fPIC -m64" "-DCMAKE_C_COMPILER=/usr/sbin/cc" "-DCMAKE_CXX_FLAGS= -ffunction-sections -fdata-sections -fPIC -m64" "-DCMAKE_CXX_COMPILER=/usr/sbin/c++" "-DCMAKE_ASM_FLAGS= -ffunction-sections -fdata-sections -fPIC -m64" "-DCMAKE_ASM_COMPILER=/usr/sbin/cc" "-DCMAKE_VERBOSE_MAKEFILE:BOOL=ON"
  Running with debug output on.

  --- stderr
  CMake Warning:
    Ignoring extra path from command line:

     "/home/konni/whisper-rs/target/debug/build/whisper-rs-sys-1088564b4b4a99ff/out/whisper.cpp/"

  CMake Error: The source directory "/home/konni/whisper-rs/target/debug/build/whisper-rs-sys-1088564b4b4a99ff/out/whisper.cpp" does not appear to contain CMakeLists.txt.
  Specify --help for usage, or press the help button on the CMake GUI.
  thread 'main' panicked at /home/konni/.cargo/registry/src/index.crates.io-6f17d22bba15001f/cmake-0.1.50/src/lib.rs:1098:5:

  command did not execute successfully, got: exit status: 1

  build script failed, must exit now
  note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace
kartonrad commented 2 months ago

~Ah.... it builds succesfully from crates.io I was trying to build master 🤦

kartonrad commented 2 months ago

master actually does seem to be broken rn though - but sinbe its not releasedits not an issue

tazz4843 commented 2 months ago

Did you initialize the git submodules?

kartonrad commented 2 months ago

Yeah! I actually did (after a previous error)

I used 'git submodule update --init --recursive'

kartonrad commented 2 months ago

I got the same error in wsl and in my host windows system

So it maybe has to do with the version of whisper.cpp being embedded

But since 0.11.1 works for me, i guess its not an issue per se