-
Notifications
You must be signed in to change notification settings - Fork 90
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
Can't built main on M1 #84
Comments
please use
rustc 1.57.0-nightly (fdf65053e 2021-09-07)
…On Wed, Dec 1, 2021 at 6:13 AM buffalu ***@***.***> wrote:
Sup mango team.
I can't build on main right now, seems like something wrong with
switchboard dependency.
Compiling switchboard-utils v0.1.29
error[E0080]: evaluation of constant value failed
--> /Users/.../.cargo/registry/src/github.com-1ecc6299db9ec823/switchboard-utils-0.1.29/src/lib.rs:19:18
|
19 | #[derive(Default,AsBytes,FromBytes,Clone,Debug)]
| ^^^^^^^ attempt to divide `1_usize` by zero
|
= note: this error originates in the derive macro `AsBytes` (in Nightly builds, run with -Z macro-backtrace for more info)
For more information about this error, try `rustc --explain E0080`.
error: could not compile `switchboard-utils` due to previous error
warning: build failed, waiting for other jobs to finish...
error: build failed
mango-v3 % rustup --version
rustup 1.24.3 (ce5817a94 2021-05-31)
info: This is the version for the rustup toolchain manager, not the rustc compiler.
info: The currently active `rustc` version is `rustc 1.59.0-nightly (207c80f10 2021-11-30)`
% rustc --version
rustc 1.59.0-nightly (207c80f10 2021-11-30)
—
You are receiving this because you are subscribed to this thread.
Reply to this email directly, view it on GitHub
<#84>, or
unsubscribe
<https://github.com/notifications/unsubscribe-auth/AABDF7GYZCNJHGIADVSXS23UOWVGJANCNFSM5JDRDMSA>
.
Triage notifications on the go with GitHub Mobile for iOS
<https://apps.apple.com/app/apple-store/id1477376905?ct=notification-email&mt=8&pt=524675>
or Android
<https://play.google.com/store/apps/details?id=com.github.android&referrer=utm_campaign%3Dnotification-email%26utm_medium%3Demail%26utm_source%3Dgithub>.
|
I think the solana compiler comes with a rustc. And I use solana-cli 1.8 to compile and don't have any issues. |
same error, I also tried with rustc 1.57.0-nightly (2021-09-07) same error. What wrong with me? |
@thanhngvpt @buffalu are you guys using rosetta compatibility mode? m1 is my main driver, and havent had any issues so far |
havent had any issues building on m1 either |
The root cause of this is that mango (and switchboard) have |
In fact, it looks like SwitchboardDecimal is already packed in the latest... |
@ckamm did you have any luck upgrading switchboard? I see you pinned the versions to older ones fairly recently... |
Upgrading switchboard wasn't a priority so I haven't looked at it further. This PR has an upgrade though: #150 |
Gotcha. Yeah I haven’t gotten further enough to see whether switching all the account state structs to repr(packed) fixes everything else. I suspect one day everyone will be forced to switch to proper serdes using borsh rather than bytemuck casting. |
I ran into the same issue, and I was able to rectify the issue with You can confirm by running: Otherwise, do as follows:
Try it out:
You should be able to build without any platform specific issues now. |
Yes of course you can fix an issue with bad alignment on ARM by not compiling on ARM. 😀 |
Sup mango team.
I can't build on main right now, seems like something wrong with switchboard dependency. This only happens on M1. If I sync to a build server + build, its okay
The text was updated successfully, but these errors were encountered: