java
java copied to clipboard
Linux ARM : aarch64 : CPU : Issue : Caused by: java.lang.UnsatisfiedLinkError: no tensorflow_cc in java.library.path
Added below Two Dependency in my java project , when we run the project in Linux ARM : aarch64 : CPU we are getting UnsatisfiedLinkError issue .
Dependency Added in Project
<dependency>
<groupId>org.tensorflow</groupId>
<artifactId>tensorflow-core-api</artifactId>
<version>0.3.1</version>
</dependency>
<dependency>
<groupId>org.tensorflow</groupId>
<artifactId>tensorflow-core-platform</artifactId>
<version>0.3.1</version>
</dependency>
Issue :
Warning: Could not load Loader: java.lang.UnsatisfiedLinkError: no jnijavacpp in java.library.path
Exception in thread "main" java.lang.UnsatisfiedLinkError: no jnitensorflow in java.library.path
at java.lang.ClassLoader.loadLibrary(ClassLoader.java:1860)
at java.lang.Runtime.loadLibrary0(Runtime.java:870)
at java.lang.System.loadLibrary(System.java:1124)
at org.bytedeco.javacpp.Loader.loadLibrary(Loader.java:1683)
at org.bytedeco.javacpp.Loader.load(Loader.java:1300)
at org.bytedeco.javacpp.Loader.load(Loader.java:1123)
at org.tensorflow.internal.c_api.global.tensorflow.
Please help and guide how to solve this issue in Linux ARM . i have checked in Windows and Linux X86 CPU its working fine
We don't provide binaries for ARM64. You should be able to compile them from source yourself on Linux, but it will take a while.
Could you please provide some reference and guide to build the ARM binary . Thanks for quick response
I believe there are ARM64 binaries for JavaCPP, so it's mainly compiling TensorFlow. To do that check out this project, install the right version of bazel & maven, then run mvn clean install with an internet connection (either non-proxied or with the proxy configured appropriately), and leave it alone for around 2-4 hours depending on how fast your machine is. We have some guidance on building from source here - https://github.com/tensorflow/java/blob/master/CONTRIBUTING.md#building.
I haven't tried to do this yet as I'm still waiting to get access to a Linux ARM64 box, so there might be some juggling of the bazel arguments in tensorflow-core/tensorflow-core-api/{.bazelrc,build.sh} necessary.
Google doesn't support builds of TF Core for ARM. The closest thing you'll get for free "support" is probably this: https://github.com/lhelontra/tensorflow-on-arm