veikman / dactyl-keyboard

Programmatic keyboard CAD
GNU Affero General Public License v3.0
268 stars 30 forks source link

Exception in thread "main" java.lang.NoClassDefFoundError: unicode_math/core$⌈ (wrong name: unicode_math/core$∈) #3

Closed 20lives closed 5 years ago

20lives commented 5 years ago

I have cloned and unicode-made and installed it with lein install, afterward I cloned dactyl-keyboard and ran the makefile.

the following error occurred after this command java -jar target/dmote.jar:

my knowledge in Clojure is limited and I believe I did something wrong, but i can't really tell what.

WARNING: boolean? already refers to: #'clojure.core/boolean? in namespace: clojure.tools.analyzer.utils, being replaced by: #'clojure.tools.analyzer.utils/boolean?
WARNING: boolean? already refers to: #'clojure.core/boolean? in namespace: clojure.tools.analyzer, being replaced by: #'clojure.tools.analyzer.utils/boolean?
Exception in thread "main" java.lang.NoClassDefFoundError: unicode_math/core$⌈ (wrong name: unicode_math/core$∈), compiling:(/tmp/form-init9098805308791983335.clj:1:73)
    at clojure.lang.Compiler.load(Compiler.java:7526)
    at clojure.lang.Compiler.loadFile(Compiler.java:7452)
    at clojure.main$load_script.invokeStatic(main.clj:278)
    at clojure.main$init_opt.invokeStatic(main.clj:280)
    at clojure.main$init_opt.invoke(main.clj:280)
    at clojure.main$initialize.invokeStatic(main.clj:311)
    at clojure.main$null_opt.invokeStatic(main.clj:345)
    at clojure.main$null_opt.invoke(main.clj:342)
    at clojure.main$main.invokeStatic(main.clj:424)
    at clojure.main$main.doInvoke(main.clj:387)
    at clojure.lang.RestFn.applyTo(RestFn.java:137)
    at clojure.lang.Var.applyTo(Var.java:702)
    at clojure.main.main(main.java:37)
Caused by: java.lang.NoClassDefFoundError: unicode_math/core$⌈ (wrong name: unicode_math/core$∈)
    at java.lang.ClassLoader.defineClass1(Native Method)
    at java.lang.ClassLoader.defineClass(ClassLoader.java:763)
    at java.security.SecureClassLoader.defineClass(SecureClassLoader.java:142)
    at java.net.URLClassLoader.defineClass(URLClassLoader.java:468)
    at java.net.URLClassLoader.access$100(URLClassLoader.java:74)
veikman commented 5 years ago

The warnings about boolean? are harmless (and extrinsic). The exception implies that your installation of unicode-math is not visible to the application. I am not sure why that would be. Please elaborate:

  1. Which version (commit) of the DMOTE repo have you downloaded?
  2. Have you made any changes to the Clojure code, including project.clj?

You might try a lein clean followed by a lein run, just in case you’ve got some bad intermediate products lying around.

20lives commented 5 years ago
  1. Which version (commit) of the DMOTE repo have you downloaded? latest (708e104e)
  2. Have you made any changes to the Clojure code, including project.clj? None

I will read through leiningen docs to understand what i have done wrong.

veikman commented 5 years ago

I tried a lein clean while also deleting everything in my ~/.m2/repository cache (where Leiningen keeps its jars) and rebuilding unicode-math from a fresh clone. Even so, I was not able to reproduce your crash. For what it’s worth, I’m on a Debian 10 system, using Leiningen v2.8.1.

I suggest you check if you’ve got a file called ~/.m2/repository/unicode-math/unicode-math/0.2.1/unicode-math-0.2.1.jar. If you do, a lein repl in your DMOTE directory should allow you to manually (require 'unicode-math.core) and inspect its contents.

I have created an issue here to make unicode-math more easily accessible. Consider a polite ping there if you get stuck.

20lives commented 5 years ago

I am using Arch 4.18 with Clojure 1.9.0-8 Just tried it on Debian based machine and it didn't have any problem.

veikman commented 5 years ago

Interesting. Arch famously requires more configuration. I suspect the problem is with some difference in Leiningen setup, such that libraries you install manually don’t go into the same environment as the stuff Leiningen fetches for the project. If that is true, then an official release of unicode-math 0.2.1 would indeed fix your problem.