-
Notifications
You must be signed in to change notification settings - Fork 24
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
Support arm64/aarch64 Linux and Apple Silicon #12
Conversation
353ae25
to
153c298
Compare
String machine = input.readLine(); | ||
switch (machine) { | ||
case "arm64": | ||
return Architecture.arm64; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Fun from testing: while diagnosing timeouts, I discovered that macOS was always being detected as x86_64
, so a native Apple Silicon was necessary but not sufficient.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Oh interesting -- was your jvm an x86_64 binary perchance?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Good question! It was an aarch64 binary, but there was bug in this method: similar to your note on getUnixArchitecture
, it was treating all 64-bit architectures as x86_64.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
that'll do it :)
echo $ARCH | ||
|
||
function copy_openssl_and_remove_dylibs() { | ||
# To make macOS builds more portable, we want to statically link OpenSSL, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
more portable
In other words, to not require the user to have openssl dylib from Homebrew installed.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
👍
@n-oden thank you again for the the much-improved build script. Let me know if you have any thoughts, and if you want to be added to the contributors in the README. |
I'd be delighted! |
Mostly LGTM, just a few nitpicks |
737228b
to
9e04d69
Compare
Happy new year! I morally bless all parts of this PR that descended from mine. :) |
- remove references to 32 bit macos/darwin - add a version of redis compiled for Apple Silicon (darwin/arm64) - normalize redis server file names - add linux/arm64 support - clean up docker/builder scripts - update README
Bonus: use try-with-resources
cb4d8aa
to
6365c12
Compare
Likewise! And thank you again for your work and support in getting this landed. |
@eager-signal Thanks for the awesome work. Are the changes released with a new binary already ? I am looking to use it for the Apple Silicone support. |
@sabyasachi90 it’s not released quite yet, but we should have 0.8.2 published early next week |
We've just published the release to Maven Central; it may take a couple hours for everything to move through the upstream plumbing, but it's on its way. |
The io.oden/embedded-redis artifact was provided by me as part of landing BEAM-13159, as the previously used version did not use a recent enough version of Redis to support the XADD/XRANGE command set and also had a fatal crash bug on darwin/arm64 ("Apple Silicon"). My fork in turn was based on the signal.org artifact, which had a more recent redis version but was still affected by the crash bug. Now that signalapp/embedded-redis#12 has landed, the io.oden artifact is unlikely to be upgraded further; beam should use the dependency that is actively maintained.
This is a great addition - I've noticed incompatibilities however when the host system runs OpenSSL 1.1.1 (or thereabouts) there is a config directive in openssl.cnf of |
@radicand Thanks for the note—we can definitely look into it. Can you give a bit more details about your configuration, such as OS, OpenSSL version, etc.? |
This cherry-picks the great improvements to building embedded binaries by @n-oden in #11. Still todo:
closes #11