mwcproject / mwc-node

Mimblewimble applied in the base layer. Scarce, censorship resistant, durable, indestructible, salable, portable, fungible, private & divisible.‍ Good money.
https://mwc.mw/
Apache License 2.0
33 stars 26 forks source link

windows build fails #50

Closed vekamo closed 1 week ago

vekamo commented 1 year ago

Build errors most likely due of libp2p using tokio 1.9.0 vs mwc tokio version 0.2 Hard errors since rust >=1.69

error[E0793]: reference to packed field is unaligned
    --> /home/kyc/.cargo/registry/src/index.crates.io-6f17d22bba15001f/ntapi-0.3.6/src/ntexapi.rs:2785:52
     |
2785 |         *tick_count.QuadPart_mut() = read_volatile(&(*USER_SHARED_DATA).u.TickCountQuad);
     |                                                    ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
     |
     = note: packed structs are only aligned by one byte, and many modern architectures penalize unaligned field accesses
     = note: creating a misaligned reference is undefined behavior (even if that reference is never dereferenced)
     = help: copy the field contents to a local variable, or replace the reference with a raw pointer and use `read_unaligned`/`write_unaligned` (loads and stores via `*p` must be properly aligned even when using raw pointers)

error[E0793]: reference to packed field is unaligned
    --> /home/kyc/.cargo/registry/src/index.crates.io-6f17d22bba15001f/ntapi-0.3.6/src/ntexapi.rs:2809:25
     |
2809 |         ((read_volatile(&(*USER_SHARED_DATA).u.TickCountQuad)
     |                         ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
     |
     = note: packed structs are only aligned by one byte, and many modern architectures penalize unaligned field accesses
     = note: creating a misaligned reference is undefined behavior (even if that reference is never dereferenced)
     = help: copy the field contents to a local variable, or replace the reference with a raw pointer and use `read_unaligned`/`write_unaligned` (loads and stores via `*p` must be properly aligned even when using raw pointers)
bayk commented 1 week ago

Fixed with last rebase