-
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
Java: Support Apple Silicon/M1 machines #7720
Comments
I posted my feedback in #7714. |
@adamretter Thanks for all the work on the Apple Silicon compilation issues! Do you have any update on the RocksJava Apple Silicon support? Or do you need help? |
@jurmous I can likely send a PR tomorrow if that works for you? |
@jurmous okay so there is no problem with building RocksDB and RocksJava from source and running it on Apple Silicon now. I will shortly send a PR to differentiate between Mac binaries for x64 and aarch64. We can then package both into the next release of RocksJava that is published on Maven central. As well as separate libraries for each architecture (x64 and aarch64) it seems we could combine them into a single "Universal Binary" (see: https://developer.apple.com/documentation/xcode/building_a_universal_macos_binary), I will give some thought as to the best approach. |
@adamretter Thanks for checking it out! Cool that there is no problem building the libraries! Yes both directions would be valid. Universal makes some things easier I guess and the Mac binary is not that large compared to linux64. |
@adamretter Were you already able to give some thought on the best approach? And were you able to create a PR? Thanks! 😊 |
@jurmous Sorry for the delay, I do have some preliminary work here for building Universal Binaries. I had to pause whilst other priorities took over, but I hope to get back to it ASAP. |
Ok, I understand. Good luck with the other priorities! Let me know if I can help when you are able to get back to it! |
Hi, guys. Any progress? |
@jurmous @Yrp you can find the start of my work on Universal Binaries for RocksDB here - Running Building the universal binaries can be done in macOS on either Intel |
@adamretter Thanks for all the work already! ❤️ I have checked out your branch and tried to run
This work is for the generic static library if I am correct? If this works correctly further work has to be done to build a universal |
Hey folks - thanks for the work here. I just ran into this issue when trying to run a Kafka Streams app on my M1 machine. The Kafka Stream library is using RocksDB v5.18.4 under the hood. @jurmous you mentioned you were able to run RocksDB when running in Rosetta mode? Could you please let me know how you did that? I'm just (very) simply trying to run my app from IntelliJ, so curious as to how to modify it to run in Rosetta mode. |
Actually nvm - I just realised I wasn't running x86 Java. |
@tobiade Ah great that you got it working with Rosetta! |
@jurmous I found the page shows 403 forbidden on jcenter. |
That page is indeed forbidden but the files should be accessible without being logged in: |
@jurmous Sorry for the delay, I had to return the Apple DTK to Apple as they only allow you to have it for a short-time. I have a M1 on order, and so will try and pick it up again once that arrives. |
@adamretter Thanks for the update! As you can read I have for now a temp solution so I can natively do things on my laptop. Thanks for when you can look into it! All your work is greatly appreciated! |
@jurmous I now have an Apple M1, so I will put this back on the TODO list :-) |
@adamretter thanks, please let us know if a nightly build is available :) |
Any progress on this? It seems not much left on your side to release M1 compatible version...so looking forward to it :) |
Hey @adamretter, I have looked into the compilation issue If I comment out the following code in the Makefile the universal static library compiles normally and the lipo command returns both x86_64 and arm64 on the library
So that piece of code needs an extra if check in case of compiling for macOS and X86_64 on an ARM machine. I guess it only needs an adjustment to wrap this new universal static library inside a jnilib to be bundled for release. Do you guess you have time for this issue soon? 😄 |
@anand1976 I see you created the (Github) release. Do you know why there is no Maven release ? |
@adamretter Do you plan to release the Java binary for 6.29.3 soon? |
@LuciferYang @anand1976 Current status is commented on here - #9254 (comment) |
Thank you for your reply @adamretter |
RocksDB 6.29.4.1 has been released to Maven Central which should now work on M1 macs. |
Additionally now so has version 7.0.3 |
RocksDB 6.27.3 does not run on arm64 M1 Macs which would prevent people on this platform to run Kafka Streams. Thus, this PR upgrades RocksDB to 6.29.4.1 which contains the following fix to allow to run RocksDB on arm64 M1 Macs: facebook/rocksdb#7720 The source compatibility report between 6.27.3 and 6.29.4.1 (attached to the ticket) reports a couple of incompatibilities. However, the incompatibilities do not seem to affect Kafka Streams' backwards compatibility. The changes to class RocksDB only apply when inheriting from RocksDB. RocksDB is not exposed to users in Streams. The changes to class WriteBatch and class WriteBatchInterface also only apply with inheritance. Both classes are not exposed to users in Streams. -The change to enum SanityLevel seem also not to apply to Streams since SanityLevel is only used in ConfigOptions which is only used to load options from files and properties objects. Loading options from files or properties is not exposed to users in Streams. Reviewers: Bill Bejeck <[email protected]>, Matthias J. Sax <[email protected]>, A. Sophie Blee-Goldman <[email protected]>
RocksDB 6.27.3 does not run on arm64 M1 Macs which would prevent people on this platform to run Kafka Streams. Thus, this PR upgrades RocksDB to 6.29.4.1 which contains the following fix to allow to run RocksDB on arm64 M1 Macs: facebook/rocksdb#7720 The source compatibility report between 6.27.3 and 6.29.4.1 (attached to the ticket) reports a couple of incompatibilities. However, the incompatibilities do not seem to affect Kafka Streams' backwards compatibility. The changes to class RocksDB only apply when inheriting from RocksDB. RocksDB is not exposed to users in Streams. The changes to class WriteBatch and class WriteBatchInterface also only apply with inheritance. Both classes are not exposed to users in Streams. -The change to enum SanityLevel seem also not to apply to Streams since SanityLevel is only used in ConfigOptions which is only used to load options from files and properties objects. Loading options from files or properties is not exposed to users in Streams. Reviewers: Bill Bejeck <[email protected]>, Matthias J. Sax <[email protected]>, A. Sophie Blee-Goldman <[email protected]>
RocksDB 6.27.3 does not run on arm64 M1 Macs which would prevent people on this platform to run Kafka Streams. Thus, this PR upgrades RocksDB to 6.29.4.1 which contains the following fix to allow to run RocksDB on arm64 M1 Macs: facebook/rocksdb#7720 The source compatibility report between 6.27.3 and 6.29.4.1 (attached to the ticket) reports a couple of incompatibilities. However, the incompatibilities do not seem to affect Kafka Streams' backwards compatibility. The changes to class RocksDB only apply when inheriting from RocksDB. RocksDB is not exposed to users in Streams. The changes to class WriteBatch and class WriteBatchInterface also only apply with inheritance. Both classes are not exposed to users in Streams. -The change to enum SanityLevel seem also not to apply to Streams since SanityLevel is only used in ConfigOptions which is only used to load options from files and properties objects. Loading options from files or properties is not exposed to users in Streams. Reviewers: Bill Bejeck <[email protected]>, Matthias J. Sax <[email protected]>, A. Sophie Blee-Goldman <[email protected]>
…apache#11967) #351 RocksDB 6.27.3 does not run on arm64 M1 Macs which would prevent people on this platform to run Kafka Streams. Thus, this PR upgrades RocksDB to 6.29.4.1 which contains the following fix to allow to run RocksDB on arm64 M1 Macs: facebook/rocksdb#7720 The source compatibility report between 6.27.3 and 6.29.4.1 (attached to the ticket) reports a couple of incompatibilities. However, the incompatibilities do not seem to affect Kafka Streams' backwards compatibility. The changes to class RocksDB only apply when inheriting from RocksDB. RocksDB is not exposed to users in Streams. The changes to class WriteBatch and class WriteBatchInterface also only apply with inheritance. Both classes are not exposed to users in Streams. -The change to enum SanityLevel seem also not to apply to Streams since SanityLevel is only used in ConfigOptions which is only used to load options from files and properties objects. Loading options from files or properties is not exposed to users in Streams. Reviewers: Bill Bejeck <[email protected]>, Matthias J. Sax <[email protected]>, A. Sophie Blee-Goldman <[email protected]>
Summary: Fixes facebook#7720 Updated Makefile with flags to define target architecture when compiling/linking, and added goal `rocksdbjavastaticosxub` to build a OS X Universal Binary native library. Pull Request resolved: facebook#9254 Reviewed By: mrambacher Differential Revision: D33551160 Pulled By: pdillinger fbshipit-source-id: 9ce9962e03aacf55014545a6cdf638b5b14b8fa9
Summary: Fixes facebook/rocksdb#7720 Updated Makefile with flags to define target architecture when compiling/linking, and added goal `rocksdbjavastaticosxub` to build a OS X Universal Binary native library. Pull Request resolved: facebook/rocksdb#9254 Reviewed By: mrambacher Differential Revision: D33551160 Pulled By: pdillinger fbshipit-source-id: 9ce9962e03aacf55014545a6cdf638b5b14b8fa9
Summary: Fixes facebook/rocksdb#7720 Updated Makefile with flags to define target architecture when compiling/linking, and added goal `rocksdbjavastaticosxub` to build a OS X Universal Binary native library. Pull Request resolved: facebook/rocksdb#9254 Reviewed By: mrambacher Differential Revision: D33551160 Pulled By: pdillinger fbshipit-source-id: 9ce9962e03aacf55014545a6cdf638b5b14b8fa9
Summary: Fixes facebook/rocksdb#7720 Updated Makefile with flags to define target architecture when compiling/linking, and added goal `rocksdbjavastaticosxub` to build a OS X Universal Binary native library. Pull Request resolved: facebook/rocksdb#9254 Reviewed By: mrambacher Differential Revision: D33551160 Pulled By: pdillinger fbshipit-source-id: 9ce9962e03aacf55014545a6cdf638b5b14b8fa9
When I run an application on an Apple Silicon based JVM depending on the RocksDB JVM library it fails with UnsatisfiedLinkError.
Expected behavior
Maven dependency includes Mac Arm64 compilation
Actual behavior
Maven dependency does not include Mac Arm64 compilation
Steps to reproduce the behavior
Run RocksDB inside a Apple Silicon JVM application. UnsatisfiedLinkError is thrown.
Depends on #7710
Note: RocksDB for Java works normally running in Rosetta mode, but as soon as environment is started in non Rosetta mode the program fails.
The text was updated successfully, but these errors were encountered: