pathfinder
pathfinder copied to clipboard
Compile error on nightly: invalid monomorphization, simd_shuffle index must be a SIMD vector
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)
This is caused by https://github.com/rust-lang/rust/issues/128738 / https://github.com/rust-lang/rust/pull/130268
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.
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.
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" }
Would it be possible to get a minor release (0.5.5) which includes these fixes?
This is still a problem despite the issue being closed as there's still no version release.
This is still a problem despite the issue being closed as there's still no version release.
I have looked into this and https://github.com/servo/pathfinder/pull/577 seems to integrate these changes.