oakes/play-cljc

Can't run native version in Linux (Ubuntu 18.04)

Opened this issue · 18 comments

I get the following exception trying to run clj -A:dev native in an unmodified play-cljc checkout.

es@chu:~/src/hello-world$ clj -A:dev native
2019-09-14 01:43:49.690:INFO::main: Logging initialized @2944ms
Syntax error (ClassNotFoundException) compiling at (hello_world/utils.cljc:1:1).
org.lwjgl.stb.STBImage

Full report at:
/tmp/clojure-5737830634713817415.edn
es@chu:~/src/hello-world$ cat /tmp/clojure-5737830634713817415.edn
{:clojure.main/message
 "Syntax error (ClassNotFoundException) compiling at (hello_world/utils.cljc:1:1).\norg.lwjgl.stb.STBImage\n",
 :clojure.main/triage
 {:clojure.error/phase :compile-syntax-check,
  :clojure.error/line 1,
  :clojure.error/column 1,
  :clojure.error/source "utils.cljc",
  :clojure.error/path "hello_world/utils.cljc",
  :clojure.error/class java.lang.ClassNotFoundException,
  :clojure.error/cause "org.lwjgl.stb.STBImage"},
 :clojure.main/trace
 {:via
  [{:type clojure.lang.Compiler$CompilerException,
    :message "Syntax error compiling at (hello_world/utils.cljc:1:1).",
    :data
    {:clojure.error/phase :compile-syntax-check,
     :clojure.error/line 1,
     :clojure.error/column 1,
     :clojure.error/source "hello_world/utils.cljc"},
    :at [clojure.lang.Compiler load "Compiler.java" 7648]}
   {:type java.lang.ClassNotFoundException,
    :message "org.lwjgl.stb.STBImage",
    :at
    [java.net.URLClassLoader findClass "URLClassLoader.java" 382]}],
  :trace
  [[java.net.URLClassLoader findClass "URLClassLoader.java" 382]
   [clojure.lang.DynamicClassLoader
    findClass
    "DynamicClassLoader.java"
    69]
   [java.lang.ClassLoader loadClass "ClassLoader.java" 424]
   [clojure.lang.DynamicClassLoader
    loadClass
    "DynamicClassLoader.java"
    77]
   [java.lang.ClassLoader loadClass "ClassLoader.java" 357]
   [java.lang.Class forName0 "Class.java" -2]
   [java.lang.Class forName "Class.java" 348]
   [clojure.lang.RT classForName "RT.java" 2211]
   [clojure.lang.RT classForNameNonLoading "RT.java" 2224]
   [hello_world.utils$eval7688$loading__6721__auto____7689
    invoke
    "utils.cljc"
    1]
   [hello_world.utils$eval7688 invokeStatic "utils.cljc" 1]
   [hello_world.utils$eval7688 invoke "utils.cljc" 1]
   [clojure.lang.Compiler eval "Compiler.java" 7177]
   [clojure.lang.Compiler eval "Compiler.java" 7166]
   [clojure.lang.Compiler load "Compiler.java" 7636]
   [clojure.lang.RT loadResourceScript "RT.java" 381]
   [clojure.lang.RT loadResourceScript "RT.java" 372]
   [clojure.lang.RT load "RT.java" 459]
   [clojure.lang.RT load "RT.java" 424]
   [clojure.core$load$fn__6839 invoke "core.clj" 6126]
   [clojure.core$load invokeStatic "core.clj" 6125]
   [clojure.core$load doInvoke "core.clj" 6109]
   [clojure.lang.RestFn invoke "RestFn.java" 408]
   [clojure.core$load_one invokeStatic "core.clj" 5908]
   [clojure.core$load_one invoke "core.clj" 5903]
   [clojure.core$load_lib$fn__6780 invoke "core.clj" 5948]
   [clojure.core$load_lib invokeStatic "core.clj" 5947]
   [clojure.core$load_lib doInvoke "core.clj" 5928]
   [clojure.lang.RestFn applyTo "RestFn.java" 142]
   [clojure.core$apply invokeStatic "core.clj" 667]
   [clojure.core$load_libs invokeStatic "core.clj" 5985]
   [clojure.core$load_libs doInvoke "core.clj" 5969]
   [clojure.lang.RestFn applyTo "RestFn.java" 137]
   [clojure.core$apply invokeStatic "core.clj" 667]
   [clojure.core$require invokeStatic "core.clj" 6007]
   [clojure.core$require doInvoke "core.clj" 6007]
   [clojure.lang.RestFn invoke "RestFn.java" 512]
   [hello_world.core$eval7682$loading__6721__auto____7683
    invoke
    "core.cljc"
    1]
   [hello_world.core$eval7682 invokeStatic "core.cljc" 1]
   [hello_world.core$eval7682 invoke "core.cljc" 1]
   [clojure.lang.Compiler eval "Compiler.java" 7177]
   [clojure.lang.Compiler eval "Compiler.java" 7166]
   [clojure.lang.Compiler load "Compiler.java" 7636]
   [clojure.lang.RT loadResourceScript "RT.java" 381]
   [clojure.lang.RT loadResourceScript "RT.java" 372]
   [clojure.lang.RT load "RT.java" 459]
   [clojure.lang.RT load "RT.java" 424]
   [clojure.core$load$fn__6839 invoke "core.clj" 6126]
   [clojure.core$load invokeStatic "core.clj" 6125]
   [clojure.core$load doInvoke "core.clj" 6109]
   [clojure.lang.RestFn invoke "RestFn.java" 408]
   [clojure.core$load_one invokeStatic "core.clj" 5908]
   [clojure.core$load_one invoke "core.clj" 5903]
   [clojure.core$load_lib$fn__6780 invoke "core.clj" 5948]
   [clojure.core$load_lib invokeStatic "core.clj" 5947]
   [clojure.core$load_lib doInvoke "core.clj" 5928]
   [clojure.lang.RestFn applyTo "RestFn.java" 142]
   [clojure.core$apply invokeStatic "core.clj" 667]
   [clojure.core$load_libs invokeStatic "core.clj" 5985]
   [clojure.core$load_libs doInvoke "core.clj" 5969]
   [clojure.lang.RestFn applyTo "RestFn.java" 137]
   [clojure.core$apply invokeStatic "core.clj" 667]
   [clojure.core$require invokeStatic "core.clj" 6007]
   [clojure.core$require doInvoke "core.clj" 6007]
   [clojure.lang.RestFn invoke "RestFn.java" 436]
   [hello_world.start$eval7676$loading__6721__auto____7677
    invoke
    "start.clj"
    1]
   [hello_world.start$eval7676 invokeStatic "start.clj" 1]
   [hello_world.start$eval7676 invoke "start.clj" 1]
   [clojure.lang.Compiler eval "Compiler.java" 7177]
   [clojure.lang.Compiler eval "Compiler.java" 7166]
   [clojure.lang.Compiler load "Compiler.java" 7636]
   [clojure.lang.RT loadResourceScript "RT.java" 381]
   [clojure.lang.RT loadResourceScript "RT.java" 372]
   [clojure.lang.RT load "RT.java" 459]
   [clojure.lang.RT load "RT.java" 424]
   [clojure.core$load$fn__6839 invoke "core.clj" 6126]
   [clojure.core$load invokeStatic "core.clj" 6125]
   [clojure.core$load doInvoke "core.clj" 6109]
   [clojure.lang.RestFn invoke "RestFn.java" 408]
   [clojure.core$load_one invokeStatic "core.clj" 5908]
   [clojure.core$load_one invoke "core.clj" 5903]
   [clojure.core$load_lib$fn__6780 invoke "core.clj" 5948]
   [clojure.core$load_lib invokeStatic "core.clj" 5947]
   [clojure.core$load_lib doInvoke "core.clj" 5928]
   [clojure.lang.RestFn applyTo "RestFn.java" 142]
   [clojure.core$apply invokeStatic "core.clj" 667]
   [clojure.core$load_libs invokeStatic "core.clj" 5985]
   [clojure.core$load_libs doInvoke "core.clj" 5969]
   [clojure.lang.RestFn applyTo "RestFn.java" 137]
   [clojure.core$apply invokeStatic "core.clj" 667]
   [clojure.core$require invokeStatic "core.clj" 6007]
   [clojure.core$require doInvoke "core.clj" 6007]
   [clojure.lang.RestFn invoke "RestFn.java" 619]
   [hello_world.start_dev$eval7670$loading__6721__auto____7671
    invoke
    "start_dev.clj"
    1]
   [hello_world.start_dev$eval7670 invokeStatic "start_dev.clj" 1]
   [hello_world.start_dev$eval7670 invoke "start_dev.clj" 1]
   [clojure.lang.Compiler eval "Compiler.java" 7177]
   [clojure.lang.Compiler eval "Compiler.java" 7166]
   [clojure.lang.Compiler load "Compiler.java" 7636]
   [clojure.lang.RT loadResourceScript "RT.java" 381]
   [clojure.lang.RT loadResourceScript "RT.java" 372]
   [clojure.lang.RT load "RT.java" 459]
   [clojure.lang.RT load "RT.java" 424]
   [clojure.core$load$fn__6839 invoke "core.clj" 6126]
   [clojure.core$load invokeStatic "core.clj" 6125]
   [clojure.core$load doInvoke "core.clj" 6109]
   [clojure.lang.RestFn invoke "RestFn.java" 408]
   [clojure.core$load_one invokeStatic "core.clj" 5908]
   [clojure.core$load_one invoke "core.clj" 5903]
   [clojure.core$load_lib$fn__6780 invoke "core.clj" 5948]
   [clojure.core$load_lib invokeStatic "core.clj" 5947]
   [clojure.core$load_lib doInvoke "core.clj" 5928]
   [clojure.lang.RestFn applyTo "RestFn.java" 142]
   [clojure.core$apply invokeStatic "core.clj" 667]
   [clojure.core$load_libs invokeStatic "core.clj" 5985]
   [clojure.core$load_libs doInvoke "core.clj" 5969]
   [clojure.lang.RestFn applyTo "RestFn.java" 137]
   [clojure.core$apply invokeStatic "core.clj" 667]
   [clojure.core$require invokeStatic "core.clj" 6007]
   [clojure.core$require doInvoke "core.clj" 6007]
   [clojure.lang.RestFn invoke "RestFn.java" 408]
   [user$eval7666 invokeStatic "dev.clj" 23]
   [user$eval7666 invoke "dev.clj" 23]
   [clojure.lang.Compiler eval "Compiler.java" 7177]
   [clojure.lang.Compiler load "Compiler.java" 7636]
   [clojure.lang.Compiler loadFile "Compiler.java" 7574]
   [clojure.main$load_script invokeStatic "main.clj" 475]
   [clojure.main$script_opt invokeStatic "main.clj" 535]
   [clojure.main$script_opt invoke "main.clj" 530]
   [clojure.main$main invokeStatic "main.clj" 664]
   [clojure.main$main doInvoke "main.clj" 616]
   [clojure.lang.RestFn applyTo "RestFn.java" 137]
   [clojure.lang.Var applyTo "Var.java" 705]
   [clojure.main main "main.java" 40]],
  :cause "org.lwjgl.stb.STBImage",
  :phase :compile-syntax-check}}
oakes commented

Can you try clj -A:dev:play-cljc native ? That alias shouldn't be necessary because paravim is already brining in play-cljc and lwjgl but i'm curious if it makes a difference.

Yes, sorry, I had tried that but since it didn't fix the issue I didn't think it was helpful to mention.

This is what I get (well, initially I got the same error but about being unable to download some windows jar; I then commented out all windows and macos deps and tried again):

es@chu:~/src/hello-world$ clj -A:dev:play-cljc native
Error building classpath. Could not find artifact org.lwjgl:lwjgl-opengl$natives-linux:jar:3.2.3 in central (https://repo1.maven.org/maven2/)
org.eclipse.aether.resolution.ArtifactResolutionException: Could not find artifact org.lwjgl:lwjgl-opengl$natives-linux:jar:3.2.3 in central (https://repo1.maven.org/maven2/)
	at org.eclipse.aether.internal.impl.DefaultArtifactResolver.resolve(DefaultArtifactResolver.java:422)
	at org.eclipse.aether.internal.impl.DefaultArtifactResolver.resolveArtifacts(DefaultArtifactResolver.java:224)
	at org.eclipse.aether.internal.impl.DefaultArtifactResolver.resolveArtifact(DefaultArtifactResolver.java:201)
	at org.eclipse.aether.internal.impl.DefaultRepositorySystem.resolveArtifact(DefaultRepositorySystem.java:260)
	at clojure.tools.deps.alpha.extensions.maven$get_artifact.invokeStatic(maven.clj:95)
	at clojure.tools.deps.alpha.extensions.maven$get_artifact.invoke(maven.clj:91)
	at clojure.tools.deps.alpha.extensions.maven$eval698$fn__700.invoke(maven.clj:112)
	at clojure.lang.MultiFn.invoke(MultiFn.java:243)
	at clojure.tools.deps.alpha$lib_paths$fn__1068.invoke(alpha.clj:203)
	at clojure.core.protocols$iter_reduce.invokeStatic(protocols.clj:49)
	at clojure.core.protocols$fn__7839.invokeStatic(protocols.clj:75)
	at clojure.core.protocols$fn__7839.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$reduce.invoke(core.clj:6730)
	at clojure.tools.deps.alpha$lib_paths.invokeStatic(alpha.clj:199)
	at clojure.tools.deps.alpha$lib_paths.invoke(alpha.clj:197)
	at clojure.tools.deps.alpha$resolve_deps.invokeStatic(alpha.clj:229)
	at clojure.tools.deps.alpha$resolve_deps.invoke(alpha.clj:210)
	at clojure.tools.deps.alpha.script.make_classpath$create_classpath.invokeStatic(make_classpath.clj:59)
	at clojure.tools.deps.alpha.script.make_classpath$create_classpath.invoke(make_classpath.clj:52)
	at clojure.tools.deps.alpha.script.make_classpath$run.invokeStatic(make_classpath.clj:70)
	at clojure.tools.deps.alpha.script.make_classpath$run.invoke(make_classpath.clj:64)
	at clojure.tools.deps.alpha.script.make_classpath$_main.invokeStatic(make_classpath.clj:109)
	at clojure.tools.deps.alpha.script.make_classpath$_main.doInvoke(make_classpath.clj:84)
	at clojure.lang.RestFn.applyTo(RestFn.java:137)
	at clojure.lang.Var.applyTo(Var.java:702)
	at clojure.core$apply.invokeStatic(core.clj:657)
	at clojure.main$main_opt.invokeStatic(main.clj:317)
	at clojure.main$main_opt.invoke(main.clj:313)
	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: org.eclipse.aether.transfer.ArtifactNotFoundException: Could not find artifact org.lwjgl:lwjgl-opengl$natives-linux:jar:3.2.3 in central (https://repo1.maven.org/maven2/)
	at org.eclipse.aether.connector.basic.ArtifactTransportListener.transferFailed(ArtifactTransportListener.java:48)
	at org.eclipse.aether.connector.basic.BasicRepositoryConnector$TaskRunner.run(BasicRepositoryConnector.java:365)
	at org.eclipse.aether.util.concurrency.RunnableErrorForwarder$1.run(RunnableErrorForwarder.java:75)
	at org.eclipse.aether.connector.basic.BasicRepositoryConnector$DirectExecutor.execute(BasicRepositoryConnector.java:583)
	at org.eclipse.aether.connector.basic.BasicRepositoryConnector.get(BasicRepositoryConnector.java:259)
	at org.eclipse.aether.internal.impl.DefaultArtifactResolver.performDownloads(DefaultArtifactResolver.java:498)
	at org.eclipse.aether.internal.impl.DefaultArtifactResolver.resolve(DefaultArtifactResolver.java:399)
	... 34 more

Not sure that this will help more than distract, but last time I toyed with lwjgl in Linux this worked (but that was Leiningen -- shrug):

rogerallen/hello_lwjgl#8

oakes commented

I tried that, same error:

es@chu:~/src/hello-world$ rm -r ~/.clojure/.cpcache
es@chu:~/src/hello-world$ ls
deps.edn  dev.clj  dev.cljs.edn  figwheel-main.edn  prod.clj  project.clj  README.md  resources  src
es@chu:~/src/hello-world$ ls -a
.  ..  .cpcache  deps.edn  dev.clj  dev.cljs.edn  figwheel-main.edn  .gitignore  prod.clj  project.clj  README.md  resources  src
es@chu:~/src/hello-world$ rm .cpcache/
rm: non se pode eliminar '.cpcache/': É un directorio
es@chu:~/src/hello-world$ rm -rf .cpcache/
es@chu:~/src/hello-world$ clj -A:dev native
2019-09-14 02:50:26.734:INFO::main: Logging initialized @2959ms
Syntax error (ClassNotFoundException) compiling at (hello_world/utils.cljc:1:1).
org.lwjgl.stb.STBImage

Full report at:
/tmp/clojure-4447958053282960935.edn
oakes commented

So weird...it's not loading lwjgl onto your classpath. Have you had this problem before with other libraries ever? Do you have the latest clj tool version?

I don't recall having had this problem. I have the clj tool that comes with clojure 1.10.1.

oakes commented

Ha! I now tried the web version for the first time and see what happens:

es@chu:~/src/hello-world$ clj -A:dev
Downloading: org/lwjgl/lwjgl-opengl/3.2.3/lwjgl-opengl-3.2.3-natives-windows.jar from https://repo1.maven.org/maven2/
Downloading: org/lwjgl/lwjgl/3.2.3/lwjgl-3.2.3-natives-macos.jar from https://repo1.maven.org/maven2/
Downloading: org/lwjgl/lwjgl/3.2.3/lwjgl-3.2.3-natives-windows.jar from https://repo1.maven.org/maven2/
Downloading: org/lwjgl/lwjgl-stb/3.2.3/lwjgl-stb-3.2.3-natives-macos.jar from https://repo1.maven.org/maven2/
Downloading: org/lwjgl/lwjgl-opengl/3.2.3/lwjgl-opengl-3.2.3-natives-linux.jar from https://repo1.maven.org/maven2/
Downloading: org/lwjgl/lwjgl-opengl/3.2.3/lwjgl-opengl-3.2.3-natives-macos.jar from https://repo1.maven.org/maven2/
Downloading: org/lwjgl/lwjgl-stb/3.2.3/lwjgl-stb-3.2.3-natives-linux.jar from https://repo1.maven.org/maven2/
Downloading: org/lwjgl/lwjgl-glfw/3.2.3/lwjgl-glfw-3.2.3-natives-linux.jar from https://repo1.maven.org/maven2/
Downloading: org/lwjgl/lwjgl-glfw/3.2.3/lwjgl-glfw-3.2.3-natives-windows.jar from https://repo1.maven.org/maven2/
Downloading: org/lwjgl/lwjgl/3.2.3/lwjgl-3.2.3-natives-linux.jar from https://repo1.maven.org/maven2/
Downloading: org/lwjgl/lwjgl-glfw/3.2.3/lwjgl-glfw-3.2.3-natives-macos.jar from https://repo1.maven.org/maven2/
2019-09-14 04:43:45.065:INFO::main: Logging initialized @3030ms
[Figwheel] Validating figwheel-main.edn
[Figwheel] figwheel-main.edn is valid \(ツ)/
[Figwheel] Compiling build dev to "resources/public/main.js"
Sep 14, 2019 4:43:58 AM java.util.prefs.FileSystemPreferences$1 run
INFO: Created user preferences directory.
[Figwheel] Successfully compiled build dev to "resources/public/main.js" in 11.618 seconds.
[Figwheel] Watching paths: ("src") to compile build - dev
[Figwheel] Starting Server at http://localhost:9500
Opening URL http://localhost:9500

Then the browser comes up and I get a happy hopping penguin.

After that the native version works as well!

es@chu:~/src/hello-world$ clj -A:dev native
2019-09-14 04:44:27.365:INFO::main: Logging initialized @3113ms

(Cue happy hopping penguin in native OpenGL window.)

Another thing that might be helpful: I still had the macos and windows dependencies commented out when I run the above commands, yet I got native macos and windows binaries downloaded. So it seems these were pulled by paravim.

oakes commented

Wow, I'm even more intrigued now... Since you had the same alias, it should have pulled the same dependencies. The native argument is just passed to the build script, which happens after the classpath is formed as far as I know. I'm happy it works now though.

To further confuse things this is what happened the very first time I tried to run `clj -A:dev native':

es@chu:~/src/hello-world$ clj -A:dev native
Downloading: tile-soup/tile-soup/0.3.1/tile-soup-0.3.1.pom from https://repo.clojars.org/
Downloading: edna/edna/1.6.0/edna-1.6.0.pom from https://repo.clojars.org/
Downloading: org/clojure/clojurescript/1.10.520/clojurescript-1.10.520.pom from https://repo1.maven.org/maven2/
Downloading: com/bhauman/figwheel-main/0.2.0/figwheel-main-0.2.0.pom from https://repo.clojars.org/
Downloading: orchestra/orchestra/2018.12.06-2/orchestra-2018.12.06-2.pom from https://repo.clojars.org/
Downloading: expound/expound/0.7.2/expound-0.7.2.pom from https://repo.clojars.org/
Downloading: paravim/paravim/maven-metadata.xml from https://repo.clojars.org/
Downloading: paravim/paravim/0.3.0/paravim-0.3.0.pom from https://repo.clojars.org/
Downloading: org/clojure/data.xml/0.2.0-alpha6/data.xml-0.2.0-alpha6.pom from https://repo1.maven.org/maven2/
Downloading: org/clojure/data.codec/0.1.1/data.codec-0.1.1.pom from https://repo1.maven.org/maven2/
Downloading: org/clojars/oakes/alda-core/0.3.10-1/alda-core-0.3.10-1.pom from https://repo.clojars.org/
Downloading: org/clojars/oakes/sound-engine-clj/0.4.0-1/sound-engine-clj-0.4.0-1.pom from https://repo.clojars.org/
Downloading: org/clojars/oakes/meico/0.3.5-1/meico-0.3.5-1.pom from https://repo.clojars.org/
Downloading: defexample/defexample/1.7.0/defexample-1.7.0.pom from https://repo.clojars.org/
Downloading: org/bitbucket/daveyarwood/fluid-r3/0.1.1/fluid-r3-0.1.1.pom from https://repo1.maven.org/maven2/
Downloading: com/google/javascript/closure-compiler-unshaded/v20180805/closure-compiler-unshaded-v20180805.pom from https://repo1.maven.org/maven2/
Downloading: com/google/javascript/closure-compiler-main/v20180805/closure-compiler-main-v20180805.pom from https://repo1.maven.org/maven2/
Downloading: com/google/javascript/closure-compiler-parent/v20180805/closure-compiler-parent-v20180805.pom from https://repo1.maven.org/maven2/
Downloading: org/clojure/tools.reader/1.3.0/tools.reader-1.3.0.pom from https://repo1.maven.org/maven2/
Downloading: com/cognitect/transit-clj/0.8.309/transit-clj-0.8.309.pom from https://repo1.maven.org/maven2/
Downloading: com/bhauman/figwheel-repl/0.2.0/figwheel-repl-0.2.0.pom from https://repo.clojars.org/
Downloading: com/bhauman/figwheel-core/0.2.0/figwheel-core-0.2.0.pom from https://repo.clojars.org/
Downloading: com/bhauman/spell-spec/0.1.1/spell-spec-0.1.1.pom from https://repo.clojars.org/
Downloading: com/bhauman/cljs-test-display/0.1.1/cljs-test-display-0.1.1.pom from https://repo.clojars.org/
Downloading: ring/ring/1.7.0/ring-1.7.0.pom from https://repo.clojars.org/
Downloading: org/eclipse/jetty/websocket/websocket-servlet/9.2.24.v20180105/websocket-servlet-9.2.24.v20180105.pom from https://repo1.maven.org/maven2/
Downloading: org/eclipse/jetty/websocket/websocket-parent/9.2.24.v20180105/websocket-parent-9.2.24.v20180105.pom from https://repo1.maven.org/maven2/
Downloading: org/eclipse/jetty/jetty-project/9.2.24.v20180105/jetty-project-9.2.24.v20180105.pom from https://repo1.maven.org/maven2/
Downloading: org/eclipse/jetty/jetty-parent/23/jetty-parent-23.pom from https://repo1.maven.org/maven2/
Downloading: org/eclipse/jetty/websocket/websocket-server/9.2.24.v20180105/websocket-server-9.2.24.v20180105.pom from https://repo1.maven.org/maven2/
Downloading: org/lwjgl/lwjgl-stb/3.2.3/lwjgl-stb-3.2.3.pom from https://repo1.maven.org/maven2/
Downloading: parinferish/parinferish/0.6.3/parinferish-0.6.3.pom from https://repo.clojars.org/
Downloading: org/lwjgl/lwjgl-opengl/3.2.3/lwjgl-opengl-3.2.3.pom from https://repo1.maven.org/maven2/
Downloading: org/lwjgl/lwjgl/3.2.3/lwjgl-3.2.3.pom from https://repo1.maven.org/maven2/
Downloading: org/lwjgl/lwjgl-glfw/3.2.3/lwjgl-glfw-3.2.3.pom from https://repo1.maven.org/maven2/
Downloading: play-cljc/play-cljc/0.8.3/play-cljc-0.8.3.pom from https://repo.clojars.org/
Downloading: libvim-clj/libvim-clj/0.6.0/libvim-clj-0.6.0.pom from https://repo.clojars.org/
Downloading: com/rpl/specter/1.1.2/specter-1.1.2.pom from https://repo.clojars.org/
Downloading: org/clojars/oakes/core.rrb-vector/0.0.15-2019.09.02/core.rrb-vector-0.0.15-2019.09.02.pom from https://repo.clojars.org/
Downloading: org/clojure/core.async/0.4.500/core.async-0.4.500.pom from https://repo1.maven.org/maven2/
Downloading: org/clojure/core.async/0.3.443/core.async-0.3.443.pom from https://repo1.maven.org/maven2/
Downloading: djy/djy/0.1.4/djy-0.1.4.pom from https://repo.clojars.org/
Downloading: clj_manifest/clj_manifest/0.2.0/clj_manifest-0.2.0.pom from https://repo.clojars.org/
Downloading: com/jsyn/jsyn/20170328/jsyn-20170328.pom from https://repo.clojars.org/
Downloading: com/google/javascript/closure-compiler-externs/v20180805/closure-compiler-externs-v20180805.pom from https://repo1.maven.org/maven2/
Downloading: com/google/guava/guava/25.1-jre/guava-25.1-jre.pom from https://repo1.maven.org/maven2/
Downloading: com/google/guava/guava-parent/25.1-jre/guava-parent-25.1-jre.pom from https://repo1.maven.org/maven2/
Downloading: com/cognitect/transit-java/0.8.332/transit-java-0.8.332.pom from https://repo1.maven.org/maven2/
Downloading: ring/ring-core/1.7.0/ring-core-1.7.0.pom from https://repo.clojars.org/
Downloading: ring/ring-devel/1.7.0/ring-devel-1.7.0.pom from https://repo.clojars.org/
Downloading: ring/ring-jetty-adapter/1.7.0/ring-jetty-adapter-1.7.0.pom from https://repo.clojars.org/
Downloading: ring/ring-servlet/1.7.0/ring-servlet-1.7.0.pom from https://repo.clojars.org/
Downloading: org/eclipse/jetty/websocket/websocket-api/9.2.24.v20180105/websocket-api-9.2.24.v20180105.pom from https://repo1.maven.org/maven2/
Downloading: org/eclipse/jetty/websocket/websocket-common/9.2.24.v20180105/websocket-common-9.2.24.v20180105.pom from https://repo1.maven.org/maven2/
Downloading: org/eclipse/jetty/websocket/websocket-client/9.2.24.v20180105/websocket-client-9.2.24.v20180105.pom from https://repo1.maven.org/maven2/
Downloading: org/eclipse/jetty/jetty-servlet/9.2.24.v20180105/jetty-servlet-9.2.24.v20180105.pom from https://repo1.maven.org/maven2/
Downloading: org/eclipse/jetty/jetty-http/9.2.24.v20180105/jetty-http-9.2.24.v20180105.pom from https://repo1.maven.org/maven2/
Downloading: iglu/iglu/0.9.1/iglu-0.9.1.pom from https://repo.clojars.org/
Downloading: play-cljc/text/play-cljc.text/0.5.2/play-cljc.text-0.5.2.pom from https://repo.clojars.org/
Downloading: net/mikera/vectorz-clj/0.48.0/vectorz-clj-0.48.0.pom from https://repo.clojars.org/
Downloading: net/mikera/clojure-pom/0.6.0/clojure-pom-0.6.0.pom from https://repo.clojars.org/
Downloading: net/mikera/mikera-pom/0.6.0/mikera-pom-0.6.0.pom from https://repo1.maven.org/maven2/
Downloading: org/clojure/tools.analyzer.jvm/0.7.2/tools.analyzer.jvm-0.7.2.pom from https://repo1.maven.org/maven2/
Downloading: com/google/code/findbugs/jsr305/3.0.2/jsr305-3.0.2.pom from https://repo1.maven.org/maven2/
Downloading: org/checkerframework/checker-qual/2.0.0/checker-qual-2.0.0.pom from https://repo1.maven.org/maven2/
Downloading: com/google/errorprone/error_prone_annotations/2.1.3/error_prone_annotations-2.1.3.pom from https://repo1.maven.org/maven2/
Downloading: com/google/errorprone/error_prone_parent/2.1.3/error_prone_parent-2.1.3.pom from https://repo1.maven.org/maven2/
Downloading: com/fasterxml/jackson/core/jackson-core/2.8.7/jackson-core-2.8.7.pom from https://repo1.maven.org/maven2/
Downloading: com/fasterxml/jackson/jackson-parent/2.8/jackson-parent-2.8.pom from https://repo1.maven.org/maven2/
Downloading: com/fasterxml/oss-parent/27/oss-parent-27.pom from https://repo1.maven.org/maven2/
Downloading: org/msgpack/msgpack/0.6.12/msgpack-0.6.12.pom from https://repo1.maven.org/maven2/
Downloading: org/eclipse/jetty/jetty-server/9.2.24.v20180105/jetty-server-9.2.24.v20180105.pom from https://repo1.maven.org/maven2/
Downloading: org/eclipse/jetty/jetty-util/9.2.24.v20180105/jetty-util-9.2.24.v20180105.pom from https://repo1.maven.org/maven2/
Downloading: org/eclipse/jetty/jetty-io/9.2.24.v20180105/jetty-io-9.2.24.v20180105.pom from https://repo1.maven.org/maven2/
Downloading: org/eclipse/jetty/jetty-security/9.2.24.v20180105/jetty-security-9.2.24.v20180105.pom from https://repo1.maven.org/maven2/
Downloading: net/mikera/vectorz/0.66.0/vectorz-0.66.0.pom from https://repo1.maven.org/maven2/
Downloading: net/mikera/clojure-utils/0.8.0/clojure-utils-0.8.0.pom from https://repo.clojars.org/
Downloading: us/bpsm/edn-java/0.4.7/edn-java-0.4.7.pom from https://repo1.maven.org/maven2/
Downloading: net/mikera/randomz/0.3.0/randomz-0.3.0.pom from https://repo1.maven.org/maven2/
Downloading: net/mikera/mikera-pom/0.0.5/mikera-pom-0.0.5.pom from https://repo1.maven.org/maven2/
Downloading: net/mikera/mathz/0.3.0/mathz-0.3.0.pom from https://repo1.maven.org/maven2/
Downloading: com/cognitect/transit-java/0.8.332/transit-java-0.8.332.jar from https://repo1.maven.org/maven2/
Downloading: defexample/defexample/1.7.0/defexample-1.7.0.jar from https://repo.clojars.org/
Downloading: org/lwjgl/lwjgl-stb/3.2.3/lwjgl-stb-3.2.3-natives-windows.jar from https://repo1.maven.org/maven2/
Downloading: com/bhauman/cljs-test-display/0.1.1/cljs-test-display-0.1.1.jar from https://repo.clojars.org/
Downloading: com/bhauman/figwheel-repl/0.2.0/figwheel-repl-0.2.0.jar from https://repo.clojars.org/
Downloading: org/eclipse/jetty/jetty-servlet/9.2.24.v20180105/jetty-servlet-9.2.24.v20180105.jar from https://repo1.maven.org/maven2/
Downloading: ring/ring-devel/1.7.0/ring-devel-1.7.0.jar from https://repo.clojars.org/
Downloading: com/google/errorprone/error_prone_annotations/2.1.3/error_prone_annotations-2.1.3.jar from https://repo1.maven.org/maven2/
Downloading: libvim-clj/libvim-clj/0.6.0/libvim-clj-0.6.0.jar from https://repo.clojars.org/
Downloading: expound/expound/0.7.2/expound-0.7.2.jar from https://repo.clojars.org/
Downloading: us/bpsm/edn-java/0.4.7/edn-java-0.4.7.jar from https://repo1.maven.org/maven2/
Downloading: com/bhauman/figwheel-main/0.2.0/figwheel-main-0.2.0.jar from https://repo.clojars.org/
Downloading: org/eclipse/jetty/jetty-http/9.2.24.v20180105/jetty-http-9.2.24.v20180105.jar from https://repo1.maven.org/maven2/
Downloading: org/eclipse/jetty/jetty-util/9.2.24.v20180105/jetty-util-9.2.24.v20180105.jar from https://repo1.maven.org/maven2/
Downloading: com/taoensso/encore/2.91.0/encore-2.91.0.jar from https://repo.clojars.org/
Downloading: org/clojure/tools.analyzer.jvm/0.7.2/tools.analyzer.jvm-0.7.2.jar from https://repo1.maven.org/maven2/
Downloading: edna/edna/1.6.0/edna-1.6.0.jar from https://repo.clojars.org/
Downloading: com/jsyn/jsyn/20170328/jsyn-20170328.jar from https://repo.clojars.org/
Downloading: io/aviso/pretty/0.1.33/pretty-0.1.33.jar from https://repo.clojars.org/
Downloading: org/clojure/clojurescript/1.10.520/clojurescript-1.10.520.jar from https://repo1.maven.org/maven2/
Downloading: org/eclipse/jetty/websocket/websocket-api/9.2.24.v20180105/websocket-api-9.2.24.v20180105.jar from https://repo1.maven.org/maven2/
Downloading: ring/ring-jetty-adapter/1.7.0/ring-jetty-adapter-1.7.0.jar from https://repo.clojars.org/
Downloading: play-cljc/text/play-cljc.text/0.5.2/play-cljc.text-0.5.2.jar from https://repo.clojars.org/
Downloading: org/eclipse/jetty/websocket/websocket-client/9.2.24.v20180105/websocket-client-9.2.24.v20180105.jar from https://repo1.maven.org/maven2/
Downloading: com/fasterxml/jackson/core/jackson-core/2.8.7/jackson-core-2.8.7.jar from https://repo1.maven.org/maven2/
Downloading: org/eclipse/jetty/websocket/websocket-servlet/9.2.24.v20180105/websocket-servlet-9.2.24.v20180105.jar from https://repo1.maven.org/maven2/
Downloading: org/clojars/oakes/sound-engine-clj/0.4.0-1/sound-engine-clj-0.4.0-1.jar from https://repo.clojars.org/
Downloading: org/eclipse/jetty/jetty-security/9.2.24.v20180105/jetty-security-9.2.24.v20180105.jar from https://repo1.maven.org/maven2/
Downloading: net/mikera/clojure-utils/0.8.0/clojure-utils-0.8.0.jar from https://repo.clojars.org/
Downloading: org/clojars/oakes/meico/0.3.5-1/meico-0.3.5-1.jar from https://repo.clojars.org/
Downloading: org/lwjgl/lwjgl/3.2.3/lwjgl-3.2.3.jar from https://repo1.maven.org/maven2/
Downloading: paravim/paravim/0.3.0/paravim-0.3.0.jar from https://repo.clojars.org/
Downloading: djy/djy/0.1.4/djy-0.1.4.jar from https://repo.clojars.org/
Downloading: org/lwjgl/lwjgl-opengl/3.2.3/lwjgl-opengl-3.2.3.jar from https://repo1.maven.org/maven2/
Downloading: com/google/javascript/closure-compiler-externs/v20180805/closure-compiler-externs-v20180805.jar from https://repo1.maven.org/maven2/
Downloading: com/google/guava/guava/25.1-jre/guava-25.1-jre.jar from https://repo1.maven.org/maven2/
Downloading: org/clojure/data.xml/0.2.0-alpha6/data.xml-0.2.0-alpha6.jar from https://repo1.maven.org/maven2/
Downloading: clj_manifest/clj_manifest/0.2.0/clj_manifest-0.2.0.jar from https://repo.clojars.org/
Downloading: org/msgpack/msgpack/0.6.12/msgpack-0.6.12.jar from https://repo1.maven.org/maven2/
Downloading: orchestra/orchestra/2018.12.06-2/orchestra-2018.12.06-2.jar from https://repo.clojars.org/
Downloading: com/taoensso/timbre/4.10.0/timbre-4.10.0.jar from https://repo.clojars.org/
Downloading: com/cognitect/transit-clj/0.8.309/transit-clj-0.8.309.jar from https://repo1.maven.org/maven2/
Downloading: play-cljc/play-cljc/0.8.3/play-cljc-0.8.3.jar from https://repo.clojars.org/
Downloading: args4j/args4j/2.0.26/args4j-2.0.26.jar from https://repo1.maven.org/maven2/
Downloading: parinferish/parinferish/0.6.3/parinferish-0.6.3.jar from https://repo.clojars.org/
Downloading: com/bhauman/spell-spec/0.1.1/spell-spec-0.1.1.jar from https://repo.clojars.org/
Downloading: iglu/iglu/0.9.1/iglu-0.9.1.jar from https://repo.clojars.org/
Downloading: org/checkerframework/checker-qual/2.0.0/checker-qual-2.0.0.jar from https://repo1.maven.org/maven2/
Downloading: net/java/dev/jna/jna/3.2.2/jna-3.2.2.jar from https://repo1.maven.org/maven2/
Downloading: net/mikera/vectorz-clj/0.48.0/vectorz-clj-0.48.0.jar from https://repo.clojars.org/
Downloading: org/bitbucket/daveyarwood/fluid-r3/0.1.1/fluid-r3-0.1.1.jar from https://repo1.maven.org/maven2/
Downloading: com/bhauman/figwheel-core/0.2.0/figwheel-core-0.2.0.jar from https://repo.clojars.org/
Downloading: net/mikera/mathz/0.3.0/mathz-0.3.0.jar from https://repo1.maven.org/maven2/
Downloading: org/eclipse/jetty/jetty-io/9.2.24.v20180105/jetty-io-9.2.24.v20180105.jar from https://repo1.maven.org/maven2/
Downloading: org/clojure/tools.reader/1.3.0/tools.reader-1.3.0.jar from https://repo1.maven.org/maven2/
Downloading: net/mikera/vectorz/0.66.0/vectorz-0.66.0.jar from https://repo1.maven.org/maven2/
Downloading: org/clojars/oakes/alda-core/0.3.10-1/alda-core-0.3.10-1.jar from https://repo.clojars.org/
Downloading: tile-soup/tile-soup/0.3.1/tile-soup-0.3.1.jar from https://repo.clojars.org/
Downloading: com/rpl/specter/1.1.2/specter-1.1.2.jar from https://repo.clojars.org/
Downloading: org/clojars/oakes/core.rrb-vector/0.0.15-2019.09.02/core.rrb-vector-0.0.15-2019.09.02.jar from https://repo.clojars.org/
Downloading: com/google/javascript/closure-compiler-unshaded/v20180805/closure-compiler-unshaded-v20180805.jar from https://repo1.maven.org/maven2/
Downloading: org/eclipse/jetty/websocket/websocket-server/9.2.24.v20180105/websocket-server-9.2.24.v20180105.jar from https://repo1.maven.org/maven2/
Downloading: org/eclipse/jetty/websocket/websocket-common/9.2.24.v20180105/websocket-common-9.2.24.v20180105.jar from https://repo1.maven.org/maven2/
Downloading: net/mikera/randomz/0.3.0/randomz-0.3.0.jar from https://repo1.maven.org/maven2/
Downloading: ring/ring-servlet/1.7.0/ring-servlet-1.7.0.jar from https://repo.clojars.org/
Downloading: ring/ring/1.7.0/ring-1.7.0.jar from https://repo.clojars.org/
Downloading: org/eclipse/jetty/jetty-server/9.2.24.v20180105/jetty-server-9.2.24.v20180105.jar from https://repo1.maven.org/maven2/
Downloading: com/google/code/findbugs/jsr305/3.0.2/jsr305-3.0.2.jar from https://repo1.maven.org/maven2/
Downloading: ring/ring-core/1.7.0/ring-core-1.7.0.jar from https://repo.clojars.org/
Downloading: org/lwjgl/lwjgl-glfw/3.2.3/lwjgl-glfw-3.2.3.jar from https://repo1.maven.org/maven2/
Downloading: org/clojure/core.async/0.4.500/core.async-0.4.500.jar from https://repo1.maven.org/maven2/
Downloading: org/clojure/data.codec/0.1.1/data.codec-0.1.1.jar from https://repo1.maven.org/maven2/
2019-09-14 01:39:45.737:INFO::main: Logging initialized @3058ms
Syntax error (ClassNotFoundException) compiling at (hello_world/utils.cljc:1:1).
org.lwjgl.stb.STBImage

Full report at:
/tmp/clojure-2379523166808849711.edn

That is, various lwjgl jars were downloaded, but the only native binary jar was this one (the windows [?] version of STB):

Downloading: org/lwjgl/lwjgl-stb/3.2.3/lwjgl-stb-3.2.3-natives-windows.jar from https://repo1.maven.org/maven2/
oakes commented

I would add a note to the README with the workaround, should anyone encounter the same problem. Then this would become a minor annoyance at worst, .

.

For the record, the command in the README (clj -M:dev native) doesn't work on my machine, complains that figwheel can't be found.
clj -A:dev:play-cljc native works, after downloading the deps.

Looks like the other one doesn't even attempt downloading deps and then can't find them? This is on Manjaro Linux.

oakes commented

@goto-engineering maybe try updating clojure CLI. the -M option was added at some point so maybe your version doesn't support it.

Oh, no way, that worked. I was on 1.10.1 and it works with 1.10.3. I didn't think that such a small version change would make a difference.

Thanks!

edit:
What was super confusing was, it didn't say "what the heck is -M, I don't know that command" - it just did SOMETHING and then failed with an error about figwheel not being found. Was it just ignoring the -M part?!

oakes commented

Yeah it's not a great experience :( This was actually a breaking change because -A used to be used for this (and still can, i believe) but they decided to deprecate that and use -M for running stuff via a main function.