Fork me on GitHub
#graalvm
<
2020-06-30
>
saikyun18:06:43

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?

lee23:06:02

Following up on issue @aviflax raised https://github.com/oracle/graal/issues/2481

lee23:06:19

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"}}

lee23:06:39

And I am also using: borkdude/sci.impl.reflector {:mvn/version "0.0.1-java11"} (my project uses sci)

lee23:06:43

I am unclear if org.graalvm.nativeimage/svm is important in any way. @borkdude might know.