Closed XhstormR closed 11 months ago
may be related to this https://github.com/oracle/graal/issues/3359
com.sun.jna.NativeLibrary#getInstance(java.lang.String, java.util.Map<java.lang.String,?>)
I had the same issue and I found a solution.
https://github.com/hubvd/odoo-tools/commit/74e1bc98be8a1fd00810474c489512b240025204
By utilizing the @Substitute
annotation, we can effectively swap out the existing JNA implementation with the org.graalvm.nativeimage.c
package.
I only ported LinuxMppImpls, but MacosMppImpls and Win32MppImpls should also be substituted.
I also removed the JNA dependency and the native image metadata since we don't need it anymore. This isn't strictly needed though, it is only done in order to have a smaller binary.
Maybe this could be integrated in mordant directly.
@hubvd looks cool, thanks for sharing! I'd definitely accept a PR if you want to integrate it into mordant.
I'll try to do that this week :smiley:
Thanks for looking into this, my programming language pork (https://github.com/GayPizzaSpecifications/pork) utilizes Graal for native compilation and clikt for the frontend. My workaround currently is to add a mintool project which doesn't use clikt for simple use cases.
build.gradle.kts:
Environment:
clikt: com.github.ajalt.clikt:clikt:4.2.0
Log: