minimap2-rs icon indicating copy to clipboard operation
minimap2-rs copied to clipboard

Invalid cast (on arm64?)

Open rob-p opened this issue 1 year ago • 2 comments

Within minimap2-rs, I'm getting the following error when building on bioconda for an arm64 linux machine:

19:11:58 BIOCONDA INFO (OUT)     |
19:11:58 BIOCONDA INFO (OUT) 856 |                         self.idx.as_ref().unwrap() as *const mm_idx_t,
19:11:58 BIOCONDA INFO (OUT)     |                         ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
19:11:58 BIOCONDA INFO (OUT) 
19:11:58 BIOCONDA INFO (OUT) error[E0606]: casting `&*mut minimap2_sys::mm_idx_t` as `*const minimap2_sys::mm_idx_t` is invalid
19:11:58 BIOCONDA INFO (OUT)    --> /opt/conda/conda-bld/oarfish_1724699349146/_build_env/.cargo/registry/src/index.crates.io-6f17d22bba15001f/minimap2-temp-0.1.30+minimap2.2.28/src/lib.rs:998:41

I'm looking into why this is not valid and what the alternative should be.

rob-p avatar Aug 26 '24 19:08 rob-p

I made the code for these casts in these branches match those in the other cfg branches and this solved the issue (it compiles at least). I’ll update my pending PR accordingly.

rob-p avatar Aug 26 '24 23:08 rob-p

Awesome. Sorry I've been hit with some bad migrane or something so am really slow right now.

jguhlin avatar Aug 27 '24 07:08 jguhlin

Build and test work for me with

cross test --target aarch64-unknown-linux-gnu

Can you check on your end if the current branch is building for you?

jguhlin avatar Nov 22 '24 01:11 jguhlin

This should be working now. Re-open if not

jguhlin avatar Nov 27 '24 21:11 jguhlin