-
Notifications
You must be signed in to change notification settings - Fork 147
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
ClearScript tries to load x64 native library in M1 Mac #368
Comments
Hi @KurtGokhan, Thanks for reporting this. We're considering making OS/platform detection overridable in a future release. Cheers! |
Is there a workaround this? @ClearScriptLib |
Hi @eliashezron,
We aren't aware of a reproducible case of this. In all our testing, ClearScript correctly detects the process architecture (arm64 vs. x64) and loads the appropriate native library. If you're on Apple Silicon and your application is loading ClearScriptV8.osx-x64.dylib, you can use Activity Monitor to verify that your application is running in emulated x64 mode (the Kind column will show "Intel"). Good luck! |
I tried to run my app in a M1 architecture MacOS. ClearScript seems to be failing to detect that it is running in Arm64 architecture. It is picking the
osx-x64
file whereas it should pick theosx-arm64
file.There does not seem to be anything wrong with ClearScript source code. So this is probably a Mono bug, where it fails to detect it is running on Arm64 and picks x64. I encountered this kind of issue when trying to load correct libraries in my Android implementation attempt and I added a global flag to tell that the app is running on Android. I could add another flag for this, but I would be deviating away from original source code.
Is there a better way to detect the architecture. Or can there be a global configuration for choosing which native library to load? No pressure though, I know this isn't a .NET bug and maybe out of your scope.
The text was updated successfully, but these errors were encountered: