twistedfall / opencv-rust

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

alphamat.hpp not found in armv7-unknown-linux-musleabihf #335

Closed kingzcheung closed 2 years ago

kingzcheung commented 2 years ago

Before reporting an issue please first check the troubleshooting guide. If the issue you're encountering is not solved thereby please state the following in your bugreport:

  1. Operating system (macOS (m1))
  2. The way you installed OpenCV: package, official binary distribution, manual compilation, etc. ( package)
  3. OpenCV version (opencv 4.5.5_1)
  4. rustc version (rustc --version) (rustc 1.60.0 (7737e0b5c 2022-04-04))
  5. Attach the full output of the following command from your project directory:
    RUST_BACKTRACE=full  cargo build -vvv --target=armv7-unknown-linux-musleabihf

    output:

.......
  === Generated: video
  === Generated: text
  === Generated: videoio
  === Generated: wechat_qrcode
  === Generated: xobjdetect
  === Generated: xfeatures2d
  === Generated: videostab
  === Generated: stitching
  === Generated: xphoto
  === Generated: viz
  === Generated: ximgproc
  === Total binding generation time: 34.68068725s
  === Compiler information: Tool {
      path: "/Users/kingzcheung/armv7l-linux-musleabihf-cross/bin/armv7l-linux-musleabihf-c++",
      cc_wrapper_path: None,
      cc_wrapper_args: [],
      args: [
          "-O0",
          "-ffunction-sections",
          "-fdata-sections",
          "-fPIC",
          "-g",
          "-fno-omit-frame-pointer",
          "-static",
          "-march=armv7-a",
          "-mfpu=vfpv3-d16",
          "-I",
          "/Users/kingzcheung/.cargo/registry/src/mirrors.ustc.edu.cn-61ef6e0cd06fb9b8/opencv-0.63.1/src_cpp",
          "-I",
          "/Users/kingzcheung/rust/videotools/target/armv7-unknown-linux-musleabihf/debug/build/opencv-16e78a3eb039f256/out",
          "-I",
          ".",
          "-I",
          "/opt/homebrew/Cellar/opencv/4.5.5_1/include/opencv4",
          "-Wall",
          "-Wextra",
          "-std=c++11",
      ],
      env: [],
      family: Gnu,
      cuda: false,
      removed_args: [],
  }

  error occurred: Command "/Users/kingzcheung/armv7l-linux-musleabihf-cross/bin/armv7l-linux-musleabihf-c++" "-O0" "-ffunction-sections" "-fdata-sections" "-fPIC" "-g" "-fno-omit-frame-pointer" "-static" "-march=armv7-a" "-mfpu=vfpv3-d16" "-I" "/Users/kingzcheung/.cargo/registry/src/mirrors.ustc.edu.cn-61ef6e0cd06fb9b8/opencv-0.63.1/src_cpp" "-I" "/Users/kingzcheung/rust/videotools/target/armv7-unknown-linux-musleabihf/debug/build/opencv-16e78a3eb039f256/out" "-I" "." "-I" "/opt/homebrew/Cellar/opencv/4.5.5_1/include/opencv4" "-Wall" "-Wextra" "-std=c++11" "-o" "/Users/kingzcheung/rust/videotools/target/armv7-unknown-linux-musleabihf/debug/build/opencv-16e78a3eb039f256/out/alphamat.o" "-c" "/Users/kingzcheung/rust/videotools/target/armv7-unknown-linux-musleabihf/debug/build/opencv-16e78a3eb039f256/out/alphamat.cpp" with args "armv7l-linux-musleabihf-c++" did not execute successfully (status code exit status: 126).

image

twistedfall commented 2 years ago

Can you please post the full build log?

kingzcheung commented 2 years ago

Sorry,I had found out how to solve it.

twistedfall commented 2 years ago

Please do share your solution!

kingzcheung commented 2 years ago

Ok. In fact, I can't share my solution because I didn't have it documented. It seems that I did not specify the cross-compilation related toolchain directory normally, resulting in some errors.