Skip to content

llvm-config #688

@mynameiscuining

Description

@mynameiscuining
  1. Operating system windows11

  2. OpenCV version 4.12.0

  3. rustc version (rustc --version) 1.89

  4. 2025-08-20T21:30:42.5717819+08:00 ERROR Flycheck failed to run the following command: CommandHandle { program: "F:\install\rust\cargohome\bin\cargo.exe", arguments: ["check", "--workspace", "--message-format=json-diagnostic-rendered-ansi", "--manifest-path", "D:\project\private\rust\opencv-rust-test\test01\Cargo.toml", "--keep-going", "--all-targets"], current_dir: Some("D:\project\private\rust\opencv-rust-test\test01") }, error=Cargo watcher failed, the command produced no valid metadata (exit code: ExitStatus(ExitStatus(101))): Compiling clang-sys v1.8.1
    warning: [email protected]: could not execute llvm-config one or more times, if the LLVM_CONFIG_PATH environment variable is set to a full path to valid llvm-config executable it will be used to try to find an instance of libclang on your system: "couldn't execute llvm-config --prefix (path=llvm-config) (error: program not found)"
    error: failed to run custom build command for clang-sys v1.8.1
    note: To improve backtraces for build dependencies, set the CARGO_PROFILE_DEV_BUILD_OVERRIDE_DEBUG=true environment variable to enable debug information generation.

Caused by:
process didn't exit successfully: D:\project\private\rust\opencv-rust-test\test01\target\debug\build\clang-sys-baaac6ed1d6155a1\build-script-build (exit code: 101)
--- stdout
cargo:warning=could not execute llvm-config one or more times, if the LLVM_CONFIG_PATH environment variable is set to a full path to valid llvm-config executable it will be used to try to find an instance of libclang on your system: "couldn't execute llvm-config --prefix (path=llvm-config) (error: program not found)"

--- stderr

thread 'main' panicked at F:\install\rust\cargohome\registry\src\index.crates.io-1949cf8c6b5b557f\clang-sys-1.8.1\build\dynamic.rs:225:45:
called Result::unwrap() on an Err value: "couldn't find any valid shared libraries matching: ['clang.dll', 'libclang.dll'], set the LIBCLANG_PATH environment variable to a path where one of these files can be found (invalid: [])"
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: core::result::unwrap_failed
at /rustc/29483883eed69d5fb4db01964cdf2af4d86e9cb2/library\core\src\result.rs:1761
3: build_script_build::dynamic::link
4: hashbrown::map::HashMap<K,V,S,A>::get_inner
5: core::ops::function::FnOnce::call_once
6: std::sys::thread_local::abort_on_dtor_unwind
7: std::rt::lang_start::{{closure}}
8: std::rt::lang_start_internal::closure$0
at /rustc/29483883eed69d5fb4db01964cdf2af4d86e9cb2/library\std\src\rt.rs:175
9: std::panicking::catch_unwind::do_call
at /rustc/29483883eed69d5fb4db01964cdf2af4d86e9cb2/library\std\src\panicking.rs:589
10: std::panicking::catch_unwind
at /rustc/29483883eed69d5fb4db01964cdf2af4d86e9cb2/library\std\src\panicking.rs:552
11: std::panic::catch_unwind
at /rustc/29483883eed69d5fb4db01964cdf2af4d86e9cb2/library\std\src\panic.rs:359
12: std::rt::lang_start_internal
at /rustc/29483883eed69d5fb4db01964cdf2af4d86e9cb2/library\std\src\rt.rs:171
13: std::rt::lang_start
14: main
15: invoke_main
at D:\a_work\1\s\src\vctools\crt\vcstartup\src\startup\exe_common.inl:78
16: __scrt_common_main_seh
at D:\a_work\1\s\src\vctools\crt\vcstartup\src\startup\exe_common.inl:288
17: BaseThreadInitThunk
18: RtlUserThreadStart
note: Some details are omitted, run with RUST_BACKTRACE=full for a verbose backtrace.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions