Issue
I'm trying to build the android example from tensorflow but keep running into an annoying build error. My steps so far:
- installed android studio for the SDK. (v24)
- downloaded android NDK 10e (other versions don't seem to work)
- aditionally installed SDK build tools 23.0.1 (v24 doesn't seem to work)
- added an assets folder to the android example with the inception model
- edited the WORKSPACE file to point to the NDK/SDK locations.
I tried several versions of TF, but I keep getting the error. Any ideas?
The error:
C++ compilation of rule '@protobuf//:protobuf' failed: namespace-sandbox failed: error executing command /home/sander/.cache/bazel/_bazel_sander/577a8dcd97360f56540bc1f3f08ac240/tf-cat-face/_bin/namespace-sandbox ... (remaining 51 argument(s) skipped).
src/main/tools/namespace-sandbox.c:697: execvp(argv[0], argv): No such file or directory
Target //tensorflow/examples/android:tensorflow_demo failed to build
Use --verbose_failures to see the command lines of failed build steps.
Solution
Bazel creates a sandbox for each compilation step, so your build doesn't include anything unintentional. However, last time I checked, TF can't use the sandbox because its build isn't completely hermetic. The errors you're getting are sandboxing errors (it can't find something that's supposed to be in the sandbox) so you can turn the sandbox off with --genrule_strategy=standalone
and --spawn_strategy=standalone
flags, e.g.,
bazel build --genrule_strategy=standalone --spawn_strategy=standalone //path/to/your:target
Answered By - kristina
0 comments:
Post a Comment
Note: Only a member of this blog may post a comment.