Skip to content
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

This build requires an Android SDK. Please add the android_sdk_repository rule to your WORKSPACE #14918

Closed
JoshVarty opened this issue Nov 27, 2017 · 14 comments
Assignees
Labels
comp:lite TF Lite related issues type:build/install Build and install issues

Comments

@JoshVarty
Copy link
Contributor

JoshVarty commented Nov 27, 2017

System information

  • Have I written custom code (as opposed to using a stock example script provided in TensorFlow): No
  • OS Platform and Distribution (e.g., Linux Ubuntu 16.04): Ubuntu 16.04 LTS
  • TensorFlow installed from (source or binary): Source
  • TensorFlow version (use command below): Master from November 17 (11eefcd)
  • Python version: 2.7
  • Bazel version (if compiling from source): 0.7.0
  • GCC/Compiler version (if compiling from source): gcc version 5.4.0 20160609
  • CUDA/cuDNN version: N/A (not trying to build Tensorflow GPU)
  • GPU model and memory:
  • Exact command to reproduce: sudo tensorflow/tools/ci_build/ci_build.sh CPU bazel test //tensorflow/...

Describe the problem

I am trying to run unit tests following the instructions here: https://github.com/tensorflow/tensorflow/blob/master/CONTRIBUTING.md#running-unit-tests

I have installed Docker and am running:
sudo tensorflow/tools/ci_build/ci_build.sh CPU bazel test //tensorflow/...

I receive the following error:

ERROR: /home/jovarty/git/tensorflow/bazel-ci_build-cache/.cache/bazel/_bazel_root/eab0d61a99b6696edb3d2aff87b585e8/external/bazel_tools/tools/android/BUILD:230:1: Executing genrule @bazel_tools//tools/android:no_android_sdk_repository_error failed (Exit 1): bash failed: error executing command
  (cd /home/jovarty/git/tensorflow/bazel-ci_build-cache/.cache/bazel/_bazel_root/eab0d61a99b6696edb3d2aff87b585e8/execroot/org_tensorflow && \
  exec env - \
    LD_LIBRARY_PATH='' \
    PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/snap/bin \
  /bin/bash -c 'source external/bazel_tools/tools/genrule/genrule-setup.sh; echo     This build requires an Android SDK. Please add the android_sdk_repository     rule to your WORKSPACE. ;     exit 1 ').

After this error I see that no tests were run: Executed 0 out of 1666 tests: 1666 were skipped.

Is the Android SDK required when running unit tests? Is this something that should be included in the Dockerfile? (I'm not very familiar with Docker)

@aselle aselle added the comp:lite TF Lite related issues label Nov 28, 2017
@aselle
Copy link
Contributor

aselle commented Nov 28, 2017

@angersson, I thought we had disabled these tests. Could you take a look please.

@aselle aselle added type:build/install Build and install issues stat:awaiting tensorflower Status - Awaiting response from tensorflower labels Nov 28, 2017
@JoshVarty
Copy link
Contributor Author

If you disabled them after November 17 (11eefcd) then I may just need to merge master into my branch. I'll give this a shot later tonight.

@angerson
Copy link
Contributor

angerson commented Nov 29, 2017

I've replicated this on a fresh pull from master:

git clone http://github.com/tensorflow/tensorflow /tmp/tf
cd /tmp/tf
git pull
tensorflow/tools/ci_build/ci_build.sh CPU bazel test //tensorflow/...

...but it's not replicating with:

docker run -it gcr.io/tensorflow/tensorflow:latest-devel bash
> cd /tensorflow/
> git pull
> bazel test //tensorflow/...

Still investigating -- might be a difference in Bazel versions?

@tensorflowbutler
Copy link
Member

It has been 14 days with no activity and this issue has an assignee.Please update the label and/or status accordingly.

@angerson
Copy link
Contributor

I tried to replicate this again (on the same command as earlier) and the tests still fail, but this time due to a different error:

ERROR: /workspace/tensorflow/contrib/lite/models/smartreply/demo/app/src/main/BUILD:50:1: C++ compilation of rule '//tensorflow/co
ntrib/lite/models/smartreply/demo/app/src/main:smartreply_jni_lib' failed (Exit 1).
tensorflow/contrib/lite/models/smartreply/demo/app/src/main/smartreply_jni.cc:16:17: fatal error: jni.h: No such file or directory
 #include <jni.h>
                 ^

These ci_build scripts aren't used much internally, so I'm not sure what's going on with them.

@tensorflowbutler
Copy link
Member

Nagging Assigneee: It has been 14 days with no activity and this issue has an assignee. Please update the label and/or status accordingly.

@tensorflowbutler tensorflowbutler removed the stat:awaiting tensorflower Status - Awaiting response from tensorflower label Jan 23, 2018
@tensorflowbutler
Copy link
Member

A member of the TensorFlow organization has replied after the stat:awaiting tensorflower label was applied.

@angerson
Copy link
Contributor

angerson commented Feb 3, 2018

@gunan are the "please run these tests" instructions still relevant? Maybe we should get rid of them.

@gunan
Copy link
Contributor

gunan commented Feb 5, 2018

We should still describe a way for contributors to test tensorflow locally.
I agree that those instructions may be stale, and we may need to rewrite them.

@tensorflowbutler
Copy link
Member

Nagging Assignee: It has been 14 days with no activity and this issue has an assignee. Please update the label and/or status accordingly.

@angerson
Copy link
Contributor

Agreed. I wonder what the best way to do so is -- probably to make Kokoro's testing scripts use Docker under the hood, so that everyone can run those tests locally.

Until then, I'm not sure maintaining the ci_build stuff is worth the opportunity cost. Is it just as effective to make a PR with no reviewers, since the tests will run then anyway? Local TDD should be possible without ci_build, right?

@tensorflowbutler
Copy link
Member

Nagging Assignee @angersson: It has been 14 days with no activity and this issue has an assignee. Please update the label and/or status accordingly.

1 similar comment
@tensorflowbutler
Copy link
Member

Nagging Assignee @angersson: It has been 14 days with no activity and this issue has an assignee. Please update the label and/or status accordingly.

@angerson
Copy link
Contributor

I can no longer replicate this particular error. Please comment if it comes up again.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
comp:lite TF Lite related issues type:build/install Build and install issues
Projects
None yet
Development

No branches or pull requests

5 participants