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

aarch64 code improperly assumes it is running in a std environment #28

Open
jscatena88 opened this issue Mar 28, 2023 · 1 comment
Open

Comments

@jscatena88
Copy link

Compilation fails if you run:

cargo +nightly build --target aarch64-unknown-none --no-default-features --features=nightly

with

   Compiling crc32fast v1.3.2 (/Users/jscatena/Workspace/rust-crc32fast)
error[E0433]: failed to resolve: maybe a missing crate `std`?
 --> src/specialized/aarch64.rs:1:5
  |
1 | use std::arch::aarch64 as arch;
  |     ^^^ maybe a missing crate `std`?
  |
  = help: consider adding `extern crate std` to use the `std` crate

error[E0433]: failed to resolve: use of undeclared crate or module `std`
  --> src/specialized/aarch64.rs:10:12
   |
10 |         if std::arch::is_aarch64_feature_detected!("crc") {
   |            ^^^ use of undeclared crate or module `std`

warning: the feature `aarch64_target_feature` has been stable since 1.61.0 and no longer requires an attribute to enable
  --> src/lib.rs:40:22
   |
40 |     feature(stdsimd, aarch64_target_feature)
   |                      ^^^^^^^^^^^^^^^^^^^^^^
   |
   = note: `#[warn(stable_features)]` on by default

For more information about this error, try `rustc --explain E0433`.
warning: `crc32fast` (lib) generated 1 warning
error: could not compile `crc32fast` (lib) due to 2 previous errors; 1 warning emitted
@jscatena88 jscatena88 changed the title aarch64 code imporperly assumes it is running in a std environment aarch64 code improperly assumes it is running in a std environment Mar 28, 2023
@srijs
Copy link
Owner

srijs commented Apr 9, 2023

Hi there! Have now gotten around to looking into this, could you give the following branch a try to see if it fixes things for you? Thanks!

https://github.com/srijs/rust-crc32fast/tree/fix/no-std-aarch64

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

2 participants