with-release not working
ftravers opened this issue · 3 comments
ftravers commented
this works:
(let [x (dv 0.3 0.9)
w1 (dge 4 2 [0.3 0.6
0.1 2.0
0.9 3.7
0.0 1.0]
{:layout :row})
h1 (dv 4)]
(println (mv! w1 x h1)))
but this
(with-release [x (dv 0.3 0.9)
w1 (dge 4 2 [0.3 0.6
0.1 2.0
0.9 3.7
0.0 1.0]
{:layout :row})
h1 (dv 4)]
(println (mv! w1 x h1)))
throws this error:
Unhandled java.lang.IllegalAccessError
class uncomplicate.commons.core$eval12284$fn__12285 (in unnamed
module @0x75d5a2e5) cannot access class jdk.internal.ref.Cleaner
(in module java.base) because module java.base does not export
jdk.internal.ref to unnamed module @0x75d5a2e5
requires:
(ns ml.init
(:require
[uncomplicate.commons.core :refer [with-release]]
[uncomplicate.neanderthal
[native :refer [dv dge]]
[core :refer [mv! mm]]]))
deps.edn
{:paths ["src" "resources" "target"]
:deps {rum {:mvn/version "0.11.3"}
uncomplicate/neanderthal {:mvn/version "0.26.0"}
uncomplicate/clojurecl {:mvn/version "0.14.0"}}
}
╭─fenton@dell ~ ‹master*›
╰─$ java -version
openjdk version "13.0.1" 2019-10-15
OpenJDK Runtime Environment (build 13.0.1+9)
OpenJDK 64-Bit Server VM (build 13.0.1+9, mixed mode)
blueberry commented
You need to export base module if you use Java 8+. Please see https://github.com/uncomplicate/neanderthal/blob/master/examples/hello-world/project.clj
ftravers commented
If you are using deps.edn you can do:
:aliases
{:dev {:jvm-opts ["--add-opens=java.base/jdk.internal.ref=ALL-UNNAMED"]
of course you'd have a different alias name than :dev