New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Android Camera Demo: Android NDK r11 can't be compiled by bazel after modified the WORKSPACE #1468

Closed
ghost opened this Issue Mar 12, 2016 · 2 comments

Comments

Projects
None yet
2 participants
@ghost

ghost commented Mar 12, 2016

GitHub issues are for bugs / installation problems / feature requests.
For general support from the community, see StackOverflow.
To make bugs and feature requests more easy to find and organize, we close issues that are deemed
out of scope for GitHub Issues and point people to StackOverflow.

For bugs or installation issues, please provide the following information.
The more information you provide, the more easily we will be able to offer
help and advice.

Environment info

Operating System:
OS X EI Capitan version 10.11.3

If installed from sources, provide the commit hash:
13ea3ca

Steps to reproduce

  1. Build TensorFlow without uncommenting the Android SDK and NDK parts successfully.
  2. We can
import tensorflow 

in python environment after step 1 and following installation steps.
4. Download SDK and NDK from what https://github.com/tensorflow/tensorflow/blob/master/tensorflow/examples/android/README.md suggested.
3. Uncomment the Android SDK and NDK repository in WORKSPACE and change the path.
4. Rebuild using

$ bazel build -c opt //tensorflow/tools/pip_package:build_pip_package

the console returns the error,

ERROR: .../tensorflow/WORKSPACE:10:1: no such package '@androidndk//': Could not read RELEASE.TXT in Android NDK: /private/var/tmp/.../49fff0428.../external/androidndk/ndk/RELEASE.TXT (No such file or directory) and referenced by '//external:android/crosstool'.

What have you tried?

  1. Commenting NDK repository and leave the SDK in TensorFlow WORKSPACE, build using
$ bazel build -c opt //tensorflow/tools/pip_package:build_pip_package

passed and without error.

2.Finding that Downloaded NDK and NDK in /private/var/tmp/.../49fff0428.../external/androidndk/ndk are the same. And there are no RELEASE.TXT in in directory.

Logs or other output that would be helpful

(If logs are large, please upload as attachment).

ERROR: .../tensorflow/WORKSPACE:10:1: no such package '@androidndk//': Could not read RELEASE.TXT in Android NDK: /private/var/tmp/.../49fff0428.../external/androidndk/ndk/RELEASE.TXT (No such file or directory) and referenced by '//external:android/crosstool'.

Is this error due to the codes or my building processes?

@moonboots

This comment has been minimized.

Contributor

moonboots commented Mar 14, 2016

I would try downgrading to the previous version of Android NDK (r10e). Here's the Mac OS X link: https://dl.google.com/android/ndk/android-ndk-r10e-darwin-x86.bin

I ran into similar issues using the latest version of Android NDK (r11) which no longer contains RELEASE.TXT. Manually creating that file with echo r11 > RELEASE.TXT fixed the immediate problem, but I ran into other bazel hard dependencies on r10e.

For linux users, here are the r10e 32/64 links, no longer listed on the Android NDK website but still accessible:
https://dl.google.com/android/ndk/android-ndk-r10e-linux-x86_64.bin
https://dl.google.com/android/ndk/android-ndk-r10e-linux-x86.bin
(Thanks Arch AUR)

@ghost

This comment has been minimized.

ghost commented Mar 14, 2016

@moonboots
Thank you for your detailed answers, it really helps me.
Android NDK (r10e) link for Mac OS X is:
https://dl.google.com/android/repository/android-ndk-r10e-darwin-x86_64.zip
We should also install Android SDK build tools version 23.0.1 via Android SDK manager to build the android example.

This issue was closed.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment