error[E0308]: mismatched types - expected raw pointer `*mut u8` during cross compilation
Adoni5 opened this issue · comments
Rory Munro commented
Hey guys - I'm trying cross compile into aarch64-unknown-linux
. The problem is the bindings seem to expect *mut u8
, and are receiving an i8
reference.
error[E0308]: mismatched types
--> /root/.cargo/registry/src/index.crates.io-6f17d22bba15001f/rust-htslib-0.44.1/src/bam/record.rs:2324:17
|
2319 | let ret = hts_sys::bam_mods_query_type(
| ---------------------------- arguments to this function are incorrect
...
2324 | &mut canonical,
| ^^^^^^^^^^^^^^ expected `*mut u8`, found `&mut i8`
|
= note: expected raw pointer `*mut u8`
found mutable reference `&mut i8`
note: function defined here
--> /home/runner/work/cnv_from_bam/cnv_from_bam/target/aarch64-unknown-linux-gnu/release/build/hts-sys-f85a33d3986fc8a3/out/bindings.rs:9439:12
|
9439 | pub fn bam_mods_query_type(
| ^^^^^^^^^^^^^^^^^^^
Specifically the issue seems to be here in the modified base metadata.
Lines 2317 to 2325 in 3008a13
Am I doing something obviously wrong? I'm cross compiling using an altered version of docker/cross
https://github.com/rust-cross/manylinux-cross/pkgs/container/manylinux_2_28-cross. I'm creating a .so
to use with a PyO3
package.
Many Thanks
Rory