srijs / rust-crc32fast

Fast, SIMD-accelerated CRC32 (IEEE) checksum computation in Rust
https://crates.io/crates/crc32fast
Apache License 2.0
269 stars 30 forks source link

Doesn't build in VirtualBox #19

Closed umanwizard closed 3 years ago

umanwizard commented 3 years ago

The build fails with this error when building on FreeBSD 12.2-STABLE in VirtualBox:

"LLVM ERROR: Cannot select: intrinsic %llvm.x86.pclmulqdq"

Of note: The host has the pclmulqdq cpu flag, but the guest doesn't (I suspect VirtualBox simply doesn't pass all the flags, but I'm not sure).

srijs commented 3 years ago

Hi, thanks for the report! Do you think you could share a little more detail about how you're building it (rustc version, llvm version, cargo features, build command, etc)?

Generally speaking, without any further information I suspect this may be an upstream bug in LLVM or rustc; in my understanding, even if the build host doesn't support the pclmulqdq cpu feature, LLVM should still be able to use it for instruction selection.

umanwizard commented 3 years ago

Ok, I am trying to get better repro instructions -- should have them tonight when I am back at my PC.

umanwizard commented 3 years ago

I am no longer able to reproduce this. Will open a new task if I am able to get better repro instructions.