-
Notifications
You must be signed in to change notification settings - Fork 33
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
Cannot transmute between types of different sizes. #43
Comments
Hi, |
@Lcchy solana-cli 1.9.13 (src:3ac7e043; feat:1070292356), no just doing a cargo build |
Bump :) |
All right, can you tell me which OS you are using? I don't see where this could be coming from right now, but I suspect some versioning/dependency issue. I am trying to reproduce it. |
I confirm I cannot reproduce either. Could you upload a minimal example on Github so we can help? |
sorry for delay in responding, a macbook pro , Monterey OS, Apple M1 Pro chip |
We tested it on an M1 cpu and we're indeed getting the same error. We will look into it but we don't expect to find something quickly as the error is linked to how Rust interacts with the hardware, sorry. For the record, adding |
bump on this issue. only seems to be an issue when targeting the is there a fix being implemented for this? |
HI @callensm, so we don't have an M1 Mac to properly test this, but my best recommendation would be to run try and compile + run through Rosetta. This repository might be of some help https://github.com/FdezRomero/rosetta-cli. |
requiring rosetta doesn't seem like a reasonable solution. there are fixes to these alignment issues and the remainder of the rust and solana ecosystems natively support the |
We chose to use bytemuck in our programs, which makes extensive use of direct type casting. This means that the way we write define our structs and data structures is highly specific to the BPF and x86_64 architectures. Maybe there is a solution I'm not seeing here, and I'd be open to suggestions, but to me it seems like it's out of our hands, at least as long as we want to keep using the most efficient data structures for our particular problems. |
I looked a bit more into it and found this issue : solana-labs/solana#21269. It seems that the issue stems from different |
Just checked and this does resolve the Thank you! |
I think this issue can be closed, since the merge of #64 |
seems like aarch64 branch changes were lost, just tried to recompile on an m1 and it's not compiling again. |
Hi @uwecerron! Looking at the code right now I'm not sure I understand where this might be coming from. Would you mind posting the error you're getting? To be clear we just redefined the structs to not necessitate |
We have a working solution for this in the pipeline at #82. Once we're done with review we should be able to mainline this. The only issue I am seeing is that developers down the line will have to specifically support the aarch64 architecture since the struct definitions change. |
Running into this issue with rustc 1.59.0
= note: source type:
InnerNode
(384 bits)= note: target type:
critbit::_::{closure#0}::TypeWithoutPadding
(256 bits)The text was updated successfully, but these errors were encountered: