-
Notifications
You must be signed in to change notification settings - Fork 1.6k
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
Can't create isolate on Macos Sonoma 14.3.1 #8843
Comments
Hi @dzeraRhoades, Thank you for reaching out to us regarding the issue you're experiencing with GraalVM. In order to assist you effectively, could you please provide us with a concise reproducer for the problem you're encountering? Additionally, it would be helpful for us to know which version of GraalVM you're currently using, as well as the architecture of your system. |
Hi, sorry for late answer, couldn't answer earlier.
|
I believe the error may occur because shared library is built with graalvm for x64 but is used on aarch64 system. Can that be the reason? |
Absolutely, that could indeed be the case. It's quite possible that the error stems from using a shared library built with GraalVM for x64 architecture on an aarch64 system. Architecture mismatches like this can often lead to compatibility issues. |
@dzeraRhoades Do you have sample project which I can refer in Objective C or Swift how you have consumed shared library.It would be great help for me.I am trying to do same in Mac application. |
@codewithakamathb Have you had a chance to take a look at this documentation ? It could offer some valuable insights for your task. |
@codewithakamathb do you still need a sample? |
@k4kranti i ve had the same problem and solved it by manually installing the jdk without brew |
@selhagani Thanks for reply! I have tried to build my dylib and executable with GraalVM for aarch64 and it solved the problem! But, in my case, the dylib should be built on server with Macos x64 (not locally). Is there a workaround to get rid of this problem on arm? |
@dzeraRhoades a small POC how did you consume the shared native image .a file in Objective C. Simple example should be done |
@codewithakamathb I ve pasted some code in my first comment. Unfortunately, i cannot add anything else, cause the project is private. I use it in C++ code, by the way. |
I need a code for invoking Native Image shared dll method via Objective C.A simple Add method also should do the job |
@dzeraRhoades Thanks for the update! I'm glad to hear that building your dylib and executable with GraalVM for aarch64 has resolved the issue when both are built and executed on the same architecture. Unfortunately, there isn't a workaround for your specific requirement to build the dylib on a macOS x64 server for execution on an arm architecture. The native image produced by GraalVM is indeed platform-dependent, meaning it must be built on the same architecture that it will run on. Cross-compiling native images across different architectures isn't supported at this time. |
@selhagani Thank you |
I'm using a shared library, built with graalVm 17 with following params:
--no-fallback
--shared
-O0
-H:-CheckToolchain
-H:DynamicProxyConfigurationResources=...
-H:ReflectionConfigurationResources=...
-H:+TraceNativeToolUsage
This is how i'm creating isolate:
graal_isolatethread_t* isolateThread = NULL;
graal_create_isolate_fn_t createIsolateFuncPtr = (graal_create_isolate_fn_t)loadFuncPtr("graal_create_isolate", handle);
int graalInitCode = createIsolateFuncPtr(NULL, NULL, &isolateThread);
But createIsolateFuncPtr returns 23.
On windows, linux and Macos Ventura 13.6.1 works fine
The text was updated successfully, but these errors were encountered: