tensorflow: Android demo: unable to build with Bazel, could not read RELEASE.TXT
Environment info
Operating System: Ubuntu 14.04 LTS 64-bit
Installed version of CUDA and cuDNN: none (not using GPU)
Steps to reproduce
Note: TensorFlow was installed previously.
- Install Bazel as instructed here: http://www.bazel.io/docs/install.html#install-on-ubuntu
- Install Android Studio (which includes the SDK).
- Install Android NDK through the Android Studio SDK Manager.
- Download and unzip the TensorFlow graph as instructed here: https://github.com/tensorflow/tensorflow/blob/master/tensorflow/examples/android/README.md
- Uncomment the Android entries in the WORKSPACE file and add in paths to the SDK and NDK (in my case, these were
/home/me/Android/Sdkand/home/me/android-studio/android-studio/plugins/android-ndk) - Run
$ bazel build //tensorflow/examples/android:tensorflow_demo
What have you tried?
- I’ve looked around, and my understanding is that the RELEASE.TXT file is not included in the most recent version of the Android NDK. Since the NDK installed via Android Studio is a .jar file, I wasn’t sure what to do with that, so I went to the path indicated by the terminal log and created a blank RELEASE.TXT file. This made no difference.
- According to #1468, it can be resolved by downgrading to an earlier version of the NDK which contains RELEASE.TXT. I downloaded the version of Bazel (for Linux) from the links given, but the downloaded file is a .bin, which is unusable to me. As such, I found this solution to be a dead end.
- Commenting out the NDK entry is said to resolve the issue, but I haven’t tried this yet, since I don’t know if it’ll cause more complications down the road.
Logs or other output that would be helpful
ERROR: no such package '@androidndk//': Could not read RELEASE.TXT in Android NDK: /home/me/.cache/bazel/_bazel_me/f3471be34d1e62bf21975aa777cedaa3/external/androidndk/ndk/RELEASE.TXT (No such file or directory).
ERROR: no such package '@androidndk//': Could not read RELEASE.TXT in Android NDK: /home/me/.cache/bazel/_bazel_me/f3471be34d1e62bf21975aa777cedaa3/external/androidndk/ndk/RELEASE.TXT (No such file or directory).
Is there another way to resolve this issue without downgrading or commenting out the NDK entry? If not, how can I install a previous version of Android NDK? Thanks in advance.
About this issue
- Original URL
- State: closed
- Created 8 years ago
- Reactions: 1
- Comments: 19 (9 by maintainers)
Now you’ve run into an outstanding TF issue 😃 https://github.com/tensorflow/tensorflow/issues/3374
I have a fix incoming, until then just run ./configure for a simple workaround.
Sounds like it. You can use
/home/me/Android/Sdk/tools/androidto confirm.There’s no problem having multiple Android api levels installed in your SDK, so you can use the
androidtool to install 23, or just change WORKSPACE to match what you have.