-
Notifications
You must be signed in to change notification settings - Fork 130
Open
Description
Hi, When running the example program on Windows with the Vulkan feature enabled, I encountered a strange issue: the first execution failed with an error, but when I immediately ran it a second time without changing any configuration, it succeeded. What could be causing this behavior? I also encountered the same error during compilation when using this library in other projects.
- rustc 1.89.0 (29483883e 2025-08-04)
**********************************************************************
** Visual Studio 2022 Developer Command Prompt v17.8.3
** Copyright (c) 2022 Microsoft Corporation
**********************************************************************
C:\Program Files\Microsoft Visual Studio\2022\Community>cd C:\Users\jiabo\projects\llama-cpp-rs
C:\Users\jiabo\projects\llama-cpp-rs>cargo run --release --features vulkan --bin simple -- --prompt "The way to kill a linux process is" local C:\Users\jiabo\Downloads\Qwen3-4B-Instruct-2507-Q4_K_M.gguf
warning: `C:\Users\jiabo\.cargo\config` is deprecated in favor of `config.toml`
note: if you need to support cargo 1.38 or earlier, you can symlink `config` to `config.toml`
Compiling proc-macro2 v1.0.85
Compiling unicode-ident v1.0.12
Compiling windows_x86_64_msvc v0.52.5
Compiling cfg-if v1.0.0
Compiling pin-project-lite v0.2.14
Compiling shlex v1.3.0
Compiling stable_deref_trait v1.2.0
Compiling once_cell v1.19.0
Compiling futures-core v0.3.31
Compiling jobserver v0.1.31
Compiling find-msvc-tools v0.1.5
Compiling itoa v1.0.11
Compiling bytes v1.11.0
Compiling futures-sink v0.3.31
Compiling litemap v0.7.3
Compiling smallvec v1.13.2
Compiling slab v0.4.11
Compiling glob v0.3.3
Compiling writeable v0.5.5
Compiling fnv v1.0.7
Compiling serde v1.0.203
Compiling futures-channel v0.3.31
Compiling pin-utils v0.1.0
Compiling zeroize v1.8.1
Compiling memchr v2.7.4
Compiling libc v0.2.155
Compiling prettyplease v0.2.20
Compiling icu_locid_transform_data v1.5.0
Compiling tracing-core v0.1.35
Compiling futures-task v0.3.31
Compiling futures-io v0.3.31
Compiling rustls-pki-types v1.13.0
Compiling windows-targets v0.52.5
Compiling cc v1.2.47
Compiling hashbrown v0.16.0
Compiling native-tls v0.2.12
Compiling icu_properties_data v1.5.0
Compiling windows-sys v0.52.0
Compiling clang-sys v1.8.1
Compiling minimal-lexical v0.2.1
Compiling windows_x86_64_msvc v0.53.1
Compiling equivalent v1.0.2
Compiling httparse v1.10.1
Compiling http v1.3.1
Compiling regex-syntax v0.8.4
Compiling libloading v0.8.3
Compiling percent-encoding v2.3.1
Compiling utf16_iter v1.0.5
Compiling try-lock v0.2.5
Compiling utf8_iter v1.0.4
Compiling atomic-waker v1.1.2
Compiling nom v7.1.3
Compiling quote v1.0.36
Compiling indexmap v2.12.0
Compiling either v1.12.0
Compiling log v0.4.21
Compiling write16 v1.0.0
Compiling serde_json v1.0.117
Compiling icu_normalizer_data v1.5.0
Compiling getrandom v0.3.4
Compiling ryu v1.0.18
Compiling bindgen v0.72.1
Compiling syn v2.0.87
Compiling itertools v0.12.1
Compiling form_urlencoded v1.2.1
Compiling want v0.3.1
Compiling winapi-util v0.1.9
Compiling http-body v1.0.1
Compiling getrandom v0.2.15
Compiling rustc-hash v2.1.1
Compiling windows-link v0.1.3
Compiling same-file v1.0.6
Compiling lazy_static v1.4.0
Compiling tower-service v0.3.3
Compiling untrusted v0.9.0
Compiling bitflags v2.5.0
Compiling winapi v0.3.9
Compiling walkdir v2.5.0
Compiling windows-targets v0.53.5
Compiling cmake v0.1.54
Compiling find_cuda_helper v0.2.0
Compiling rustls v0.22.4
Compiling adler v1.0.2
Compiling portable-atomic v1.6.0
Compiling utf8parse v0.2.2
Compiling windows-link v0.2.1
Compiling anstyle v1.0.8
Compiling anstyle-parse v0.2.4
Compiling windows-sys v0.61.2
Compiling regex-automata v0.4.7
Compiling miniz_oxide v0.7.4
Compiling rand_core v0.9.3
Compiling windows-strings v0.3.1
Compiling windows-result v0.3.4
Compiling http-body-util v0.1.3
Compiling sync_wrapper v1.0.2
Compiling ring v0.17.13
Compiling crc32fast v1.4.2
Compiling thiserror v2.0.17
Compiling thiserror v1.0.69
Compiling ppv-lite86 v0.2.17
Compiling is_terminal_polyfill v1.70.0
Compiling cexpr v0.6.0
Compiling tower-layer v0.3.3
Compiling byteorder v1.5.0
Compiling encode_unicode v0.3.6
Compiling unicode-width v0.1.13
Compiling option-ext v0.2.0
Compiling base64 v0.22.1
Compiling subtle v2.5.0
Compiling colorchoice v1.0.1
Compiling rand_chacha v0.9.0
Compiling flate2 v1.0.30
Compiling windows-registry v0.4.0
Compiling webpki-roots v0.26.3
Compiling rustls-pemfile v2.2.0
Compiling encoding_rs v0.8.35
Compiling ipnet v2.11.0
Compiling anyhow v1.0.100
Compiling strsim v0.11.1
Compiling heck v0.5.0
Compiling mime v0.3.17
Compiling clap_lex v0.7.4
Compiling number_prefix v0.4.0
Compiling rand v0.9.2
Compiling windows-sys v0.60.2
Compiling sharded-slab v0.1.7
Compiling dirs-sys v0.5.0
Compiling dirs v6.0.0
Compiling tracing-log v0.2.0
Compiling thread_local v1.1.8
Compiling regex v1.10.5
Compiling socks v0.3.4
Compiling num_cpus v1.17.0
Compiling mio v1.0.2
Compiling socket2 v0.5.8
Compiling schannel v0.1.23
Compiling anstyle-wincon v3.0.3
Compiling anstyle-query v1.1.0
Compiling console v0.15.8
Compiling nu-ansi-term v0.50.1
Compiling synstructure v0.13.1
Compiling anstream v0.6.14
Compiling indicatif v0.17.8
Compiling clap_builder v4.5.53
Compiling zerofrom-derive v0.1.4
Compiling yoke-derive v0.7.4
Compiling zerovec-derive v0.10.3
Compiling displaydoc v0.2.4
Compiling tokio-macros v2.4.0
Compiling icu_provider_macros v1.5.0
Compiling tracing-attributes v0.1.28
Compiling futures-macro v0.3.31
Compiling serde_derive v1.0.203
Compiling thiserror-impl v1.0.69
Compiling enumflags2_derive v0.7.12
Compiling thiserror-impl v2.0.17
Compiling clap_derive v4.5.49
Compiling enumflags2 v0.7.12
Compiling tokio v1.42.1
Compiling futures-util v0.3.31
Compiling zerofrom v0.1.4
Compiling tracing v0.1.41
Compiling yoke v0.7.4
Compiling zerovec v0.10.4
Compiling clap v4.5.53
Compiling rustls-webpki v0.102.4
Compiling tinystr v0.7.6
Compiling icu_collections v1.5.0
Compiling futures-executor v0.3.31
Compiling icu_locid v1.5.0
Compiling futures v0.3.31
Compiling llama-cpp-sys-2 v0.1.130 (C:\Users\jiabo\projects\llama-cpp-rs\llama-cpp-sys-2)
Compiling icu_provider v1.5.0
Compiling icu_locid_transform v1.5.0
Compiling serde_urlencoded v0.7.1
Compiling tracing-serde v0.2.0
Compiling icu_properties v1.5.0
Compiling tracing-subscriber v0.3.20
Compiling tokio-util v0.7.17
Compiling tokio-native-tls v0.3.1
Compiling tower v0.5.2
Compiling h2 v0.4.12
Compiling icu_normalizer v1.5.0
Compiling idna v1.0.1
Compiling url v2.5.1
Compiling ureq v2.9.7
Compiling hyper v1.8.1
Compiling hyper-util v0.1.10
Compiling hyper-tls v0.6.0
Compiling reqwest v0.12.15
Compiling hf-hub v0.4.3
error: failed to run custom build command for `llama-cpp-sys-2 v0.1.130 (C:\Users\jiabo\projects\llama-cpp-rs\llama-cpp-sys-2)`
Caused by:
process didn't exit successfully: `C:\Users\jiabo\projects\llama-cpp-rs\target\release\build\llama-cpp-sys-2-79141c11637ff70d\build-script-build` (exit code: 101)
--- stderr
CMAKE_BUILD_TYPE=Release
CMake Warning:
Manually-specified variables were not used by the project:
CMAKE_BUILD_PARALLEL_LEVEL
thread 'main' panicked at C:\Users\jiabo\.cargo\registry\src\rsproxy.cn-e3de039b2554c837\cmake-0.1.54\src\lib.rs:1119:5:
command did not execute successfully, got: exit code: 1
build script failed, must exit now
note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace
C:\Users\jiabo\projects\llama-cpp-rs>set RUST_BACKTRACE=1
C:\Users\jiabo\projects\llama-cpp-rs>cargo run --release --features vulkan --bin simple -- --prompt "The way to kill a linux process is" local C:\Users\jiabo\Downloads\Qwen3-4B-Instruct-2507-Q4_K_M.gguf
warning: `C:\Users\jiabo\.cargo\config` is deprecated in favor of `config.toml`
note: if you need to support cargo 1.38 or earlier, you can symlink `config` to `config.toml`
Compiling llama-cpp-sys-2 v0.1.130 (C:\Users\jiabo\projects\llama-cpp-rs\llama-cpp-sys-2)
error: failed to run custom build command for `llama-cpp-sys-2 v0.1.130 (C:\Users\jiabo\projects\llama-cpp-rs\llama-cpp-sys-2)`
note: To improve backtraces for build dependencies, set the CARGO_PROFILE_RELEASE_BUILD_OVERRIDE_DEBUG=true environment variable to enable debug information generation.
Caused by:
process didn't exit successfully: `C:\Users\jiabo\projects\llama-cpp-rs\target\release\build\llama-cpp-sys-2-79141c11637ff70d\build-script-build` (exit code: 101)
--- stderr
thread 'main' panicked at C:\Users\jiabo\.cargo\registry\src\rsproxy.cn-e3de039b2554c837\cmake-0.1.54\src\lib.rs:1119:5:
command did not execute successfully, got: exit code: 1
build script failed, must exit now
stack backtrace:
0: std::panicking::begin_panic_handler
at /rustc/29483883eed69d5fb4db01964cdf2af4d86e9cb2/library\std\src\panicking.rs:697
1: core::panicking::panic_fmt
at /rustc/29483883eed69d5fb4db01964cdf2af4d86e9cb2/library\core\src\panicking.rs:75
2: cmake::find_exe::{{closure}}
3: <cmake::Version as core::default::Default>::default
4: cmake::Config::build
5: build_script_build::is_hidden::{{closure}}
6: core::ops::function::FnOnce::call_once
7: std::env::set_var
8: std::rt::lang_start::{{closure}}
9: std::rt::lang_start_internal::closure$0
at /rustc/29483883eed69d5fb4db01964cdf2af4d86e9cb2/library\std\src\rt.rs:175
10: std::panicking::catch_unwind::do_call
at /rustc/29483883eed69d5fb4db01964cdf2af4d86e9cb2/library\std\src\panicking.rs:589
11: std::panicking::catch_unwind
at /rustc/29483883eed69d5fb4db01964cdf2af4d86e9cb2/library\std\src\panicking.rs:552
12: std::panic::catch_unwind
at /rustc/29483883eed69d5fb4db01964cdf2af4d86e9cb2/library\std\src\panic.rs:359
13: std::rt::lang_start_internal
at /rustc/29483883eed69d5fb4db01964cdf2af4d86e9cb2/library\std\src\rt.rs:171
14: std::rt::lang_start
15: main
16: invoke_main
at D:\a\_work\1\s\src\vctools\crt\vcstartup\src\startup\exe_common.inl:78
17: __scrt_common_main_seh
at D:\a\_work\1\s\src\vctools\crt\vcstartup\src\startup\exe_common.inl:288
18: BaseThreadInitThunk
19: RtlUserThreadStart
note: Some details are omitted, run with `RUST_BACKTRACE=full` for a verbose backtrace.
C:\Users\jiabo\projects\llama-cpp-rs>cargo run --release --features vulkan --bin simple -- --prompt "The way to kill a linux process is" local C:\Users\jiabo\Downloads\Qwen3-4B-Instruct-2507-Q4_K_M.gguf
warning: `C:\Users\jiabo\.cargo\config` is deprecated in favor of `config.toml`
note: if you need to support cargo 1.38 or earlier, you can symlink `config` to `config.toml`
Compiling llama-cpp-sys-2 v0.1.130 (C:\Users\jiabo\projects\llama-cpp-rs\llama-cpp-sys-2)
Compiling llama-cpp-2 v0.1.130 (C:\Users\jiabo\projects\llama-cpp-rs\llama-cpp-2)
warning: missing documentation for a variant
--> llama-cpp-2\src\model.rs:98:5
|
98 | Norm,
| ^^^^
|
= note: requested on the command line with `-W missing-docs`
warning: missing documentation for a variant
--> llama-cpp-2\src\model.rs:99:5
|
99 | NeoX,
| ^^^^
warning: missing documentation for a variant
--> llama-cpp-2\src\model.rs:100:5
|
100 | MRope,
| ^^^^^
warning: missing documentation for a variant
--> llama-cpp-2\src\model.rs:101:5
|
101 | Vision,
| ^^^^^^
warning: `llama-cpp-2` (lib) generated 4 warnings
Compiling simple v0.1.130 (C:\Users\jiabo\projects\llama-cpp-rs\examples\simple)
Finished `release` profile [optimized] target(s) in 3m 14s
Running `target\release\simple.exe --prompt "The way to kill a linux process is" local C:\Users\jiabo\Downloads\Qwen3-4B-Instruct-2507-Q4_K_M.gguf`
n_len = 32, n_ctx = 2048, k_kv_req = 32
The way to kill a linux process is to send a signal to it. The most common signal is SIGTERM, which is sent by default when you press Ctrl+C
decoded 25 tokens in 0.49 s, speed 51.20 t/s
load time = 3260.92 ms
prompt eval time = 0.00 ms / 8 tokens (0.00 ms per token, inf tokens per second)
eval time = 0.00 ms / 24 runs (0.00 ms per token, inf tokens per second)
C:\Users\jiabo\projects\llama-cpp-rs>
Metadata
Metadata
Assignees
Labels
No labels