tensorflow / tensorflow/java

Linux ARM : aarch64 : CPU : Issue : Caused by: java.lang.UnsatisfiedLinkError: no tensorflow_cc in java.library.path

Open
#339 4 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
Java
Stars
928
Forks
227
PR merge metrics
No merged PRs in 30d

Description

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.(tensorflow.java:12)
at java.lang.Class.forName0(Native Method)
at java.lang.Class.forName(Class.java:348)
at org.bytedeco.javacpp.Loader.load(Loader.java:1190)
at org.bytedeco.javacpp.Loader.load(Loader.java:1139)
at org.tensorflow.NativeLibrary.load(NativeLibrary.java:48)
at org.tensorflow.TensorFlow.init(TensorFlow.java:111)
at org.tensorflow.TensorFlow.(TensorFlow.java:126)
at org.tensorflow.Graph.(Graph.java:849)
at com.huawei.search.nlp.lang.th.TensorFlowTest.main(TensorFlowTest.java:28)
Caused by: java.lang.UnsatisfiedLinkError: no tensorflow_cc 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:1227)

Please help and guide how to solve this issue in Linux ARM .
i have checked in Windows and Linux X86 CPU its working fine

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start with the dependency declarations for tensorflow-core-api and tensorflow-core-platform version 0.3.1, then trace the native loading path from TensorFlowTest.java:28 through TensorFlow.init and NativeLibrary.load. Reproduce the failure on Linux ARM and compare the available native libraries with the x86 setup. Done means the TensorFlow Java example initializes without the reported UnsatisfiedLinkError.

Written by the indexing model from the issue text.

Assessment

Tech stack
java, tensorflow
Domain
machine-learning, operating-systems
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
28/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.