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

compile error: use of unstable library feature 'stdsimd' #195

Closed
Anton-4 opened this issue Dec 30, 2023 · 20 comments · Fixed by #196
Closed

compile error: use of unstable library feature 'stdsimd' #195

Anton-4 opened this issue Dec 30, 2023 · 20 comments · Fixed by #196

Comments

@Anton-4
Copy link

Anton-4 commented Dec 30, 2023

Since the latest ahash 0.8.7 release I'm hitting a use of unstable library feature 'stdsimd' on compilation.
We test on several architectures and operating systems and this only occurred on our macos m1 mac mini.

Full error:

 error[E0658]: use of unstable library feature 'stdsimd'
   --> /Users/m1ci/.cargo/registry/src/index.crates.io-6f17d22bba15001f/ahash-0.8.7/src/operations.rs:124:24
    |
124 |     let res = unsafe { vaesmcq_u8(vaeseq_u8(transmute!(value), transmute!(0u128))) };
    |                        ^^^^^^^^^^
    |
    = note: see issue #48556 <https://github.com/rust-lang/rust/issues/48556> for more information

error[E0658]: use of unstable library feature 'stdsimd'
   --> /Users/m1ci/.cargo/registry/src/index.crates.io-6f17d22bba15001f/ahash-0.8.7/src/operations.rs:124:35
    |
124 |     let res = unsafe { vaesmcq_u8(vaeseq_u8(transmute!(value), transmute!(0u128))) };
    |                                   ^^^^^^^^^
    |
    = note: see issue #48556 <https://github.com/rust-lang/rust/issues/48556> for more information

error[E0658]: use of unstable library feature 'stdsimd'
   --> /Users/m1ci/.cargo/registry/src/index.crates.io-6f17d22bba15001f/ahash-0.8.7/src/operations.rs:154:24
    |
154 |     let res = unsafe { vaesimcq_u8(vaesdq_u8(transmute!(value), transmute!(0u128))) };
    |                        ^^^^^^^^^^^
    |
    = note: see issue #48556 <https://github.com/rust-lang/rust/issues/48556> for more information

error[E0658]: use of unstable library feature 'stdsimd'
   --> /Users/m1ci/.cargo/registry/src/index.crates.io-6f17d22bba15001f/ahash-0.8.7/src/operations.rs:154:36
    |
154 |     let res = unsafe { vaesimcq_u8(vaesdq_u8(transmute!(value), transmute!(0u128))) };
    |                                    ^^^^^^^^^
    |
    = note: see issue #48556 <https://github.com/rust-lang/rust/issues/48556> for more information

For more information about this error, try `rustc --explain E0658`.
error: could not compile `ahash` (lib) due to 4 previous errors
@Anton-4 Anton-4 changed the title use of unstable library feature 'stdsimd' compile error: use of unstable library feature 'stdsimd' Dec 30, 2023
@tkaitchuck
Copy link
Owner

@Amanieu It looks like this is caused by #183
Should I revert it or is there a better way?

@Amanieu
Copy link
Contributor

Amanieu commented Jan 2, 2024

These functions are stable, are you using an older version of rustc?

@Anton-4
Copy link
Author

Anton-4 commented Jan 2, 2024

Oh right, I didn't think to check that. I'm on 1.71.1. Would it be possible to set the required minimum version with the rust-version field in the Cargo.toml? That should provide a nice error message in this case.

@Amanieu
Copy link
Contributor

Amanieu commented Jan 2, 2024

This was stabilized in 1.72.

@alamb
Copy link

alamb commented Jan 4, 2024

Proposed fix #196

