rust-ncnn icon indicating copy to clipboard operation
rust-ncnn copied to clipboard

Raspberry pi compiling failed by mismatched types

Open Spoki4 opened this issue 1 year ago • 2 comments

Compile on raspberry pi Bullseye 32bit armhf is failed by mismatched types

   Compiling ncnn-rs v0.1.2 (https://github.com/tpoisonooo/rust-ncnn.git?rev=89fde76#89fde767)
error[E0308]: mismatched types
   --> /home/pi/.cargo/git/checkouts/rust-ncnn-61b5afba67685a71/89fde76/ncnn-rs/src/mat.rs:400:18
    |
399 |     pub fn cstep(&self) -> u64 {
    |                            --- expected `u64` because of return type
400 |         unsafe { ncnn_mat_get_cstep(self.ptr) }
    |                  ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ expected `u64`, found `u32`
    |
help: you can convert a `u32` to a `u64`
    |
400 |         unsafe { ncnn_mat_get_cstep(self.ptr).into() }
    |                                              +++++++

For more information about this error, try `rustc --explain E0308`.
error: could not compile `ncnn-rs` (lib) due to previous error
[dependencies]
ncnn-rs = { git = "https://github.com/tpoisonooo/rust-ncnn.git", package="ncnn-rs", rev="89fde76" }
ncnn-bind = { git = "https://github.com/tpoisonooo/rust-ncnn.git", package="ncnn-bind", rev="89fde76" }

NCNN_TAG="20220721"

Spoki4 avatar Jul 10 '23 07:07 Spoki4

let me check it later

tpoisonooo avatar Oct 13 '23 08:10 tpoisonooo

@Spoki4 fixed.

tpoisonooo avatar Dec 19 '23 11:12 tpoisonooo