jblas-project / jblas

Linear Algebra for Java
http://jblas.org
BSD 3-Clause "New" or "Revised" License
590 stars 149 forks source link

Multi-target compile #106

Open MrSampson opened 6 years ago

MrSampson commented 6 years ago

I've compiled my own version of jblas for Linux on an Intel machine and when I copy the jar to another Intel machine it works fine. However, when I copy my jar file to an AMD machine and run the sanity check, I get the following error:

org.jblas` ERROR Couldn't load copied link file: java.lang.UnsatisfiedLinkError: /tmp/jblas7621733330875809942/libjblas_arch_flavor.so: libgfortran.so.4: cannot open shared object file: No such file or directory. which doesn't make any sense, because with the jblas jar from the website, the sanity check runs fine. -- org.jblas CONFIG Loading libjblas_arch_flavor.so from /lib/static/Linux/amd64/, copying to libjblas_arch_flavor.so. -- org.jblas CONFIG Loading libjblas.so from /lib/static/Linux/amd64/sse3/, copying to libjblas.so. checking matrix multiplication... ok checking existence of dsyev...... ok

And libgfortran3 is actually installed: apt list libgfortran3 Listing... Done libgfortran3/xenial-updates,xenial-security,now 5.4.0-6ubuntu1~16.04.9 amd64 [installed]

I suspect the problem is the Intel vs. AMD. (Thankfully it's only one operating system.) How do I build a jar for both?

mikiobraun commented 3 years ago

Sorry for the very late reply.

For what is worth, the link error seems to be for libgfortran4, not libgfortran3.

In any case, I just released a new version that bumps the dependency for libgfortran, but also includes it in the jar so you don't have to install it anymore. Let me know how it works.