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 on nightly: invalid monomorphization, simd_shuffle index must be a SIMD vector #571

Closed
mischnic opened this issue Sep 18, 2024 · 4 comments · Fixed by #575
Closed

Comments

@mischnic
Copy link
Contributor

I get this compile error on nightly-2024-09-17:

error[E0511]: invalid monomorphization of `simd_shuffle` intrinsic: simd_shuffle index must be a SIMD vector of `u32`, got `[u32; 4]`
   --> /Users/niklas/.cargo/registry/src/index.crates.io-6f17d22bba15001f/pathfinder_simd-0.5.4/src/arm/mod.rs:163:24
    |
163 |         unsafe { F32x4(simd_shuffle4!(self.0, other.0, [0, 1, 2, 3])) }
    |                        ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
    |
    = note: this error originates in the macro `simd_shuffle4` (in Nightly builds, run with -Z macro-backtrace for more info)
@mischnic
Copy link
Contributor Author

This is caused by rust-lang/rust#128738 / rust-lang/rust#130268

@theoparis
Copy link

I have the same issue with both stable rust (1.81) and nightly 1.83 😕 I am unable to compile the Zed editor due to this issue.

@airstrike
Copy link

In the meantime, I worked around this by creating a rust-toolchain.toml file in my project's root directory and pinning to a specific nightly that worked:

[toolchain]
channel = "nightly-2024-08-04"

YMMV but wanted to share the easy fix for others just in case.

@PaulWagener
Copy link

Some commits were added since 0.5.4 that fixed this issue for me. This can be done by directly referencing this repository in the Cargo.toml:

[patch.crates-io]
pathfinder_simd = { git = "https://github.com/theoparis/pathfinder.git" }

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.

4 participants