alexkirsz / dispatch

Combine internet connections, increase your download speed
Apache License 2.0
411 stars 33 forks source link

ntapi dependency problem #17

Closed berzezo closed 1 year ago

berzezo commented 1 year ago
Hello, Installing on windows (x86_64) throws this error ` error[E0793]: reference to packed field is unaligned --> C:\Users\zoltan.berzsenyi.cargo\registry\src\github.com-1ecc6299db9ec823\ntapi-0.3.7\src\ntexapi.rs:2783:52 2783 tick_count.QuadPart_mut() = read_volatile(&(USER_SHARED_DATA).u.TickCountQuad); ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
 = note: fields of packed structs are not properly aligned, and 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 --> C:\Users\zoltan.berzsenyi.cargo\registry\src\github.com-1ecc6299db9ec823\ntapi-0.3.7\src\ntexapi.rs:2807:25 2807 ((read_volatile(&(*USER_SHARED_DATA).u.TickCountQuad) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
 = note: fields of packed structs are not properly aligned, and 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)

Compiling pnet_datalink v0.28.0 For more information about this error, try rustc --explain E0793. error: could not compile ntapi due to 2 previous errors warning: build failed, waiting for other jobs to finish... error: failed to compile dispatch-proxy v0.1.0, intermediate artifacts can be found at C:\Users\ZOLTAN~1.BER\AppData\Local\Temp\cargo-install3vuh4q `

AnakinFoxe commented 1 year ago

Yeah I'm hitting the same error as well. It seems the dependency introduced breaking changes.

alexkirsz commented 1 year ago

Thanks for reporting this issue!

I've updated the ntapi dependency so it builds on latest Rust.

Furthermore, we're now building binaries from Windows, which you can find and install from the Releases page.