mtreinish added a commit to mtreinish/qiskit-core that referenced this issue Jan 5, 2024
The recent ahash release 0.8.7 started using the library feature
'stdsimd' which was not stabilized until Rust 1.72 for aarch64 and
will cause an issue when building for aarch64 on (see
tkaitchuck/aHash#195 for more details) with our MSRV which was 1.64 and
was just raised to 1.70 in Qiskit#11493. This isn't caught in CI because we
don't have any aarch64 environments to test with. As 1.72 is fairly
recent < 6 months old as of this commit. This just opts to pin the ahash
version used to one that is compatible with our MSRV on all supported
platforms.
mtreinish added a commit to mtreinish/qiskit-core that referenced this issue Jan 5, 2024
The recent ahash release 0.8.7 started using the library feature
'stdsimd' which was not stabilized until Rust 1.72 for aarch64 and
will cause an issue when building for aarch64 on (see
tkaitchuck/aHash#195 for more details) with our MSRV which was 1.64 and
was just raised to 1.70 in Qiskit#11493. This isn't caught in CI because we
don't have any aarch64 environments to test with. As 1.72 is fairly
recent < 6 months old as of this commit. This just opts to pin the ahash
version used to one that is compatible with our MSRV on all supported
platforms.
github-merge-queue bot pushed a commit to Qiskit/qiskit that referenced this issue Jan 5, 2024
The recent ahash release 0.8.7 started using the library feature
'stdsimd' which was not stabilized until Rust 1.72 for aarch64 and
will cause an issue when building for aarch64 on (see
tkaitchuck/aHash#195 for more details) with our MSRV which was 1.64 and
was just raised to 1.70 in #11493. This isn't caught in CI because we
don't have any aarch64 environments to test with. As 1.72 is fairly
recent < 6 months old as of this commit. This just opts to pin the ahash
version used to one that is compatible with our MSRV on all supported
platforms.
@tkaitchuck
Copy link
Owner

I am attempting to expand the presubmit checks to cover this #197
but so far it is still passing. What combination am I missing?

@alamb
Copy link

alamb commented Jan 8, 2024

What combination am I missing?

I left a suggestion: #197 (comment)

@tkaitchuck
Copy link
Owner

@Anton-4 Can you clearify, you saw this when targeting aarch64-apple-darwin ? What args / rust flags were passed?

@Jefffrey
Copy link
Contributor

Jefffrey commented Jan 9, 2024

For datafusion, the issue came from apache/datafusion#8743

Tagging @Ted-Jiang who reproduced the issue

An example of the dependency datafusion has:

https://github.com/apache/arrow-datafusion/blob/e7cc04db68a05ce9d002de7d0c1be2644bf69c0c/datafusion/common/Cargo.toml#L41-L43

  • Located in a few other crates within datafusion too, but is essentially the same (version & features)

@Anton-4
Copy link
Author

Anton-4 commented Jan 9, 2024

Can you clearify, you saw this when targeting aarch64-apple-darwin ?

Yes indeed, I'll set up a minimal github repo with a full reproduction.

@Anton-4
Copy link
Author

Anton-4 commented Jan 9, 2024

Files for minimal repro:

// rust-toolchain.toml 
[toolchain]
channel = "1.71.1"

// Cargo.toml 
[package]
name = "temp2"
version = "0.1.0"
edition = "2021"

[dependencies]
ahash="=0.8.7"

// src/main.rs 
fn main() {
    println!("Hello, world!");
}

run with cargo build --target=aarch64-apple-darwin.
That produces the error for me on NixOS (x86_64 device) and also on macos 14 (m2 device).

ShellyGarion pushed a commit to ShellyGarion/qiskit-terra that referenced this issue Jan 18, 2024
The recent ahash release 0.8.7 started using the library feature
'stdsimd' which was not stabilized until Rust 1.72 for aarch64 and
will cause an issue when building for aarch64 on (see
tkaitchuck/aHash#195 for more details) with our MSRV which was 1.64 and
was just raised to 1.70 in Qiskit#11493. This isn't caught in CI because we
don't have any aarch64 environments to test with. As 1.72 is fairly
recent < 6 months old as of this commit. This just opts to pin the ahash
version used to one that is compatible with our MSRV on all supported
platforms.
@djc
Copy link

djc commented Jan 22, 2024

FWIW, I'm running into this too (when trying to upgrade ahash in hickory-dns on my M1 with Rust 1.67).

jcrossley3 added a commit to jcrossley3/trustification that referenced this issue Jan 31, 2024
Also fixed the warnings exposed by the newer rustc

This was motivated by an error only seen for apple targets:
tkaitchuck/aHash#195

Signed-off-by: Jim Crossley <[email protected]>
ctron pushed a commit to trustification/trustification that referenced this issue Feb 1, 2024
Also fixed the warnings exposed by the newer rustc

This was motivated by an error only seen for apple targets:
tkaitchuck/aHash#195

Signed-off-by: Jim Crossley <[email protected]>
sunshowers added a commit to guppy-rs/guppy that referenced this issue Feb 2, 2024
@bk2204
Copy link

bk2204 commented Feb 6, 2024

I'd greatly appreciate it if we could solve this problem without bumping the MSRV. I try to provide support for older versions of Rust, and Debian stable offers 1.63, which I'd like to continue to target.

@matthiasg
Copy link

This still happens on M1 with rust 1.78.0 nightly. Is there something I am missing ?

dryajov added a commit to codex-storage/circom-compat-ffi that referenced this issue Feb 6, 2024
@alexeykhan
Copy link

Same for me here (M1):

  • rust 1.77.0-nightly - works fine
  • rust 1.78.0-nightly - error[E0635]: unknown feature stdsimd
    --> /Users/alexeykhan/.cargo/registry/src/index.crates.io-6f17d22bba15001f/ahash-0.7.7/src/lib.rs:33:42
    |
    33 | #![cfg_attr(feature = "stdsimd", feature(stdsimd))]
    | ^^^^^^^

For more information about this error, try rustc --explain E0635.
error: could not compile ahash (lib) due to 1 previous error
warning: build failed, waiting for other jobs to finish...

@iesahin
Copy link

iesahin commented Feb 8, 2024

@Amanieu
Copy link
Contributor

Amanieu commented Feb 11, 2024

To anyone hitting this error on nightly: you need to update your nightly compiler.

@undenuicap
Copy link

1.78.0-nightly is latest and not working with it :-(

@Amanieu
Copy link
Contributor

Amanieu commented Feb 12, 2024

Are you using the latest version of ahash? Try cargo update.

@ozgrakkurt
Copy link

still doesn't compile on m1 with stable toolchain with this error

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

Successfully merging a pull request may close this issue.