Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
ImanolGo opened this issue Nov 11, 2023 · 0 comments
Open

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

ImanolGo opened this issue Nov 11, 2023 · 0 comments

Comments

@ImanolGo
Copy link

ImanolGo commented Nov 11, 2023

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:

  • OS: Arch Linux - 6.5.9-arch2-1
  • Rust version: 1.73.0
  • clang version: 16.0.6
  • darknet-rust version: 0.4
  • opencv version: 0.85.3

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:

  • Set LIBCLANG_PATH to /usr/lib.
  • Tried different versions of the crates.
  • Installed libclang and verified its presence.

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant