Skip to content

Raspberry pi compiling failed by mismatched types #10

@Spoki4

Description

@Spoki4

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"

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions