0
votes

C:\Users\dulam\tensorflow>bazel build -c opt //tensorflow/examples/android:tensorflow_demo WARNING: C:/users/dulam/tensorflow/tensorflow/contrib/android/BUILD:58:12: in srcs attribute of android_library rule //tensorflow/contrib/android:android_tensorflow_inference_java: please do not import '//tensorflow/java:src/main/java/org/tensorflow/DataType.java' directly. You should either move the file to this package or depend on an appropriate rule there.

WARNING: C:/users/dulam/tensorflow/tensorflow/contrib/android/BUILD:58:12: in srcs attribute of android_library rule //tensorflow/contrib/android:android_tensorflow_inference_java: please do not import '//tensorflow/java:src/main/java/org/tensorflow/Graph.java' directly. You should either move the file to this package or depend on an appropriate rule there.

WARNING: C:/users/dulam/tensorflow/tensorflow/contrib/android/BUILD:58:12: in srcs attribute of android_library rule //tensorflow/contrib/android:android_tensorflow_inference_java: please do not import '//tensorflow/java:src/main/java/org/tensorflow/Input.java' directly. You should either move the file to this package or depend on an appropriate rule there.

WARNING: C:/users/dulam/tensorflow/tensorflow/contrib/android/BUILD:58:12: in srcs attribute of android_library rule //tensorflow/contrib/android:android_tensorflow_inference_java: please do not import '//tensorflow/java:src/main/java/org/tensorflow/NativeLibrary.java' directly. You should either move the file to this package or depend on an appropriate rule there.

WARNING: C:/users/dulam/tensorflow/tensorflow/contrib/android/BUILD:58:12: in srcs attribute of android_library rule //tensorflow/contrib/android:android_tensorflow_inference_java: please do not import '//tensorflow/java:src/main/java/org/tensorflow/Operation.java' directly. You should either move the file to this package or depend on an appropriate rule there.

WARNING: C:/users/dulam/tensorflow/tensorflow/contrib/android/BUILD:58:12: in srcs attribute of android_library rule //tensorflow/contrib/android:android_tensorflow_inference_java: please do not import '//tensorflow/java:src/main/java/org/tensorflow/OperationBuilder.java' directly. You should either move the file to this package or depend on an appropriate rule there.

WARNING: C:/users/dulam/tensorflow/tensorflow/contrib/android/BUILD:58:12: in srcs attribute of android_library rule //tensorflow/contrib/android:android_tensorflow_inference_java: please do not import '//tensorflow/java:src/main/java/org/tensorflow/Output.java' directly. You should either move the file to this package or depend on an appropriate rule there.WARNING: C:/users/dulam/tensorflow/tensorflow/contrib/android/BUILD:58:12: in srcs attribute of android_library rule //tensorflow/contrib/android:android_tensorflow_inference_java: please do not import '//tensorflow/java:src/main/java/org/tensorflow/SavedModelBundle.java' directly. You should either move the file to this package or depend on an appropriate rule there.

WARNING: C:/users/dulam/tensorflow/tensorflow/contrib/android/BUILD:58:12: in srcs attribute of android_library rule //tensorflow/contrib/android:android_tensorflow_inference_java: please do not import '//tensorflow/java:src/main/java/org/tensorflow/Session.java' directly. You should either move the file to this package or depend on an appropriate rule there.

WARNING: C:/users/dulam/tensorflow/tensorflow/contrib/android/BUILD:58:12: in srcs attribute of android_library rule //tensorflow/contrib/android:android_tensorflow_inference_java: please do not import '//tensorflow/java:src/main/java/org/tensorflow/Shape.java' directly. You should either move the file to this package or depend on an appropriate rule there.

WARNING: C:/users/dulam/tensorflow/tensorflow/contrib/android/BUILD:58:12: in srcs attribute of android_library rule //tensorflow/contrib/android:android_tensorflow_inference_java: please do not import '//tensorflow/java:src/main/java/org/tensorflow/Tensor.java' directly. You should either move the file to this package or depend on an appropriate rule there.WARNING: C:/users/dulam/tensorflow/tensorflow/contrib/android/BUILD:58:12: in srcs attribute of android_library rule //tensorflow/contrib/android:android_tensorflow_inference_java: please do not import '//tensorflow/java:src/main/java/org/tensorflow/TensorFlow.java' directly. You should either move the file to this package or depend on an appropriate rule there.

WARNING: C:/users/dulam/tensorflow/tensorflow/contrib/android/BUILD:58:12: in srcs attribute of android_library rule //tensorflow/contrib/android:android_tensorflow_inference_java: please do not import '//tensorflow/java:src/main/java/org/tensorflow/TensorFlowException.java' directly. You should either move the file to this package or depend on an appropriate rule there.

WARNING: C:/users/dulam/tensorflow/tensorflow/contrib/android/BUILD:58:12: in srcs attribute of android_library rule //tensorflow/contrib/android:android_tensorflow_inference_java: please do not import '//tensorflow/java:src/main/java/org/tensorflow/package-info.java' directly. You should either move the file to this package or depend on an appropriate rule there.

ERROR: C:/users/dulam/tensorflow/tensorflow/java/src/main/native/BUILD:19:1: error loading package 'tensorflow/c': Encountered error while reading extension file 'protobuf.bzl': no such package '@protobuf//': Traceback (most recent call last):
    File "C:/users/dulam/tensorflow/tensorflow/workspace.bzl", line 116
            _apply_patch(repo_ctx, repo_ctx.attr.patch_file)
    File "C:/users/dulam/tensorflow/tensorflow/workspace.bzl", line 107, in _apply_patch
            _execute_and_check_ret_code(repo_ctx, cmd)
    File "C:/users/dulam/tensorflow/tensorflow/workspace.bzl", line 91, in _execute_and_check_ret_code
            fail("Non-zero return code({1}) when ..., <2 more arguments>))

Non-zero return code(127) when executing 'C:\tools\msys64\usr\bin\bash.exe -c patch -p1 -d C:/users/dulam/appdata/local/temp/_bazel_dulam/ir1w5ngn/external/protobuf -i C:/users/dulam/tensorflow/third_party/protobuf/add_noinlines.patch':

Stdout:
Stderr: /usr/bin/bash: patch: command not found
and referenced by '//tensorflow/java/src/main/native:native'.
ERROR: Analysis of target '//tensorflow/examples/android:tensorflow_demo' 
failed; build aborted.
INFO: Elapsed time: 43.035s

How do to get the patch command on windows. My system OS is Windows 10.

1

1 Answers

0
votes

You need to use the pacman package manager in your MSYS2 shell to install patch:

  1. Open MSYS2 (from the Start Menu, or by running c:\tools\msys64\msys2.exe)
  2. Run this command:

    pacman -Syu patch