pathfinder icon indicating copy to clipboard operation
pathfinder copied to clipboard

Compile error on nightly: invalid monomorphization, simd_shuffle index must be a SIMD vector

Open mischnic opened this issue 1 year ago • 2 comments

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 avatar Sep 18 '24 14:09 mischnic

This is caused by https://github.com/rust-lang/rust/issues/128738 / https://github.com/rust-lang/rust/pull/130268

mischnic avatar Sep 18 '24 15:09 mischnic

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.

theoparis avatar Sep 21 '24 19:09 theoparis

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.

airstrike avatar Jan 18 '25 18:01 airstrike

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" }

PaulWagener avatar Feb 13 '25 13:02 PaulWagener

Would it be possible to get a minor release (0.5.5) which includes these fixes?

jonaspleyer avatar Apr 08 '25 11:04 jonaspleyer

This is still a problem despite the issue being closed as there's still no version release.

orlp avatar May 17 '25 22:05 orlp

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.

jonaspleyer avatar May 19 '25 12:05 jonaspleyer