前提・実現したいこと
tensorflowのソースコードからtensowflow liteコンバータ(toco)をビルドする
環境:Win10 tensorflow1.5.0 bazel 0.9.0
発生している問題・エラーメッセージ
http://blog.gclue.com/?p=836
を参考にし、以下ビルドを行いましたがエラーが出ています。以下の通りです。
C:\tensorflow>bazel build //tensorflow/contrib/lite/toco:toco
ERROR: Skipping '//tensorflow/contrib/lite/toco:toco': error loading package 'tensorflow/contrib/lite/toco': Encountered error while reading extension file 'protobuf.bzl': no such package '@protobuf_archive//': Traceback (most recent call last):
File "C:/tensorflow/third_party/repo.bzl", line 88
_apply_patch(ctx, ctx.attr.patch_file)
File "C:/tensorflow/third_party/repo.bzl", line 59, in _apply_patch
_execute_and_check_ret_code(ctx, cmd)
File "C:/tensorflow/third_party/repo.bzl", line 44, in _execute_and_check_ret_code
fail("Non-zero return code({1}) when ...))
Non-zero return code(3) when executing 'C:\tools\msys64\usr\bin\bash.exe -c patch -p1 -d C:/users/r3pc/appdata/local/temp/_bazel_r3pc/x1e5egqw/external/protobuf_archive -i C:/tensorflow/third_party/protobuf/add_noinlines.patch':
Stdout: patching file src/google/protobuf/compiler/cpp/cpp_file.ccStderr: Assertion failed: hunk, file ../patch-2.5.9-src/patch.c, line 354
This application has requested the Runtime to terminate it in an unusual way.
Please contact the application's support team for more information.
WARNING: Target pattern parsing failed.
ERROR: error loading package 'tensorflow/contrib/lite/toco': Encountered error while reading extension file 'protobuf.bzl': no such package '@protobuf_archive//': Traceback (most recent call last):
File "C:/tensorflow/third_party/repo.bzl", line 88
_apply_patch(ctx, ctx.attr.patch_file)
File "C:/tensorflow/third_party/repo.bzl", line 59, in _apply_patch
_execute_and_check_ret_code(ctx, cmd)
File "C:/tensorflow/third_party/repo.bzl", line 44, in _execute_and_check_ret_code
fail("Non-zero return code({1}) when ...))
Non-zero return code(3) when executing 'C:\tools\msys64\usr\bin\bash.exe -c patch -p1 -d C:/users/r3pc/appdata/local/temp/_bazel_r3pc/x1e5egqw/external/protobuf_archive -i C:/tensorflow/third_party/protobuf/add_noinlines.patch':
Stdout: patching file src/google/protobuf/compiler/cpp/cpp_file.ccStderr: Assertion failed: hunk, file ../patch-2.5.9-src/patch.c, line 354
This application has requested the Runtime to terminate it in an unusual way.
Please contact the application's support team for more information.
INFO: Elapsed time: 24.003s
FAILED: Build did NOT complete successfully (0 packages loaded)
currently loading: tensorflow/contrib/lite/toco
やってみたこと その1 patchまわり (追記)
試験的に以下コマンドを打つと
patch -p1 -d
C:/users/r3pc/appdata/local/temp/_bazel_r3pc/x1e5egqw/external/protobuf_archive -i C:/tensorflow/third_party/protobuf/add_noinlines.patch
こうなります
patching file src/google/protobuf/compiler/cpp/cpp_file.cc
Assertion failed: hunk, file ../patch-2.5.9-src/patch.c, line 354
This application has requested the Runtime to terminate it in an unusual way.
Please contact the application's support team for more information.
試験的に後ろに --binary をつけてコマンドを打つと
patch -p1 -d C:/users/r3pc/appdata/local/temp/_bazel_r3pc/x1e5egqw/external/protobuf_archive -i C:/tensorflow/third_party/protobuf/add_noinlines.patch --binary
こうなります
patching file src/google/protobuf/compiler/cpp/cpp_file.cc
Hunk #1 succeeded at 750 with fuzz 1 (offset 193 lines).
Hunk #2 succeeded at 825 (offset 169 lines).
Hunk #3 succeeded at 906 with fuzz 2 (offset 169 lines).
ということで、--binary をスクリプトに入れると良いかもと思いましたが、どう入れれば良いのか分かりません。
回答2件
あなたの回答
tips
プレビュー
バッドをするには、ログインかつ
こちらの条件を満たす必要があります。