twistedfall / opencv-rust

Rust bindings for OpenCV 3 & 4
MIT License
1.96k stars 157 forks source link

cross compile issues, from amd64 to aarch64 #569

Closed DennisZhangOiler closed 5 months ago

DennisZhangOiler commented 5 months ago

Hi,

Before I open this issue, I have searched issues and stack overflow, and I end up using cross to help me cross compile, but it fails with

   Compiling opencv v0.91.1
error: failed to run custom build command for `opencv v0.91.1`

Caused by:
  process didn't exit successfully: `/target/debug/build/opencv-4ef049b131eeb77d/build-script-build` (exit status: 127)
  --- stderr
  /target/debug/build/opencv-4ef049b131eeb77d/build-script-build: error while loading shared libraries: libclang-10.so.1: cannot open shared object file: No such file or directory

How can I fix this? Thank you in advance.

DennisZhangOiler commented 5 months ago

Eventually, I choose to build a Dockerfile and manually build opencv to aarch64 then everything works, sorry to botther.