I am getting
[Use -Dgraal.LogFile=<path> to redirect Graal log output to a file.]
org.graalvm.libgraal.jni.JNIExceptionWrapper: java.lang.NullPointerException
at org.graalvm.compiler.hotspot.management.Factory.unregister(Factory.java:133)
at org.graalvm.compiler.hotspot.management.JMXFromLibGraalEntryPoints.unregister(JMXFromLibGraalEntryPoints.java:66)
...
when running `clj -T:build jar` .@borkdude you wouldn't know about this one?
doesn't ring a bell
ok thanks a bunch anyway
I tried clj -J-Dgraal.LogFile=test.log -T:build jar as well as adding :jvm-opts ["-Dgraal.LogFile=test.log"] to my build alias.
Now to my main issue, having switched to openjdk
java -version gives me
openjdk version "11.0.11" 2021-04-20
OpenJDK Runtime Environment (build 11.0.11+9-Ubuntu-0ubuntu2.20.04)
OpenJDK 64-Bit Server VM (build 11.0.11+9-Ubuntu-0ubuntu2.20.04, mixed mode, sharing)I am getting a cyclic load dependency for clj -T:build jar when switching from v0.5.1 to v0.6.x
Actually only tried v0.6.0 and v0.6.8.
This is what my build.clj looks like
(ns build
(:require [clojure.tools.build.api :as b]))
(def lib 'rundherum/rundherum-activemq-example)
(def version (format "0.1.%s" (b/git-count-revs nil)))
(def class-dir "target/classes")
(def basis (b/create-basis {:project "deps.edn"}))
(def jar-file (format "target/%s-%s.jar" (name lib) version))
(defn clean
"Cleans the target path."
[_]
(b/delete {:path "target"}))
(defn jar [_]
(b/copy-dir {:src-dirs ["consumer" "producer"]
:target-dir class-dir})
(b/compile-clj {:basis basis
:src-dirs ["consumer" "producer"]
:class-dir class-dir})
(b/uber {:class-dir class-dir
:uber-file jar-file
:basis basis}))The actual error is
Unexpected error macroexpanding clojure.core.async/go at (org/ramper/activemq_util.clj:56:23).
Cyclic load dependency: [ /producer ]->/org/ramper/activemq_util->/org/ramper/api->[ /producer ]@finn.volkel Can you try https://github.com/clj-easy/graal-build-time/blob/b91cd78a977fdf81758705668f44b0d2ddad4bdc/build.clj#L1-L2?
but the error also happens on non graal
what I pointed to doesn't have anything to do with graal
check the ask link
not sure if you're hitting that, but worth a shot
ok, tried your two lines, but it didn't help
downgrading to v.0.5.1 for now
If you're using v0.6.4 or later, you can specify :java-opts to compile-clj and pass that Graal log output option. See https://clojure.github.io/tools.build/clojure.tools.build.api.html#var-compile-clj
(btw, kind of unusual to compile code into a JAR -- normally you only compile code into an uberjar)
java-opts and not the easily typo’d jvm-opts , additionally the environment variable JAVA_OPTS is not respected if set
@seancorfield maybe my naming is misleading, but doesn't this create an uberjar?
Oh, yes, that's very confusing.
Yes, you are calling uber in a function called jar 👀