-
Notifications
You must be signed in to change notification settings - Fork 47
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
help with compiling ninja/jep #26
Comments
Output is listed: https://github.com/zcaudate/sample-jep-graal#running |
Hi @zcaudate , It is probably because of the “closed world assumption” you have to provide at compile-time all the dependencies that you will use at runtime. I’m currently on holidays with limited internet access but I’d suggest that you have a read to Bruno |
Thanks @BrunoBonacci. Enjoy your holidays! The program compiles but is not working at runtime. I did ask around about that and even attempted to hand code the JNI.json for about half a day before finding a better solution. The call to --agentlib does the instrumentation to generate the JNI.json. Anyways. Most of the problems I've run into are captured here: ninia/jep#271 and I gave some more background here: babashka/babashka#517 who pointed me out to you. I think I'm pretty close and it's not that urgent but any help would be great. |
Make sure that the native library is either embedded in your jar or the |
The shared library is located here: The layout of the folder looks like this: Where does the folder go? When not compiled using Native Image, I'm doing a bootstrap call to an external python process to find this directory: |
Hi Chris,
If it is using JNI (instead of JNA) then you have to set the -Djava.library.path or LD_LIBRARY_PATH
It has been a while since I last used JNI/JNA but from what I remember you need to load the native interface in Java before using it.
Something like
static {
System.loadLibrary("jep");
}
The call to load library will resolve the location using the -Djava.library.path or LD_LIBRARY_PATH.
If you get stuck I suggest you open an issue into the GraalVM project asking for help, the team is very kind and they will help you with the correct pointers.
Bye
Bruno
… On 18 Aug 2020, at 10:47, Chris Zheng ***@***.***> wrote:
The shared library is located here: ***@***.***/3.8.3_2/Frameworks/Python.framework/Versions/3.8/lib/python3.8/site-packages/jep/ after a brew install it uses JNI so I'm not sure that setting jna.library.path would help.
The layout of the folder looks like this:
Where does the folder go?
When not compiled using Native Image, I'm doing a bootstrap call to an external python process to find this directory:
https://github.com/zcaudate/sample-jep-graal/blob/master/src/jep/graal.clj#L30
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub, or unsubscribe.
|
Sweet. Thanks Bruno. I'll give it another go. |
I've compiled jep, which is a jni based embedded python runtime https://github.com/zcaudate/sample-jep-graal but am getting a weird output.
Have you seen something similar to this before?
The text was updated successfully, but these errors were encountered: