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

Build error on nightly-2024-02-05 #224

Closed
swfsql opened this issue Feb 7, 2024 · 1 comment
Closed

Build error on nightly-2024-02-05 #224

swfsql opened this issue Feb 7, 2024 · 1 comment

Comments

@swfsql
Copy link

swfsql commented Feb 7, 2024

Hello, I'm having a compile error on latest nightly when using the nightly_stdsimd for bytemuck on rustc 1.78.0-nightly (f067fd608 2024-02-05).

To test, having a blank project with:

[dependencies]
bytemuck = { version = "=1.14.1", default-features = false, features = [
    "nightly_stdsimd",
] }

Results in a compilation error:

cargo check result

    Checking bytemuck v1.14.1
error[E0658]: use of unstable library feature 'stdarch_x86_avx512'
   --> /usr/local/cargo/registry/src/index.crates.io-6f17d22bba15001f/bytemuck-1.14.1/src/lib.rs:122:28
    |
122 |       unsafe impl $trait for $platform::$first_type {}
    |                              ^
    |
   ::: /usr/local/cargo/registry/src/index.crates.io-6f17d22bba15001f/bytemuck-1.14.1/src/zeroable.rs:239:1
    |
239 | / impl_unsafe_marker_for_simd!(
240 | |   #[cfg(all(target_arch = "x86_64", feature = "nightly_stdsimd"))]
241 | |   unsafe impl Zeroable for x86_64::{
242 | |     __m128bh, __m256bh, __m512,
243 | |     __m512bh, __m512d, __m512i,
244 | |   }
245 | | );
    | |_- in this macro invocation
    |
    = note: see issue #111137 <https://github.com/rust-lang/rust/issues/111137> for more information
    = help: add `#![feature(stdarch_x86_avx512)]` to the crate attributes to enable
    = note: this compiler was built on 2024-02-05; consider upgrading it if it is out of date
    = note: this error originates in the macro `impl_unsafe_marker_for_simd` (in Nightly builds, run with -Z macro-backtrace for more info)

error[E0658]: use of unstable library feature 'stdarch_x86_avx512'
   --> /usr/local/cargo/registry/src/index.crates.io-6f17d22bba15001f/bytemuck-1.14.1/src/lib.rs:122:28
    |
122 |       unsafe impl $trait for $platform::$first_type {}
    |                              ^
    |
   ::: /usr/local/cargo/registry/src/index.crates.io-6f17d22bba15001f/bytemuck-1.14.1/src/pod.rs:159:1
    |
159 | / impl_unsafe_marker_for_simd!(
160 | |   #[cfg(all(target_arch = "x86_64", feature = "nightly_stdsimd"))]
161 | |   unsafe impl Pod for x86_64::{
162 | |     __m128bh, __m256bh, __m512,
163 | |     __m512bh, __m512d, __m512i,
164 | |   }
165 | | );
    | |_- in this macro invocation
    |
    = note: see issue #111137 <https://github.com/rust-lang/rust/issues/111137> for more information
    = help: add `#![feature(stdarch_x86_avx512)]` to the crate attributes to enable
    = note: this compiler was built on 2024-02-05; consider upgrading it if it is out of date
    = note: this error originates in the macro `impl_unsafe_marker_for_simd` (in Nightly builds, run with -Z macro-backtrace for more info)

error[E0635]: unknown feature `stdsimd`
 --> /usr/local/cargo/registry/src/index.crates.io-6f17d22bba15001f/bytemuck-1.14.1/src/lib.rs:7:50
  |
7 | #![cfg_attr(feature = "nightly_stdsimd", feature(stdsimd))]
  |                                                  ^^^^^^^

Some errors have detailed explanations: E0635, E0658.
For more information about an error, try `rustc --explain E0635`.
error: could not compile `bytemuck` (lib) due to 7 previous errors

As the messages suggest, putting stdarch_x86_avx512 in place of stdsimd in:

#![cfg_attr(feature = "nightly_stdsimd", feature(stdsimd))]

Seems to fix it.


Note:

  • As I'm not familiar with the library nor with the tracking issue, I'm refraining from trying to send a PR.
  • I'm aware that something like this was somewhat expected, as stated in:

    bytemuck/Cargo.toml

    Lines 40 to 42 in 5f93477

    # NOT SEMVER SUPPORTED! TEMPORARY ONLY!
    nightly_portable_simd = []
    nightly_stdsimd = []

Thanks!

@swfsql swfsql changed the title Build error (nightly) Build error on nightly-2024-02-05 Feb 7, 2024
@Lokathor
Copy link
Owner

Lokathor commented Feb 7, 2024

Released bytemuck-1.14.2, which uses the new Nightly feature name.

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