utilityai / llama-cpp-rs

150 stars 46 forks source link

Build failed on Windows #487

Open thewh1teagle opened 1 month ago

thewh1teagle commented 1 month ago

I just installed llama-cpp-2 on Windows and when tried to build it failed with error.

Error

cargo build -p llama-cpp-2
   Compiling windows_x86_64_msvc v0.52.6
   Compiling windows-targets v0.52.6
   Compiling windows-sys v0.52.0
   Compiling libloading v0.8.5
   Compiling clang-sys v1.8.1
   Compiling errno v0.3.9
   Compiling home v0.5.9
   Compiling rustix v0.38.34
   Compiling which v4.4.2
   Compiling bindgen v0.69.4
   Compiling llama-cpp-sys-2 v0.1.69
   Compiling llama-cpp-2 v0.1.69
error[E0271]: type mismatch resolving `<LlamaTokenAttr as RawBitFlags>::Numeric == i32`
  --> C:\Users\User\.cargo\registry\src\index.crates.io-6f17d22bba15001f\llama-cpp-2-0.1.69\src\token_type.rs:45:17
   |
45 |         Ok(Self(BitFlags::from_bits(value).map_err(|e| {
   |                 ^^^^^^^^^^^^^^^^^^^^^^^^^^ expected `u32`, found `i32`

For more information about this error, try `rustc --explain E0271`.
error: could not compile `llama-cpp-2` (lib) due to 1 previous error

Version

llama-cpp-2 = { version = "0.1.68", features = [] }
babichjacob commented 2 weeks ago

was fixed by #488 and can be closed