-
Notifications
You must be signed in to change notification settings - Fork 170
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
MacOS + Graal AOT throws exception due to incorrect osArch value (amd64 instead of x86_64) #336
Comments
Yes, looks like the proposed work-around will work. Interesting though that the normal JVM returns |
luben
added a commit
that referenced
this issue
Jan 1, 2025
The normal JVM returns `x86_64` but Graal AOT returns `amd64`. Addresses #336
I pushed v1.5.6-9 with suggested workaround. Give it a try. |
v1.5.6-9 solves this problem |
dongjoon-hyun
added a commit
to apache/spark
that referenced
this issue
Jan 7, 2025
### What changes were proposed in this pull request? This PR aims to upgrade `zstd-jni` to 1.5.6-9. ### Why are the changes needed? To bring the latest bug fix: - luben/zstd-jni#336 ### Does this PR introduce _any_ user-facing change? No. ### How was this patch tested? Pass the CIs. ### Was this patch authored or co-authored using generative AI tooling? No. Closes #49375 from dongjoon-hyun/SPARK-50741. Authored-by: Dongjoon Hyun <[email protected]> Signed-off-by: Dongjoon Hyun <[email protected]>
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Problem Description:
When running on MacOS with Graal AOT, the following exception occurs:
This exception occurs because
System.getProperty("os.arch")
returnsamd64
instead of the expectedx86_64
, causing the system to be unable to find the corresponding libzstd-jni file.Root Cause:
On MacOS, when running Graal AOT,
os.arch
is set toamd64
, which prevents Zstd JNI from loading the correct.dylib
file since the path depends on thex86_64
architecture rather thanamd64
.Possible Solution:
To fix this issue, it might be necessary to modify the implementation of the
com.github.luben.zstd.util.Native.osArch()
method. Specifically, whenosName
isdarwin
andosArch
isamd64
, it should returnx86_64
, allowing the system to find the correct library file.Expected Behavior:
After the fix, Graal AOT on MacOS should be able to correctly load the zstd-jni library and no longer throw the related exception.
Environment Information:
The text was updated successfully, but these errors were encountered: