-
Notifications
You must be signed in to change notification settings - Fork 6.4k
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
RocksDB fails to build on M1 Apple Silicon due to incorrect ifdefs #7710
Comments
Hmm, it looks like here Line 497 in 29f7bbe
|
This patch seems to resolve the issue, I'm not sure why ARM64 support is linux-conditional: hdevalence@ed1882e More context in this comment: rust-rocksdb/rust-rocksdb#482 (comment) |
@hdevalence Hi Henry I have been seeing the same issue on the Apple DTK (A12Z). I started looking into it but didn't spend much time on it yet.
I suspect that was simply because the ARM64 platforms that were available for testing/dev were Linux.
I will apply the patch and run some tests on ARM Mac and ARM Linux and report back... |
@hdevalence For the DTK I needed a few more changes than you suggested. Would you be willing to try the attached patch please? |
Summary: Closes - #7710 I tested this on an Apple DTK (Developer Transition Kit) with an Apple A12Z Bionic CPU and macOS Big Sur (11.0.1). Previously the arm64 specific CRC optimisations were limited to Linux only OS... Well now Apple Silicon is also arm64 but runs macOS ;-) Pull Request resolved: #7714 Reviewed By: ltamasi Differential Revision: D25287349 Pulled By: pdillinger fbshipit-source-id: 639b168bf0ac2652907531e9604936ac4974b577
Closed by #7714 |
Summary: Closes - facebook#7710 I tested this on an Apple DTK (Developer Transition Kit) with an Apple A12Z Bionic CPU and macOS Big Sur (11.0.1). Previously the arm64 specific CRC optimisations were limited to Linux only OS... Well now Apple Silicon is also arm64 but runs macOS ;-) Pull Request resolved: facebook#7714 Reviewed By: ltamasi Differential Revision: D25287349 Pulled By: pdillinger fbshipit-source-id: 639b168bf0ac2652907531e9604936ac4974b577
Summary: Closes - facebook#7710 I tested this on an Apple DTK (Developer Transition Kit) with an Apple A12Z Bionic CPU and macOS Big Sur (11.0.1). Previously the arm64 specific CRC optimisations were limited to Linux only OS... Well now Apple Silicon is also arm64 but runs macOS ;-) Pull Request resolved: facebook#7714 Reviewed By: ltamasi Differential Revision: D25287349 Pulled By: pdillinger fbshipit-source-id: 639b168bf0ac2652907531e9604936ac4974b577
Summary: Closes - facebook#7710 I tested this on an Apple DTK (Developer Transition Kit) with an Apple A12Z Bionic CPU and macOS Big Sur (11.0.1). Previously the arm64 specific CRC optimisations were limited to Linux only OS... Well now Apple Silicon is also arm64 but runs macOS ;-) Pull Request resolved: facebook#7714 Reviewed By: ltamasi Differential Revision: D25287349 Pulled By: pdillinger fbshipit-source-id: 639b168bf0ac2652907531e9604936ac4974b577
Expected behavior
RocksDB builds on M1 Apple Silicon (in this case via rust-rocksdb bindings)
Actual behavior
RocksDB does not build, erroring as follows:
A few lines up is this ifdef (pointed out by @teor2345:
rocksdb/util/crc32c.cc
Line 407 in 29f7bbe
It looks like these functions are meant to always be defined, and return false when the intrinsics don't exist, but instead they are missing. Or, perhaps there is some other variable that should be defined on this platform that isn't being set?
Steps to reproduce the behavior
Presumably this is more widely applicable, but here are the specific steps I took:
clang-sys
environment variables to point to LLVM https://github.com/KyleMayes/clang-sys#environment-variablesrocksdb
crate as a dependencyThe text was updated successfully, but these errors were encountered: