Comments (13)
from mango-v3.
I think the solana compiler comes with a rustc. And I use solana-cli 1.8 to compile and don't have any issues.
from mango-v3.
same error, I also tried with rustc 1.57.0-nightly (2021-09-07) same error. What wrong with me?
from mango-v3.
@thanhngvpt @buffalu are you guys using rosetta compatibility mode? m1 is my main driver, and havent had any issues so far
from mango-v3.
havent had any issues building on m1 either
from mango-v3.
The root cause of this is that mango (and switchboard) have #[repr(C)]
for some account data structs (SwitchboardDecimal, *Node in matching.rs and *Event in queue.rs), but on ARM, the alignment of i128
is 16 bytes, vs 8 bytes for x86_64. These structs should all be #[repr(packed)]
in my opinion, as they are in the serum dex examples.
from mango-v3.
In fact, it looks like SwitchboardDecimal is already packed in the latest...
from mango-v3.
@ckamm did you have any luck upgrading switchboard? I see you pinned the versions to older ones fairly recently...
from mango-v3.
Upgrading switchboard wasn't a priority so I haven't looked at it further. This PR has an upgrade though: #150
from mango-v3.
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.
from mango-v3.
I ran into the same issue, and I was able to rectify the issue with rustup
by switching the active tool-chain.
You can confirm by running: rustup show
. If you see stable-x86_64-apple-darwin (default)
under active toolchain
, you're good to go.
Otherwise, do as follows:
rustup default stable-x86_64-apple-darwin
Try it out:
cargo build
You should be able to build without any platform specific issues now.
from mango-v3.
Yes of course you can fix an issue with bad alignment on ARM by not compiling on ARM. 😀
from mango-v3.
I've got the same issue with Ubuntu 20.04
from mango-v3.
Related Issues (16)
- add asset is missing something
- state of mango program, thoughts on refactoring/clean-up in 2022 HOT 12
- Add ChangeSpotMarket Instruction
- script, document, and setup a proper devnet setup
- v3.3.5 is missing a release (only has a tag)
- MangoGroup should say writeable in docs not read
- Invalid Price Cache HOT 9
- Unable to close accounts owned by a PDA HOT 2
- place_spot_order2 settles funds
- add_asset is wrong
- Add stop loss to spot trade HOT 1
- should we replace serum with openbook now? HOT 1
- token holder compensation HOT 1
- Using crate or version HOT 3
- anchor_mango_v3 HOT 4
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from mango-v3.