Open KurtGokhan opened 2 years ago
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,
Is there a workaround this?
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.