Skip to content
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

failed to compile spl-token-cli v2.4.0 #20

Open
gKrithick opened this issue Aug 27, 2023 · 0 comments
Open

failed to compile spl-token-cli v2.4.0 #20

gKrithick opened this issue Aug 27, 2023 · 0 comments

Comments

@gKrithick
Copy link

I came across this issue while attempting to install spl-token-cli, and I've invested a considerable amount of time into debugging. Regrettably, I've been unable to resolve the errors on my own. I kindly request assistance from anyone who might be able to offer guidance on this matter at your earliest convenience.

"""error[E0793]: reference to packed field is unaligned
--> C:\Users\hp.cargo\registry\src\index.crates.io-6f17d22bba15001f\ntapi-0.3.7\src\ntexapi.rs:2783:52
|
2783 | *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
--> C:\Users\hp.cargo\registry\src\index.crates.io-6f17d22bba15001f\ntapi-0.3.7\src\ntexapi.rs:2807:25
|
2807 | ((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)

Compiling winreg v0.10.1
Compiling flate2 v1.0.27
For more information about this error, try rustc --explain E0793.
error: could not compile ntapi (lib) due to 2 previous errors
warning: build failed, waiting for other jobs to finish...
error: failed to compile spl-token-cli v2.4.0, intermediate artifacts can be found at C:\Users\hp\AppData\Local\Temp\cargo-installKECsYf.
To reuse those artifacts with a future compilation, set the environment variable CARGO_TARGET_DIR to that path."""

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant