quil / quil

Main repo. Quil source code.
Eclipse Public License 1.0
2.97k stars 166 forks source link

Using thi.ng/geom breaks :p2d and :p3d renderers #263

Open rrrnld opened 6 years ago

rrrnld commented 6 years ago

I just tried combining [thi.ng/geom "1.0.0-RC3"] with quil and it breaks the :p3d and :p2d renderers. The default renderer works fine. It seems to be a dependency conflict essentially caused by this (th.ing/geom uses the jogl-deps directly). Everything works fine without the thi.ng/geom dependency.

This is my project.clj:

(defproject nature-of-code "0.1.0-SNAPSHOT"
  :description "Nature of code in Clojure"
  :url "http://example.com/FIXME"
  :license {:name "Eclipse Public License"
            :url "http://www.eclipse.org/legal/epl-v10.html"}
  :dependencies [[org.clojure/clojure "1.9.0"]
                 [quil "2.8.0"]
                 [thi.ng/geom "1.0.0-RC3"]])

And an example sketch:

(ns nature-of-code.adlibs.jogl-test
  (:require [quil.core :as q]
            [quil.middleware :as qm]))

(defn setup []
  (q/frame-rate 1)
  (q/color-mode :hsb)
  {})

(defn update-state [state]
  state)

(defn draw-state [state]
  (q/background 240)
  (q/stroke 190)
  (q/line 10 10 (- (q/width) 10) (- (q/height) 10)))

(q/defsketch jogl-test
  :title ""
  :size [500 500]
  :setings #(q/pixel-density (q/display-density))
  :setup setup
  :update update-state
  :draw draw-state
  :features [:keep-on-top :no-bind-output]
  :renderer :p2d
  :middleware [qm/pause-on-error qm/fun-mode])

This is the stack trace when I add the thi.ng dependency without requireing it in the namespace:

CompilerException java.lang.UnsatisfiedLinkError: Can't load library: /home/arne/dev/nature-of-code/natives/linux-amd64//libgluegen-rt.so, compiling:(jogl_test.clj:18:1) 
Nov 28, 2018 10:06:51 AM clojure.tools.logging$eval579$fn__582 invoke
SEVERE: Unhandled REPL handler exception processing message {:op stacktrace, :pprint-fn clojure.pprint/pprint, :print-length 50, :print-level 50, :session df61f854-f4f6-4be9-81cf-de4c6e5c6a6d, :id 18}
java.lang.NoClassDefFoundError: Could not initialize class com.jogamp.common.os.Platform
    at java.lang.Class.forName0(Native Method)
    at java.lang.Class.forName(Class.java:348)
    at clojure.lang.RT.classForName(RT.java:2204)
    at clojure.lang.RT.classForName(RT.java:2213)
    at clojure.lang.Compiler.maybeResolveIn(Compiler.java:7322)
    at clojure.core$ns_resolve.invokeStatic(core.clj:4336)
    at clojure.core$ns_resolve.invokeStatic(core.clj:4325)
    at clojure.core$ns_resolve.invoke(core.clj:4325)
    at cider.inlined_deps.orchard.v0v3v4_20181106v231743_1.orchard.java$resolve_class$fn__2876.invoke(java.clj:270)
    at cider.inlined_deps.orchard.v0v3v4_20181106v231743_1.orchard.java$resolve_class.invokeStatic(java.clj:270)
    at cider.inlined_deps.orchard.v0v3v4_20181106v231743_1.orchard.java$resolve_class.invoke(java.clj:264)
    at cider.inlined_deps.orchard.v0v3v4_20181106v231743_1.orchard.java$resolve_symbol.invokeStatic(java.clj:299)
    at cider.inlined_deps.orchard.v0v3v4_20181106v231743_1.orchard.java$resolve_symbol.invoke(java.clj:286)
    at cider.nrepl.middleware.stacktrace$analyze_fn.invokeStatic(stacktrace.clj:88)
    at cider.nrepl.middleware.stacktrace$analyze_fn.invoke(stacktrace.clj:67)
    at clojure.core$comp$fn__5529.invoke(core.clj:2561)
    at clojure.core$comp$fn__5529.invoke(core.clj:2561)
    at clojure.core$comp$fn__5529.invoke(core.clj:2561)
    at cider.nrepl.middleware.stacktrace$analyze_frame.invokeStatic(stacktrace.clj:185)
    at cider.nrepl.middleware.stacktrace$analyze_frame.invoke(stacktrace.clj:182)
    at clojure.core$map$fn__5587.invoke(core.clj:2747)
    at clojure.lang.LazySeq.sval(LazySeq.java:40)
    at clojure.lang.LazySeq.seq(LazySeq.java:49)
    at clojure.lang.RT.seq(RT.java:528)
    at clojure.core$seq__5124.invokeStatic(core.clj:137)
    at clojure.core$map$fn__5591.invoke(core.clj:2749)
    at clojure.lang.LazySeq.sval(LazySeq.java:40)
    at clojure.lang.LazySeq.seq(LazySeq.java:49)
    at clojure.lang.RT.seq(RT.java:528)
    at clojure.core$seq__5124.invokeStatic(core.clj:137)
    at clojure.core$map$fn__5587.invoke(core.clj:2738)
    at clojure.lang.LazySeq.sval(LazySeq.java:40)
    at clojure.lang.LazySeq.seq(LazySeq.java:49)
    at clojure.lang.RT.seq(RT.java:528)
    at clojure.core$seq__5124.invokeStatic(core.clj:137)
    at clojure.core$map$fn__5587.invoke(core.clj:2738)
    at clojure.lang.LazySeq.sval(LazySeq.java:40)
    at clojure.lang.LazySeq.seq(LazySeq.java:49)
    at clojure.lang.Cons.next(Cons.java:39)
    at clojure.lang.RT.next(RT.java:706)
    at clojure.core$next__5108.invokeStatic(core.clj:64)
    at clojure.core$dorun.invokeStatic(core.clj:3134)
    at clojure.core$doall.invokeStatic(core.clj:3140)
    at clojure.walk$walk.invokeStatic(walk.clj:46)
    at clojure.walk$postwalk.invokeStatic(walk.clj:52)
    at clojure.walk$postwalk.invoke(walk.clj:52)
    at clojure.core$partial$fn__5561.invoke(core.clj:2616)
    at clojure.core$map$fn__5587.invoke(core.clj:2745)
    at clojure.lang.LazySeq.sval(LazySeq.java:40)
    at clojure.lang.LazySeq.seq(LazySeq.java:49)
    at clojure.lang.RT.seq(RT.java:528)
    at clojure.lang.LazilyPersistentVector.create(LazilyPersistentVector.java:44)
    at clojure.core$vec.invokeStatic(core.clj:377)
    at clojure.walk$walk.invokeStatic(walk.clj:45)
    at clojure.walk$postwalk.invokeStatic(walk.clj:52)
    at clojure.walk$postwalk.invoke(walk.clj:52)
    at clojure.core$partial$fn__5561.invoke(core.clj:2616)
    at clojure.core$map$fn__5587.invoke(core.clj:2747)
    at clojure.lang.LazySeq.sval(LazySeq.java:40)
    at clojure.lang.LazySeq.seq(LazySeq.java:49)
    at clojure.lang.Cons.next(Cons.java:39)
    at clojure.lang.RT.next(RT.java:706)
    at clojure.core$next__5108.invokeStatic(core.clj:64)
    at clojure.core.protocols$fn__7852.invokeStatic(protocols.clj:169)
    at clojure.core.protocols$fn__7852.invoke(protocols.clj:124)
    at clojure.core.protocols$fn__7807$G__7802__7816.invoke(protocols.clj:19)
    at clojure.core.protocols$seq_reduce.invokeStatic(protocols.clj:31)
    at clojure.core.protocols$fn__7835.invokeStatic(protocols.clj:75)
    at clojure.core.protocols$fn__7835.invoke(protocols.clj:75)
    at clojure.core.protocols$fn__7781$G__7776__7794.invoke(protocols.clj:13)
    at clojure.core$reduce.invokeStatic(core.clj:6748)
    at clojure.core$into.invokeStatic(core.clj:6815)
    at clojure.walk$walk.invokeStatic(walk.clj:49)
    at clojure.walk$postwalk.invokeStatic(walk.clj:52)
    at clojure.walk$stringify_keys.invokeStatic(walk.clj:101)
    at clojure.walk$stringify_keys.invoke(walk.clj:101)
    at clojure.tools.nrepl.transport.FnTransport.send(transport.clj:28)
    at clojure.tools.nrepl.middleware.pr_values$pr_values$fn$reify__1088.send(pr_values.clj:27)
    at cider.nrepl.middleware.stacktrace$handle_stacktrace.invokeStatic(stacktrace.clj:325)
    at cider.nrepl.middleware.stacktrace$handle_stacktrace.invoke(stacktrace.clj:321)
    at clojure.lang.Var.invoke(Var.java:385)
    at cider.nrepl$wrap_stacktrace$fn__2092.invoke(nrepl.clj:442)
    at clojure.tools.nrepl.middleware$wrap_conj_descriptor$fn__886.invoke(middleware.clj:22)
    at cider.nrepl$wrap_resource$fn__2076.invoke(nrepl.clj:414)
    at clojure.tools.nrepl.middleware$wrap_conj_descriptor$fn__886.invoke(middleware.clj:22)
    at cider.nrepl$wrap_complete$fn__1984.invoke(nrepl.clj:173)
    at clojure.tools.nrepl.middleware$wrap_conj_descriptor$fn__886.invoke(middleware.clj:22)
    at cider.nrepl$wrap_macroexpand$fn__2036.invoke(nrepl.clj:297)
    at clojure.tools.nrepl.middleware$wrap_conj_descriptor$fn__886.invoke(middleware.clj:22)
    at cider.nrepl$wrap_spec$fn__2084.invoke(nrepl.clj:426)
    at clojure.tools.nrepl.middleware$wrap_conj_descriptor$fn__886.invoke(middleware.clj:22)
    at cider.nrepl$wrap_apropos$fn__1968.invoke(nrepl.clj:159)
    at clojure.tools.nrepl.middleware$wrap_conj_descriptor$fn__886.invoke(middleware.clj:22)
    at clojure.tools.nrepl.middleware.interruptible_eval$interruptible_eval$fn__1169.invoke(interruptible_eval.clj:247)
    at clojure.tools.nrepl.middleware$wrap_conj_descriptor$fn__886.invoke(middleware.clj:22)
    at clojure.tools.nrepl.middleware.session$add_stdin$fn__1252.invoke(session.clj:238)
    at clojure.tools.nrepl.middleware$wrap_conj_descriptor$fn__886.invoke(middleware.clj:22)
    at cider.nrepl$wrap_out$fn__2052.invoke(nrepl.clj:342)
    at clojure.tools.nrepl.middleware$wrap_conj_descriptor$fn__886.invoke(middleware.clj:22)
    at cider.nrepl$wrap_undef$fn__2124.invoke(nrepl.clj:501)
    at clojure.tools.nrepl.middleware$wrap_conj_descriptor$fn__886.invoke(middleware.clj:22)
    at cider.nrepl$wrap_ns$fn__2044.invoke(nrepl.clj:310)
    at clojure.tools.nrepl.middleware$wrap_conj_descriptor$fn__886.invoke(middleware.clj:22)
    at cider.nrepl$wrap_version$fn__2132.invoke(nrepl.clj:509)
    at clojure.tools.nrepl.middleware$wrap_conj_descriptor$fn__886.invoke(middleware.clj:22)
    at cider.nrepl$wrap_inspect$fn__2028.invoke(nrepl.clj:257)
    at clojure.tools.nrepl.middleware$wrap_conj_descriptor$fn__886.invoke(middleware.clj:22)
    at clojure.tools.nrepl.middleware.load_file$wrap_load_file$fn__1295.invoke(load_file.clj:79)
    at clojure.tools.nrepl.middleware$wrap_conj_descriptor$fn__886.invoke(middleware.clj:22)
    at cider.nrepl$wrap_content_type$fn__1952.invoke(nrepl.clj:140)
    at clojure.tools.nrepl.middleware$wrap_conj_descriptor$fn__886.invoke(middleware.clj:22)
    at cider.nrepl$wrap_pprint$fn__1942.invoke(nrepl.clj:120)
    at clojure.tools.nrepl.middleware$wrap_conj_descriptor$fn__886.invoke(middleware.clj:22)
    at clojure.tools.nrepl.middleware.pr_values$pr_values$fn__1085.invoke(pr_values.clj:22)
    at clojure.tools.nrepl.middleware$wrap_conj_descriptor$fn__886.invoke(middleware.clj:22)
    at cider.nrepl$wrap_test$fn__2100.invoke(nrepl.clj:452)
    at clojure.tools.nrepl.middleware$wrap_conj_descriptor$fn__886.invoke(middleware.clj:22)
    at cider.nrepl$wrap_classpath$fn__1976.invoke(nrepl.clj:167)
    at clojure.tools.nrepl.middleware$wrap_conj_descriptor$fn__886.invoke(middleware.clj:22)
    at cider.nrepl$wrap_debug$fn__1994.invoke(nrepl.clj:193)
    at clojure.tools.nrepl.middleware$wrap_conj_descriptor$fn__886.invoke(middleware.clj:22)
    at cider.nrepl$w
rap_enlighten$fn__2002.invoke(nrepl.clj:219)
    at clojure.tools.nrepl.middleware$wrap_conj_descriptor$fn__886.invoke(middleware.clj:22)
    at cider.nrepl$wrap_slurp$fn__1960.invoke(nrepl.clj:151)
    at clojure.tools.nrepl.middleware$wrap_conj_descriptor$fn__886.invoke(middleware.clj:22)
    at cider.nrepl$wrap_profile$fn__2060.invoke(nrepl.clj:351)
    at clojure.tools.nrepl.middleware$wrap_conj_descriptor$fn__886.invoke(middleware.clj:22)
    at cider.nrepl$wrap_refresh$fn__2068.invoke(nrepl.clj:388)
    at clojure.tools.nrepl.middleware$wrap_conj_descriptor$fn__886.invoke(middleware.clj:22)
    at cider.nrepl$wrap_tracker$fn__2116.invoke(nrepl.clj:490)
    at clojure.tools.nrepl.middleware$wrap_conj_descriptor$fn__886.invoke(middleware.clj:22)
    at cider.nrepl.middleware.pprint$handle_pprint_fn.invokeStatic(pprint.clj:62)
    at cider.nrepl.middleware.pprint$handle_pprint_fn.invoke(pprint.clj:57)
    at clojure.lang.Var.invoke(Var.java:385)
    at cider.nrepl$wrap_pprint_fn$fn__1932.invoke(nrepl.clj:101)
    at clojure.tools.nrepl.middleware$wrap_conj_descriptor$fn__886.invoke(middleware.clj:22)
    at clojure.tools.nrepl.middleware.session$session$fn__1237.invoke(session.clj:192)
    at clojure.tools.nrepl.middleware$wrap_conj_descriptor$fn__886.invoke(middleware.clj:22)
    at clojure.tools.nrepl.server$handle_STAR_.invokeStatic(server.clj:19)
    at clojure.tools.nrepl.server$handle_STAR_.invoke(server.clj:16)
    at clojure.tools.nrepl.server$handle$fn__1310.invoke(server.clj:28)
    at clojure.core$binding_conveyor_fn$fn__5476.invoke(core.clj:2022)
    at clojure.lang.AFn.call(AFn.java:18)
    at java.util.concurrent.FutureTask.run(FutureTask.java:266)
    at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)
    at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)
    at java.lang.Thread.run(Thread.java:748)

An here's a slightly shorter one when requireing thi.ng.geom.core:

2. Unhandled clojure.lang.Compiler$CompilerException
   Error compiling jogl_test.clj at (19:1)

             Compiler.java: 3700  clojure.lang.Compiler$InvokeExpr/eval
             Compiler.java:  457  clojure.lang.Compiler$DefExpr/eval
             Compiler.java: 7067  clojure.lang.Compiler/eval
             Compiler.java: 7514  clojure.lang.Compiler/load
                      REPL:    1  user/eval8012
                      REPL:    1  user/eval8012
             Compiler.java: 7062  clojure.lang.Compiler/eval
             Compiler.java: 7025  clojure.lang.Compiler/eval
                  core.clj: 3206  clojure.core/eval
                  core.clj: 3202  clojure.core/eval
                  main.clj:  243  clojure.main/repl/read-eval-print/fn
                  main.clj:  243  clojure.main/repl/read-eval-print
                  main.clj:  261  clojure.main/repl/fn
                  main.clj:  261  clojure.main/repl
                  main.clj:  177  clojure.main/repl
               RestFn.java: 1523  clojure.lang.RestFn/invoke
    interruptible_eval.clj:   87  clojure.tools.nrepl.middleware.interruptible-eval/evaluate/fn
                  AFn.java:  152  clojure.lang.AFn/applyToHelper
                  AFn.java:  144  clojure.lang.AFn/applyTo
                  core.clj:  657  clojure.core/apply
                  core.clj: 1965  clojure.core/with-bindings*
                  core.clj: 1965  clojure.core/with-bindings*
               RestFn.java:  425  clojure.lang.RestFn/invoke
    interruptible_eval.clj:   85  clojure.tools.nrepl.middleware.interruptible-eval/evaluate
    interruptible_eval.clj:   55  clojure.tools.nrepl.middleware.interruptible-eval/evaluate
    interruptible_eval.clj:  222  clojure.tools.nrepl.middleware.interruptible-eval/interruptible-eval/fn/fn
    interruptible_eval.clj:  190  clojure.tools.nrepl.middleware.interruptible-eval/run-next/fn
                  AFn.java:   22  clojure.lang.AFn/run
   ThreadPoolExecutor.java: 1149  java.util.concurrent.ThreadPoolExecutor/runWorker
   ThreadPoolExecutor.java:  624  java.util.concurrent.ThreadPoolExecutor$Worker/run
               Thread.java:  748  java.lang.Thread/run

1. Caused by java.lang.NoClassDefFoundError
   Could not initialize class com.jogamp.newt.NewtFactory

         PSurfaceJOGL.java:  498  processing.opengl.PSurfaceJOGL/initIcons
         PSurfaceJOGL.java:  134  processing.opengl.PSurfaceJOGL/initFrame
              PApplet.java:10880  processing.core.PApplet/initSurface
                       nil:   -1  quil.Applet/initSurface
              PApplet.java:10767  processing.core.PApplet/runSketch
                applet.clj:   81  quil.applet/applet-run
                applet.clj:   78  quil.applet/applet-run
                applet.clj:  324  quil.applet/applet
                applet.clj:  265  quil.applet/applet
               RestFn.java:  137  clojure.lang.RestFn/applyTo
             Compiler.java: 3695  clojure.lang.Compiler$InvokeExpr/eval
             Compiler.java:  457  clojure.lang.Compiler$DefExpr/eval
             Compiler.java: 7067  clojure.lang.Compiler/eval
             Compiler.java: 7514  clojure.lang.Compiler/load
                      REPL:    1  user/eval8012
                      REPL:    1  user/eval8012
             Compiler.java: 7062  clojure.lang.Compiler/eval
             Compiler.java: 7025  clojure.lang.Compiler/eval
                  core.clj: 3206  clojure.core/eval
                  core.clj: 3202  clojure.core/eval
                  main.clj:  243  clojure.main/repl/read-eval-print/fn
                  main.clj:  243  clojure.main/repl/read-eval-print
                  main.clj:  261  clojure.main/repl/fn
                  main.clj:  261  clojure.main/repl
                  main.clj:  177  clojure.main/repl
               RestFn.java: 1523  clojure.lang.RestFn/invoke
    interruptible_eval.clj:   87  clojure.tools.nrepl.middleware.interruptible-eval/evaluate/fn
                  AFn.java:  152  clojure.lang.AFn/applyToHelper
                  AFn.java:  144  clojure.lang.AFn/applyTo
                  core.clj:  657  clojure.core/apply
                  core.clj: 1965  clojure.core/with-bindings*
                  core.clj: 1965  clojure.core/with-bindings*
               RestFn.java:  425  clojure.lang.RestFn/invoke
    interruptible_eval.clj:   85  clojure.tools.nrepl.middleware.interruptible-eval/evaluate
    interruptible_eval.clj:   55  clojure.tools.nrepl.middleware.interruptible-eval/evaluate
    interruptible_eval.clj:  222  clojure.tools.nrepl.middleware.interruptible-eval/interruptible-eval/fn/fn
    interruptible_eval.clj:  190  clojure.tools.nrepl.middleware.interruptible-eval/run-next/fn
                  AFn.java:   22  clojure.lang.AFn/run
   ThreadPoolExecutor.java: 1149  java.util.concurrent.ThreadPoolExecutor/runWorker
   ThreadPoolExecutor.java:  624  java.util.concurrent.ThreadPoolExecutor$Worker/run
               Thread.java:  748  java.lang.Thread/run

Is there any way around this? I found this related wiki article, I'm not sure how to read this though. Is the JOGL-dependency inherited by Processing? Do I have any way to have different versions of the same dependency coexist maybe?

It might be worth mentioning that fat jars are discouraged in the JOGL wik. Very well possible that the decision to use those was made for good reasons and fully aware of this though.

rrrnld commented 6 years ago

lein deps:

 [clojure-complete "0.2.4" :exclusions [[org.clojure/clojure]]]
 [org.clojure/clojure "1.9.0"]
   [org.clojure/core.specs.alpha "0.1.24"]
   [org.clojure/spec.alpha "0.1.143"]
 [org.clojure/tools.nrepl "0.2.12" :exclusions [[org.clojure/clojure]]]
 [quil "2.8.0"]
   [com.lowagie/itext "2.1.7"]
     [bouncycastle/bcmail-jdk14 "138"]
     [bouncycastle/bcprov-jdk14 "138"]
     [org.bouncycastle/bctsp-jdk14 "1.38"]
       [org.bouncycastle/bcmail-jdk14 "1.38"]
       [org.bouncycastle/bcprov-jdk14 "1.38"]
   [org.apache.xmlgraphics/batik-dom "1.8"]
     [org.apache.xmlgraphics/batik-css "1.8"]
     [org.apache.xmlgraphics/batik-ext "1.8"]
     [org.apache.xmlgraphics/batik-xml "1.8"]
     [xalan "2.7.0"]
     [xml-apis/xml-apis-ext "1.3.04"]
   [org.apache.xmlgraphics/batik-svggen "1.8"]
     [org.apache.xmlgraphics/batik-awt-util "1.8"]
     [org.apache.xmlgraphics/batik-util "1.8"]
     [xml-apis "1.3.04"]
   [quil/gluegen-rt-fat "2.3.2"]
   [quil/jogl-all-fat "2.3.2"]
   [quil/processing-core "3.3.7"]
   [quil/processing-dxf "3.3.7"]
   [quil/processing-js "1.6.6.0"]
   [quil/processing-pdf "3.3.7"]
   [quil/processing-svg "3.3.7"]
 [thi.ng/geom "1.0.0-RC3"]
   [cljs-log "0.2.2"]
     [environ "1.0.0"]
   [hiccup "1.0.5"]
   [org.clojure/clojurescript "1.10.238"]
     [com.cognitect/transit-clj "0.8.300" :exclusions [[org.clojure/clojure]]]
       [com.cognitect/transit-java "0.8.324"]
         [com.fasterxml.jackson.core/jackson-core "2.8.7"]
         [commons-codec "1.10"]
         [org.msgpack/msgpack "0.6.12"]
           [com.googlecode.json-simple/json-simple "1.1.1" :exclusions [[junit]]]
           [org.javassist/javassist "3.18.1-GA"]
     [com.google.javascript/closure-compiler-unshaded "v20180204"]
       [args4j "2.33"]
       [com.google.code.findbugs/jsr305 "3.0.1"]
       [com.google.code.gson/gson "2.7"]
       [com.google.errorprone/error_prone_annotations "2.0.18"]
       [com.google.guava/guava "22.0"]
         [com.google.j2objc/j2objc-annotations "1.1"]
         [org.codehaus.mojo/animal-sniffer-annotations "1.14"]
       [com.google.javascript/closure-compiler-externs "v20180204"]
       [com.google.jsinterop/jsinterop-annotations "1.0.0"]
       [com.google.protobuf/protobuf-java "3.0.2"]
     [org.clojure/data.json "0.2.6"]
     [org.clojure/google-closure-library "0.0-20170809-b9c14c6b"]
       [org.clojure/google-closure-library-third-party "0.0-20170809-b9c14c6b"]
     [org.clojure/tools.reader "1.3.0-alpha3"]
     [org.mozilla/rhino "1.7R5"]
   [org.jogamp.gluegen/gluegen-rt "2.3.2"]
   [org.jogamp.jogl/jogl-all "2.3.2"]
   [thi.ng/color "1.2.0"]
   [thi.ng/dstruct "0.2.1"]
   [thi.ng/math "0.2.1"]
   [thi.ng/ndarray "0.3.2"]
   [thi.ng/shadergraph "0.3.0"]
     [com.postspectacular/dependency "0.1.2"]
   [thi.ng/strf "0.2.2"]
   [thi.ng/typedarrays "0.1.6"]
   [thi.ng/xerror "0.1.0"]
rrrnld commented 6 years ago

Explicitly adding these dependencies to my project.clj fixed it (on my linux laptop):

[org.jogamp.gluegen/gluegen-rt "2.3.2" :classifier "natives-linux-amd64"]
[org.jogamp.jogl/jogl-all "2.3.2" :classifier "natives-linux-amd64"]

So I'm not really sure anymore if this is an error or an issue, really. Maybe it helps other people dealing with this though.

postspectacular commented 6 years ago

FWIW w/ thi.ng/geom I made the decision to only add the JOGL native deps as :dev-dependencies in order to avoid users having to download these large jars for every platform. Hence adding them explicitly in user projects is required (see note here), though I'm also confused why that's still the case when used w/ quil, which seems to bundle natives directly via the fat jar approach...

nbeloglazov commented 5 years ago

Another "fix" is to exclude org.jogamp pulled by thi.ng/geom:

  :exclusions [
    org.jogamp.jogl/jogl-all
    org.jogamp.gluegen/gluegen-rt]

My guess that jogl/gluegen provided by thi.ng/geom is somehow discovered first and switches to some other mode that of looking up native dependencies. I remember going through jogamp code once figuring out how they load dependencies.

The rationale behind Quil's decision to use fat jar is somewhat the opposite: I didn't want users to do anything special beside including quil as dependency. Quil should be easy-to-use for people who might not be very familiar with clojure/leiningen so I sacrificed bandwidth for simplicity. Another reason for the fat jar is that it makes 'lein uberjar' possible out of box.