alianse777 / darknet-rust

A Rust wrapper for Darknet, an open source neural network framework written in C and CUDA.
http://pjreddie.com/darknet/
MIT License
33 stars 8 forks source link

Build fails with `darknet-rust` and `opencv` on Arch Linux #18

Open ImanolGo opened 11 months ago

ImanolGo commented 11 months ago

Description:

I am encountering a build failure when trying to use the darknet-rust crate in combination with the opencv crate in my Rust project on Arch Linux. The project builds fine when either crate is used independently, but combining them leads to a build error related to libclang.

Environment:

Steps to Reproduce:

  1. Create a new Rust project.
  2. Add darknet-rust and opencv to Cargo.toml.
  3. Run cargo build.

Error Log:

=== Detected OpenCV module header dir at: /usr/include/opencv4/opencv2
=== Found OpenCV version: [version] in headers located at: /usr/include/opencv4
=== Generating code in: [...]/test_darknet/target/debug/build/opencv-[hash]/out
=== Placing generated bindings into: [...]/test_darknet/target/debug/build/opencv-[hash]/out/opencv
=== Using OpenCV headers from: /usr/include/opencv4
thread 'main' panicked at [...]/.cargo/registry/src/index.crates.io-[hash]/clang-sys-1.6.1/src/lib.rs:1735:1:
a `libclang` shared library is not loaded on this thread
note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace
warning: build failed, waiting for other jobs to finish...

Troubleshooting Steps:

Any help or guidance on resolving this issue would be greatly appreciated.