-
Notifications
You must be signed in to change notification settings - Fork 29
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
NoClassDefFoundError: org.jblas.NativeBlas? #3
Comments
Actually, simply cloning the clatrix repo and running lein test gives me this:
I have atlas installed, is this a path issue? Is libjblas_arch_flavor.jnilib/ a directory or a file, (it seems like it would be a file) and if so, is that trailing slash messing it up? |
I'm getting the same error when running |
I get a similar error as well, in a project that uses clatrix: $ lein repl
nREPL server started on port 57272
REPL-y 0.1.0-beta10
Clojure 1.4.0
...
user=> (require '[clatrix.core :as m])
nil
user=> (m/rnorm 5 5)
#<Matrix [5 5]>
user=> (m/* (m/rnorm 5 5) (m/rnorm 5 5))
-- org.jblas ERROR Couldn't load copied link file: java.lang.UnsatisfiedLinkError: /private/var/folders/p4/ykgp4h_973q9z3j0v_m1r8jc0000gn/T/jblas55269708383826120libjblas_arch_fla\
vor.jnilib: Library not loaded: /usr/local/lib/libgfortran.3.dylib Referenced from: /private/var/folders/p4/ykgp4h_973q9z3j0v_m1r8jc0000gn/T/jblas55269708383826120libjblas_arch\
_flavor.jnilib Reason: image not found.
UnsatisfiedLinkError org.jblas.util.ArchFlavor.SSELevel()I org.jblas.util.ArchFlavor.SSELevel (ArchFlavor.java:-2)
user=> quit
Bye for now!$ Is this just a jblas issue that I should talk to them about, or is there some workaround? |
I found a solution. If you download and unzip the pre-built jblas native libraries, find the files that it's complaining about, then just copy it into |
This seems to be an OSX issue. On linux, using the standard package, I don't observe the problem :( |
Yes, I looked at jblas source and this happens because of an extra IF statement for OSX which loads ArchFlavor. |
Thanks for the help guys! I was able to get my project working by putting the two files it wanted out of the prebuilt jblas jar (lib/static/Mac OS X/x86_64/libjblas_arch_flavor.jnilib and sse3/libjblas.jnilib) into some place on my project's class path (I just put them in resources for now.) |
@Quantisan: Where did you see the code in jblas that has an extra IF statement for OSX? I glanced at ArchFlavor and LibraryLoader and it looks right based on the paths in the resources folder. Is it somewhere in the native code? If you know where the problem is, maybe we can make a pull request for jblas? It looks like it may actually preferable to have these libraries on the path somewhere (https://github.com/mikiobraun/jblas/blob/master/src/main/java/org/jblas/util/ArchFlavor.java#L47-49) anyway so maybe we should mention this in the clatrix readme? |
@cbilson It works for me when I did |
@cbilson: Can you please update the docs with the solution you found and then we can close the issue ? |
jblas 1.2.2 fixed this issue |
Great, thanks Paul. |
Running the following code on a clean project throws this error (Mac OSX 10.6.8):
Could not initialize class org.jblas.NativeBlas
[Thrown class java.lang.NoClassDefFoundError]
Backtrace:
0: SimpleBlas.java:245 org.jblas.SimpleBlas.gemm
1: DoubleMatrix.java:1674 org.jblas.DoubleMatrix.mmuli
2: DoubleMatrix.java:3005 org.jblas.DoubleMatrix.mmul
3: core.clj:630 clatrix.core/*
Any ideas?
The text was updated successfully, but these errors were encountered: