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

simd-accel no longer works (encoding_rs's SIMD support is broken on the latest nightly) #1175

Closed
lilydjwg opened this issue Jan 24, 2019 · 4 comments

Comments

@lilydjwg
Copy link
Contributor

lilydjwg commented Jan 24, 2019

What version of ripgrep are you using?

N/A.

How did you install ripgrep?

Failed.

What operating system are you using ripgrep on?

I'm trying to build on Arch Linux with Intel(R) Xeon(R) CPU E5-2620 v3 and I'm going to run it on Arch Linux with Intel(R) Core(TM) i7-7700HQ.

If this is a bug, what are the steps to reproduce the behavior?

I'm building with:

RUSTFLAGS="-C target-cpu=skylake" cargo build --release --features 'simd-accel pcre2'

If this is a bug, what is the actual behavior?

I got a lot of errors like this:

error: unrecognized platform-specific intrinsic function: `x86_mm_movemask_ps`      
  --> /build/.cargo/registry/src/github.com-1ecc6299db9ec823/simd-0.2.3/src/x86/sse2.rs:10:5
(more omitted)

If this is a bug, what is the expected behavior?

There shouldn't be such errors.


It seems that cargo is trying to build the build script with options intended for the target system.

rustc and cargo are nightly verions.

@BurntSushi BurntSushi changed the title failed to build if the build system doesn't support target features encoding_rs's SIMD support is broken on the latest nightly Jan 24, 2019
@BurntSushi
Copy link
Owner

This has nothing to do with whether the build system supports the prescribed target features. The issue is that encoding_rs's SIMD support is now broken on the latest release of nightly Rust. The only way it becomes unbroken is if nightly Rust reverts the change removing unstable legacy support for for platform specific intrinsics, or if encoding_rs migrates to the new SIMD infrastructure. The latest is, AFAIK, tracked by hsivonen/encoding_rs#23.

I've updated the README in 9a9f54d to note that ripgrep's simd-accel feature is broken.

@lilydjwg
Copy link
Contributor Author

I see, thank you.

@BurntSushi BurntSushi changed the title encoding_rs's SIMD support is broken on the latest nightly simd-accel no longer works (encoding_rs's SIMD support is broken on the latest nightly) Jan 24, 2019
@hsivonen
Copy link
Contributor

hsivonen commented Feb 7, 2019

It works now if the lock file is updated with cargo update first. The README for encoding_rs has the details of the pitfalls of trying to build for 32-bit ARM targets whose first component does not have the substring neon.

BurntSushi added a commit that referenced this issue Feb 7, 2019
This brings in an updated `encoding_rs` crate that uses `packed_simd`,
which compiles on the latest nightly. Compilation times do appear to be
impacted significantly though.

Fixes #1175 (again)
@BurntSushi
Copy link
Owner

@hsivonen Awesome! Thanks so much. Cargo.lock and README have been updated!

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

3 participants