when using graalvm.nativeimage.c, many functions return c Word "objects". when I try to do something like:
(let [a (c-function-returning-word)])
I get this error:
Expected Object but got Word for call argument
anyone here knows how to circumvent this problem?Following up on issue @aviflax raised https://github.com/oracle/graal/issues/2481…
https://github.com/borkdude/clj-reflector-graal-java11-fix/blob/806fc9c36e12663ef5bbc4c1064e5a2dbea8a09b/project.clj#L9, but maybe it only needs to reference org.graalvm.sdk/graal-sdk?
I am working on a little experiment with sci and found the following deps worked for me on macOS, graal 20.1.0 jdk 11. Lessee, my deps.edn is a bit of a mess… effectively I am using the following:
{org.clojure/clojure {:mvn/version "1.10.2-alpha1"}
borkdude/clj-reflector-graal-java11-fix {:mvn/version "0.0.1-graalvm-20.1.0"
:exclusions [org.graalvm.nativeimage/svm]}
org.graalvm.sdk/graal-sdk {:mvn/version "20.1.0"}}
And I am also using: borkdude/sci.impl.reflector {:mvn/version "0.0.1-java11"}
(my project uses sci)
I am unclear if org.graalvm.nativeimage/svm
is important in any way. @borkdude might know.