freeze_graphコマンドが必要になったので、
git clone してきたTensorFlowのルートフォルダで以下のコマンドを実行しました。
shell
1bazel build tensorflow/python/tools:freeze_graph
しかし、以下のようなエラーが出てしまいました。
shell
1~/.../external/grpc/BUILD:284:1: C++ compilation of rule '@grpc//:grpc' failed (Exit 1)
これはbazelが悪いのでしょうか?
正直、クローンしてビルドコマンド打っただけなのでエラーが入り込む理由が分かりません。
ローカルの環境が悪いということなのでしょうか?
詳しい方ご教授願います。
###エラー詳細
shell
1/usr/local/include/memory.h:66:1: error: unknown type name 'EIGEN_DEVICE_FUNC' 2EIGEN_DEVICE_FUNC 3^ 4/usr/local/include/memory.h:67:1: error: expected unqualified-id 5inline void throw_std_bad_alloc() 6^ 7/usr/local/include/memory.h:86:43: error: no type named 'size_t' in namespace 'std' 8inline void* handmade_aligned_malloc(std::size_t size) 9 ~~~~~^ 10/usr/local/include/memory.h:88:37: error: use of undeclared identifier 'EIGEN_DEFAULT_ALIGN_BYTES' 11 void *original = std::malloc(size+EIGEN_DEFAULT_ALIGN_BYTES); 12 ^ 13/usr/local/include/memory.h:88:25: error: no member named 'malloc' in namespace 'std' 14 void *original = std::malloc(size+EIGEN_DEFAULT_ALIGN_BYTES); 15 ~~~~~^ 16/usr/local/include/memory.h:90:66: error: no type named 'size_t' in namespace 'std' 17 void *aligned = reinterpret_cast<void*>((reinterpret_cast<std::size_t>(original) & ~(std::size_t(EIGEN_DEFAULT_ALIGN_BYTES-1))) + EIGEN_DEFAULT_ALIGN_BYTES); 18 ~~~~~^ 19/usr/local/include/memory.h:90:93: error: no member named 'size_t' in namespace 'std' 20 void *aligned = reinterpret_cast<void*>((reinterpret_cast<std::size_t>(original) & ~(std::size_t(EIGEN_DEFAULT_ALIGN_BYTES-1))) + EIGEN_DEFAULT_ALIGN_BYTES); 21 ~~~~~^ 22/usr/local/include/memory.h:90:100: error: use of undeclared identifier 'EIGEN_DEFAULT_ALIGN_BYTES' 23 void *aligned = reinterpret_cast<void*>((reinterpret_cast<std::size_t>(original) & ~(std::size_t(EIGEN_DEFAULT_ALIGN_BYTES-1))) + EIGEN_DEFAULT_ALIGN_BYTES); 24 ^ 25/usr/local/include/memory.h:90:133: error: use of undeclared identifier 'EIGEN_DEFAULT_ALIGN_BYTES' 26 void *aligned = reinterpret_cast<void*>((reinterpret_cast<std::size_t>(original) & ~(std::size_t(EIGEN_DEFAULT_ALIGN_BYTES-1))) + EIGEN_DEFAULT_ALIGN_BYTES); 27 ^ 28/usr/local/include/memory.h:98:17: error: no member named 'free' in namespace 'std' 29 if (ptr) std::free(*(reinterpret_cast<void**>(ptr) - 1)); 30 ~~~~~^ 31/usr/local/include/memory.h:106:55: error: no type named 'size_t' in namespace 'std' 32inline void* handmade_aligned_realloc(void* ptr, std::size_t size, std::size_t = 0) 33 ~~~~~^ 34/usr/local/include/memory.h:106:73: error: no type named 'size_t' in namespace 'std' 35inline void* handmade_aligned_realloc(void* ptr, std::size_t size, std::size_t = 0) 36 ~~~~~^ 37/usr/local/include/memory.h:110:8: error: no type named 'ptrdiff_t' in namespace 'std' 38 std::ptrdiff_t previous_offset = static_cast<char *>(ptr)-static_cast<char *>(original); 39 ~~~~~^ 40/usr/local/include/memory.h:111:41: error: use of undeclared identifier 'EIGEN_DEFAULT_ALIGN_BYTES' 41 original = std::realloc(original,size+EIGEN_DEFAULT_ALIGN_BYTES); 42 ^ 43/usr/local/include/memory.h:111:19: error: no member named 'realloc' in namespace 'std' 44 original = std::realloc(original,size+EIGEN_DEFAULT_ALIGN_BYTES); 45 ~~~~~^ 46/usr/local/include/memory.h:113:66: error: no type named 'size_t' in namespace 'std' 47 void *aligned = reinterpret_cast<void*>((reinterpret_cast<std::size_t>(original) & ~(std::size_t(EIGEN_DEFAULT_ALIGN_BYTES-1))) + EIGEN_DEFAULT_ALIGN_BYTES); 48 ~~~~~^ 49/usr/local/include/memory.h:113:93: error: no member named 'size_t' in namespace 'std' 50 void *aligned = reinterpret_cast<void*>((reinterpret_cast<std::size_t>(original) & ~(std::size_t(EIGEN_DEFAULT_ALIGN_BYTES-1))) + EIGEN_DEFAULT_ALIGN_BYTES); 51 ~~~~~^ 52/usr/local/include/memory.h:113:100: error: use of undeclared identifier 'EIGEN_DEFAULT_ALIGN_BYTES' 53 void *aligned = reinterpret_cast<void*>((reinterpret_cast<std::size_t>(original) & ~(std::size_t(EIGEN_DEFAULT_ALIGN_BYTES-1))) + EIGEN_DEFAULT_ALIGN_BYTES); 54 ^ 55/usr/local/include/memory.h:113:133: error: use of undeclared identifier 'EIGEN_DEFAULT_ALIGN_BYTES' 56 void *aligned = reinterpret_cast<void*>((reinterpret_cast<std::size_t>(original) & ~(std::size_t(EIGEN_DEFAULT_ALIGN_BYTES-1))) + EIGEN_DEFAULT_ALIGN_BYTES); 57 ^ 58fatal error: too many errors emitted, stopping now [-ferror-limit=] 5920 errors generated. 60Target //tensorflow/python/tools:freeze_graph failed to build 61Use --verbose_failures to see the command lines of failed build steps.
###開発環境
Mac OS HighSierra
Python 3.6
あなたの回答
tips
プレビュー