larroy edited a comment on issue #13468: Running the mxnet scala jar in the interpreter throws an error URL: https://github.com/apache/incubator-mxnet/issues/13468#issuecomment-466559261 Thanks @zachgk @lanking520 and others. The assembly & core jar artifacts look much better now. This is certainly an improvement. I think linking with OpenCV statically would help, in Ubuntu 18.04 for example there's opencv 3.2 but not OpenCV 2.4 with results in being unable to load the library: ``` piotr@storage:130:~/devel/mxnet/scala-package (feature_discovery)+$ scala -cp ./assembly/target/mxnet-full_2.11-INTERNAL.jar Welcome to Scala 2.11.12 (OpenJDK 64-Bit Server VM, Java 10.0.2). Type in expressions for evaluation. Or try :help. scala> import org.apache.mxnet._ import org.apache.mxnet._ scala> val c = NDArray.array(Array(1.0, 2, 3, 4, 5, 6), shape = Shape(2, 3)) SLF4J: Failed to load class "org.slf4j.impl.StaticLoggerBinder". SLF4J: Defaulting to no-operation (NOP) logger implementation SLF4J: See http://www.slf4j.org/codes.html#StaticLoggerBinder for further details. java.lang.UnsatisfiedLinkError: /tmp/mxnet10078689559699346137/mxnet-scala: libopencv_core.so.2.4: cannot open shared object file: No such file or directory at java.base/java.lang.ClassLoader$NativeLibrary.load0(Native Method) at java.base/java.lang.ClassLoader$NativeLibrary.load(ClassLoader.java:2424) at java.base/java.lang.ClassLoader$NativeLibrary.loadLibrary(ClassLoader.java:2481) at java.base/java.lang.ClassLoader.loadLibrary0(ClassLoader.java:2678) at java.base/java.lang.ClassLoader.loadLibrary(ClassLoader.java:2611) at java.base/java.lang.Runtime.load0(Runtime.java:814) at java.base/java.lang.System.load(System.java:1838) at org.apache.mxnet.util.NativeLibraryLoader$.loadLibraryFromFile(NativeLibraryLoader.scala:131) at org.apache.mxnet.util.NativeLibraryLoader$.loadLibrary(NativeLibraryLoader.scala:99) at org.apache.mxnet.Base$.<init>(Base.scala:77) at org.apache.mxnet.Base$.<clinit>(Base.scala) at org.apache.mxnet.NDArray$.initNDArrayModule(NDArray.scala:165) at org.apache.mxnet.NDArray$.<init>(NDArray.scala:42) at org.apache.mxnet.NDArray$.<clinit>(NDArray.scala) ... 32 elided scala> ``` ``` $ lsb_release -a No LSB modules are available. Distributor ID: Ubuntu Description: Ubuntu 18.04.1 LTS Release: 18.04 Codename: bionic ```
---------------------------------------------------------------- This is an automated message from the Apache Git Service. To respond to the message, please log on GitHub and use the URL above to go to the specific comment. For queries about this service, please contact Infrastructure at: [email protected] With regards, Apache Git Services
