arm64 and x86_64 linux: TF java full native builds are failing to find the native headers
まだ誰も着手していません。
評価
- 難易度
- 4/5
- 見積もり時間
- 3〜5日
- 初心者へのやさしさ
- 35/100
- issue の種類
- バグ
- 明瞭さ
- 説明が足りない
- 活発さ
- 停滞
- 技術スタック
- java
- 領域
- build-system
調査の方向性
レポートに記載されている tensorflow-core のネイティブファイルと、v1.0.0-rc.1 のネイティブビルド用 Maven/Bazel コマンドから始めます。Linux arm64 でヘッダーが見つからないエラーを再現し、その後、報告されている x86_64 のケースとビルドの挙動を比較します。ネイティブ Java ビルドが依存関係を解決し、正常に完了すれば完了です。
索引モデルが issue の本文から書いたものです。
説明
Please make sure that this is a build/installation issue. As per our GitHub Policy, we only address code/doc bugs, performance issues, feature requests and build/installation issues on GitHub. tag:build_template
System information
- OS Platform and Distribution (e.g., Linux Ubuntu 16.04 x86_64): Linux Ubuntu 22.04, aarch64
- TensorFlow installed from (source or binary): Source
- TensorFlow version: TF version is v2.16.1, TF java version is tag: v1.0.0-rc.1
- Java version (i.e., the output of
java -version): openjdk 11.0.23 2024-04-16 - Java command line flags (e.g., GC parameters): mvn install -P native-build -Dbazel.build.flags='--verbose_failures -s --config=mkl_aarch64_threadpool' -X
- Installed from Maven Central?: No
- Bazel version (if compiling from source): bazel 6.5.0
- GCC/Compiler version (if compiling from source):gcc (Ubuntu 11.4.0-1ubuntu1~22.04) 11.4.0
- CUDA/cuDNN version: Not applicable
- GPU model and memory: Not applicable
Describe the problem
TensorFlow java source builds are failing on aarch64 linux system with the missing native headers. please let me know how it's built for x86_64 linux platform.
based on my debugging so far it looks like the dependency comes from this commit which added C API extension for custom gradient functions, and introduced these headers and .cc which requires several third_party libraries from tensorflow native but none of those bazel workspaces are cloned.
tensorflow-core/tensorflow-core-native/src/main/native/org/tensorflow/internal/c_api$
tfj_gradients.h tfj_gradients_impl.cc tfj_graph.h tfj_graph_impl.cc tfj_scope.h tfj_scope_impl.cc
I tried to manually clone the missing workspaces into bazel cache, but the cycle is never ending, it's missing tsl, eigen, ml_dtype, absl, protobuf, and now compiled headers for protobuf....
Provide the exact sequence of commands / steps that you executed before running into the problem
sudo apt-get install pkg-config ccache clang ant python3-pip swig git file wget unzip tar bzip2 gzip patch autoconf-archive autogen automake make cmake libtool bison flex perl nasm curl gfortran libasound2-dev freeglut3-dev libgtk2.0-dev libusb-dev zlib1g libffi-dev libbz2-dev zlib1g-dev
sudo apt install maven default-jdk
cd $HOME
mkdir bazel
cd bazel
wget https://github.com/bazelbuild/bazel/releases/download/6.5.0/bazel-6.5.0-linux-arm64
mv bazel-6.5.0-linux-arm64 bazel
chmod a+x bazel
export PATH=/home/ubuntu/bazel/:$PATH
# Build and install javacpp-presets.
# Clone the following forked repo to exclude the libraries that are not supported and not required
git clone https://github.com/snadampal/javacpp-presets.git
cd javacpp-presets
git checkout tfjava_aarch64
mvn install -Djavacpp.platform=linux-arm64 -Dmaven.javadoc.skip=true -X -T 16
# Build and install tensorflow java bindings
git clone https://github.com/tensorflow/java.git
cd java
git checkout v1.0.0-rc.1
mvn install -P native-build -Dbazel.build.flags='--verbose_failures -s --config=mkl_aarch64_threadpool' -X
Any other info / logs
Include any logs or source code that would be helpful to diagnose the problem. If including tracebacks, please include the full traceback. Large logs and files should be attached.
- 主要言語
- Java
- スター
- 928
- フォーク
- 227
- PR マージ指標
- 30日以内にマージされた PR はありません
コントリビューションガイド
はじめの一歩
- issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
- 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
- リポジトリをフォークし、ブランチを切って変更します。
- issue 番号を参照したプルリクエストを送ります。
tensorflow/java のほかの issue
-
難易度 2/5 1〜3時間 初心者へのやさしさ 65/100
tensorflow/java#653 · コメント 1 件 · リアクション 4 件 ·
-
難易度 5/5 1週間以上 初心者へのやさしさ 25/100
tensorflow/java#621 · コメント 4 件 ·
-
難易度 5/5 1週間以上 初心者へのやさしさ 25/100
tensorflow/java#617 · コメント 3 件 ·
-
難易度 2/5 1〜3時間 初心者へのやさしさ 55/100
tensorflow/java#615 · コメント 1 件 ·
-
難易度 5/5 1週間以上 初心者へのやさしさ 25/100
tensorflow/java#614 · コメント 1 件 ·
tensorflow/java の issue をすべて見る
似ている issue
-
bug untriaged
難易度 2/5 1〜3時間 初心者へのやさしさ 84/100
opensearch-project/ml-commons#5094 ·
-
bug
難易度 2/5 1〜3時間 初心者へのやさしさ 85/100
-
emitter:client:csharp feature
難易度 2/5 1〜3時間 初心者へのやさしさ 72/100
-
affects/8.10 affects/8.9 component/clients kind/bug likelihood/mid severity/mid
難易度 2/5 1〜3時間 初心者へのやさしさ 78/100
-
Two open-case totals on one screen: the Programs tile says 15,858 and the nav badge says 15,868 オープンbug frontend maui-pilot
難易度 2/5 1〜3時間 初心者へのやさしさ 72/100