This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
2020-12-10
Channels
- # adventofcode (174)
- # announcements (5)
- # aws (9)
- # babashka (17)
- # beginners (259)
- # boot-dev (1)
- # calva (6)
- # cider (19)
- # circleci (7)
- # clj-kondo (9)
- # cljfx (51)
- # cljs-dev (4)
- # clojure (83)
- # clojure-australia (2)
- # clojure-dev (9)
- # clojure-europe (78)
- # clojure-nl (3)
- # clojure-spec (4)
- # clojure-switzerland (1)
- # clojure-uk (18)
- # clojurescript (22)
- # conjure (17)
- # cursive (17)
- # data-science (1)
- # datomic (15)
- # defnpodcast (1)
- # events (2)
- # fulcro (39)
- # graalvm (16)
- # graphql (1)
- # kaocha (5)
- # lambdaisland (11)
- # malli (6)
- # meander (1)
- # off-topic (26)
- # pathom (10)
- # re-frame (10)
- # reitit (6)
- # rewrite-clj (7)
- # sci (3)
- # shadow-cljs (28)
- # sql (12)
- # test-check (10)
- # tools-deps (31)
Hi all! I’ve been playing around a bit with Quil and Processing, and I wanted to share some stuff I made with some friends. I thought that compiling to a static executable using GraalVM might be a good way to do that. However when I run lein native-image, I get the following error. Note that I had to skip the --initialize-at-build-time flag because otherwise it tries to start my sketches. My code is here: https://github.com/maxrothman/playing-with-processing, and I’m using the native-image
lein plugin.
Any ideas? I took a look through https://github.com/lread/clj-graal-docs but I didn’t see anything that seemed related. I’m completely new to graalvm and fairly new to Java, so sorry if this has been asked before
@max.r.rothman Take a look at https://github.com/borkdude/clj-reflector-graal-java11-fix
Thanks for the suggestion, @borkdude! I am using clojure 1.10.2-alpha4. I can’t use the fix you linked to though because Processing is only compatible with Java 8
@max.r.rothman Which version of GraalVM are you using to compile then?
@max.r.rothman Have you tried --report-unsupported-elements-at-runtime
@max.r.rothman It seems like you're getting the same error as https://clojurians.slack.com/archives/CAJN79WNT/p1607554227199300. I don't know how y'all are compiling your code, so unless you post a complete repro + build scripts online, I don't have much more to say.
My code is at https://github.com/maxrothman/playing-with-processing, and I’m building using lein native-image
(via the https://github.com/taylorwood/lein-native-image plugin)
I recommend just writing a shell script to compile. It's hard to see what's wrong when using wrappers.
This is one of my simplest GraalVM projects: https://github.com/borkdude/puget-cli You could try to see if that runs on your machine and then port it to your code