Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Invalid cast (on arm64?) #82

Open
rob-p opened this issue Aug 26, 2024 · 2 comments
Open

Invalid cast (on arm64?) #82

rob-p opened this issue Aug 26, 2024 · 2 comments

Comments

@rob-p
Copy link

rob-p commented Aug 26, 2024

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
Copy link
Author

rob-p commented Aug 26, 2024

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.

@jguhlin
Copy link
Owner

jguhlin commented Aug 27, 2024

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants
@rob-p @jguhlin and others