Failed native build on Ubuntu due to "missing" library liblwjgl.so
jeffersonheard opened this issue · 3 comments
jeffersonheard commented
I'm on Ubuntu 18.04. Executing clj -A:dev dev.clj native
gave me the following error:
Downloading: nightlight/nightlight/maven-metadata.xml from https://repo.clojars.org/
2019-04-13 09:41:58.328:INFO::main: Logging initialized @3736ms to org.eclipse.jetty.util.log.StdErrLog
Started Nightlight on http://localhost:4001
[LWJGL] Failed to load a library. Possible solutions:
a) Add the directory that contains the shared library to -Djava.library.path or -Dorg.lwjgl.librarypath.
b) Add the JAR that contains the shared library to the classpath.
[LWJGL] Enable debug mode with -Dorg.lwjgl.util.Debug=true for better diagnostics.
[LWJGL] Enable the SharedLibraryLoader debug mode with -Dorg.lwjgl.util.DebugLoader=true for better diagnostics.
Exception in thread "main" Syntax error compiling at (/home/jefferson/Projects/hello-world/dev.clj:33:1).
at clojure.lang.Compiler.load(Compiler.java:7647)
at clojure.lang.Compiler.loadFile(Compiler.java:7573)
at clojure.main$load_script.invokeStatic(main.clj:452)
at clojure.main$script_opt.invokeStatic(main.clj:512)
at clojure.main$script_opt.invoke(main.clj:507)
at clojure.main$main.invokeStatic(main.clj:598)
at clojure.main$main.doInvoke(main.clj:561)
at clojure.lang.RestFn.applyTo(RestFn.java:137)
at clojure.lang.Var.applyTo(Var.java:705)
at clojure.main.main(main.java:37)
Caused by: java.lang.UnsatisfiedLinkError: Failed to locate library: liblwjgl.so
at org.lwjgl.system.Library.loadSystem(Library.java:147)
at org.lwjgl.system.Library.loadSystem(Library.java:67)
at org.lwjgl.system.Library.<clinit>(Library.java:50)
at org.lwjgl.system.MemoryAccessJNI.<clinit>(MemoryAccessJNI.java:13)
at org.lwjgl.system.Pointer.<clinit>(Pointer.java:28)
at org.lwjgl.system.Platform.mapLibraryNameBundled(Platform.java:80)
at org.lwjgl.glfw.GLFW.<clinit>(GLFW.java:673)
at hello_world.start$_main.invokeStatic(start.clj:60)
at hello_world.start$_main.doInvoke(start.clj:60)
at clojure.lang.RestFn.invoke(RestFn.java:397)
at hello_world.start_dev$start.invokeStatic(start_dev.clj:10)
at hello_world.start_dev$start.invoke(start_dev.clj:7)
at user$eval27084$fn__27085.invoke(dev.clj:31)
at clojure.lang.MultiFn.invoke(MultiFn.java:229)
at user$eval27088.invokeStatic(dev.clj:33)
at user$eval27088.invoke(dev.clj:33)
at clojure.lang.Compiler.eval(Compiler.java:7176)
at clojure.lang.Compiler.load(Compiler.java:7635)
... 9 more
oakes commented
That is not the correct command; please see the readme file in the generated project. If you want to run the native version, you'll need to do clj -A:dev:linux dev.clj native
, and for the web version it is clj -A:dev dev.clj
.
jeffersonheard commented
Ah you're right. I was reading the README on play-cljc. Thank you!
oakes commented
Ah I see, I'll update the readme when I get the chance, to help avoid confusion. Thanks.