TensorFlow 1.1依赖哪个版本的协议缓冲区?

时间:2017-05-16 15:15:25

标签: tensorflow protocol-buffers

目前还不清楚TensorFlow 1.1依赖的协议缓冲区版本。

此外,尝试从源代码构建TensorFlow 1.1,同时使用从源代码构建的protobuf 3.1,3.2或3.3失败。

我可以从源代码构建TensorFlow 1.1,只要我允许它构建自己的protobuf副本,但我宁愿它尽可能使用通用版本。

如果我从源代码构建protobuf 3.1然后尝试从源代码构建TensorFlow 1.1,我会收到以下错误:

ERROR: <snip>/.cache/bazel/_bazel_daniel/041a78b467f26d47aee0fcd68c1f3624/external/protobuf/BUILD:73:1: C++ compilation of rule '@protobuf//:protobuf_lite' failed: gcc failed: error executing command /usr/bin/gcc -U_FORTIFY_SOURCE -fstack-protector -Wall -B/usr/bin -B/usr/bin -Wunused-but-set-parameter -Wno-free-nonheap-object -fno-omit-frame-pointer -g0 -O2 '-D_FORTIFY_SOURCE=1' -DNDEBUG ... (remaining 45 argument(s) skipped): com.google.devtools.build.lib.shell.BadExitStatusException: Process exited with status 1.
external/protobuf/src/google/protobuf/wire_format_lite.cc:393:67: error: no 'void google::protobuf::internal::WireFormatLite::WriteFloatArray(const float*, int, google::protobuf::io::CodedOutputStream*)' member function declared in class 'google::protobuf::internal::WireFormatLite'
                                      io::CodedOutputStream* output) {
                                                                   ^
external/protobuf/src/google/protobuf/wire_format_lite.cc:398:67: error: no 'void google::protobuf::internal::WireFormatLite::WriteDoubleArray(const double*, int, google::protobuf::io::CodedOutputStream*)' member function declared in class 'google::protobuf::internal::WireFormatLite'
                                      io::CodedOutputStream* output) {
                                                                   ^
external/protobuf/src/google/protobuf/wire_format_lite.cc:403:67: error: no 'void google::protobuf::internal::WireFormatLite::WriteFixed32Array(const uint32*, int, google::protobuf::io::CodedOutputStream*)' member function declared in class 'google::protobuf::internal::WireFormatLite'
                                      io::CodedOutputStream* output) {
                                                                   ^
external/protobuf/src/google/protobuf/wire_format_lite.cc:408:69: error: no 'void google::protobuf::internal::WireFormatLite::WriteFixed64Array(const uint64*, int, google::protobuf::io::CodedOutputStream*)' member function declared in class 'google::protobuf::internal::WireFormatLite'
                                        io::CodedOutputStream* output) {
                                                                     ^
external/protobuf/src/google/protobuf/wire_format_lite.cc:413:69: error: no 'void google::protobuf::internal::WireFormatLite::WriteSFixed32Array(const int32*, int, google::protobuf::io::CodedOutputStream*)' member function declared in class 'google::protobuf::internal::WireFormatLite'
                                        io::CodedOutputStream* output) {
                                                                     ^
external/protobuf/src/google/protobuf/wire_format_lite.cc:418:69: error: no 'void google::protobuf::internal::WireFormatLite::WriteSFixed64Array(const int64*, int, google::protobuf::io::CodedOutputStream*)' member function declared in class 'google::protobuf::internal::WireFormatLite'
                                        io::CodedOutputStream* output) {
                                                                     ^
external/protobuf/src/google/protobuf/wire_format_lite.cc:423:66: error: no 'void google::protobuf::internal::WireFormatLite::WriteBoolArray(const bool*, int, google::protobuf::io::CodedOutputStream*)' member function declared in class 'google::protobuf::internal::WireFormatLite'
                                     io::CodedOutputStream* output) {
                                                                  ^
external/protobuf/src/google/protobuf/wire_format_lite.cc: In static member function 'static void google::protobuf::internal::WireFormatLite::WriteGroupMaybeToArray(int, const google::protobuf::MessageLite&, google::protobuf::io::CodedOutputStream*)':
external/protobuf/src/google/protobuf/wire_format_lite.cc:557:17: error: 'class google::protobuf::io::CodedOutputStream' has no member named 'IsSerializationDeterministic'
         output->IsSerializationDeterministic(), target);
                 ^
external/protobuf/src/google/protobuf/wire_format_lite.cc: In static member function 'static void google::protobuf::internal::WireFormatLite::WriteMessageMaybeToArray(int, const google::protobuf::MessageLite&, google::protobuf::io::CodedOutputStream*)':
external/protobuf/src/google/protobuf/wire_format_lite.cc:574:17: error: 'class google::protobuf::io::CodedOutputStream' has no member named 'IsSerializationDeterministic'
         output->IsSerializationDeterministic(), target);
                 ^
external/protobuf/src/google/protobuf/wire_format_lite.cc: At global scope:
external/protobuf/src/google/protobuf/wire_format_lite.cc:739:8: error: prototype for 'size_t google::protobuf::internal::WireFormatLite::Int32Size(const google::protobuf::RepeatedField<int>&)' does not match any in class 'google::protobuf::internal::WireFormatLite'
 size_t WireFormatLite::Int32Size(const RepeatedField<int32>& value) {
        ^
In file included from external/protobuf/src/google/protobuf/wire_format_lite.cc:35:0:
<snip>/source/protobuf/protobuf-3.1.0/inst/include/google/protobuf/wire_format_lite_inl.h:813:15: error: candidate is: static size_t google::protobuf::internal::WireFormatLite::Int32Size(google::protobuf::int32)
 inline size_t WireFormatLite::Int32Size(int32 value) {
               ^
external/protobuf/src/google/protobuf/wire_format_lite.cc:748:8: error: prototype for 'size_t google::protobuf::internal::WireFormatLite::UInt32Size(const google::protobuf::RepeatedField<unsigned int>&)' does not match any in class 'google::protobuf::internal::WireFormatLite'
 size_t WireFormatLite::UInt32Size(const RepeatedField<uint32>& value) {
        ^
In file included from external/protobuf/src/google/protobuf/wire_format_lite.cc:35:0:
<snip>/source/protobuf/protobuf-3.1.0/inst/include/google/protobuf/wire_format_lite_inl.h:819:15: error: candidate is: static size_t google::protobuf::internal::WireFormatLite::UInt32Size(google::protobuf::uint32)
 inline size_t WireFormatLite::UInt32Size(uint32 value) {
               ^
external/protobuf/src/google/protobuf/wire_format_lite.cc:757:8: error: prototype for 'size_t google::protobuf::internal::WireFormatLite::SInt32Size(const google::protobuf::RepeatedField<int>&)' does not match any in class 'google::protobuf::internal::WireFormatLite'
 size_t WireFormatLite::SInt32Size(const RepeatedField<int32>& value) {
        ^
In file included from external/protobuf/src/google/protobuf/wire_format_lite.cc:35:0:
<snip>/source/protobuf/protobuf-3.1.0/inst/include/google/protobuf/wire_format_lite_inl.h:825:15: error: candidate is: static size_t google::protobuf::internal::WireFormatLite::SInt32Size(google::protobuf::int32)
 inline size_t WireFormatLite::SInt32Size(int32 value) {
               ^
external/protobuf/src/google/protobuf/wire_format_lite.cc:766:8: error: prototype for 'size_t google::protobuf::internal::WireFormatLite::EnumSize(const google::protobuf::RepeatedField<int>&)' does not match any in class 'google::protobuf::internal::WireFormatLite'
 size_t WireFormatLite::EnumSize(const RepeatedField<int>& value) {
        ^
In file included from external/protobuf/src/google/protobuf/wire_format_lite.cc:35:0:
<snip>/source/protobuf/protobuf-3.1.0/inst/include/google/protobuf/wire_format_lite_inl.h:831:15: error: candidate is: static size_t google::protobuf::internal::WireFormatLite::EnumSize(int)
 inline size_t WireFormatLite::EnumSize(int value) {
               ^
Target //tensorflow/tools/pip_package:build_pip_package failed to build

如果我从源代码构建protobuf 3.2然后尝试从源代码构建TensorFlow 1.1,我会收到以下错误:

ERROR: <snip>/.cache/bazel/_bazel_daniel/041a78b467f26d47aee0fcd68c1f3624/external/protobuf/BUILD:113:1: C++ compilation of rule '@protobuf//:protobuf' failed: gcc failed: error executing command /usr/bin/gcc -U_FORTIFY_SOURCE -fstack-protector -Wall -B/usr/bin -B/usr/bin -Wunused-but-set-parameter -Wno-free-nonheap-object -fno-omit-frame-pointer -g0 -O2 '-D_FORTIFY_SOURCE=1' -DNDEBUG ... (remaining 43 argument(s) skipped): com.google.devtools.build.lib.shell.BadExitStatusException: Process exited with status 1.
external/protobuf/src/google/protobuf/util/json_util.cc:52:49: error: definition of implicitly-declared 'virtual google::protobuf::util::internal::ZeroCopyStreamByteSink::~ZeroCopyStreamByteSink()'
 ZeroCopyStreamByteSink::~ZeroCopyStreamByteSink() {
                                                 ^
external/protobuf/src/google/protobuf/util/json_util.cc: In member function 'virtual void google::protobuf::util::internal::ZeroCopyStreamByteSink::Append(const char*, size_t)':
external/protobuf/src/google/protobuf/util/json_util.cc:58:16: error: 'buffer_size_' was not declared in this scope
     if (len <= buffer_size_) {
                ^
external/protobuf/src/google/protobuf/util/json_util.cc:59:14: error: 'buffer_' was not declared in this scope
       memcpy(buffer_, bytes, len);
              ^
external/protobuf/src/google/protobuf/util/json_util.cc:64:12: error: 'buffer_' was not declared in this scope
     memcpy(buffer_, bytes, buffer_size_);
            ^
external/protobuf/src/google/protobuf/util/json_util.cc:64:28: error: 'buffer_size_' was not declared in this scope
     memcpy(buffer_, bytes, buffer_size_);
                            ^
external/protobuf/src/google/protobuf/util/json_util.cc: In function 'google::protobuf::util::Status google::protobuf::util::BinaryToJsonStream(google::protobuf::util::TypeResolver*, const string&, google::protobuf::io::ZeroCopyInputStream*, google::protobuf::io::ZeroCopyOutputStream*, const google::protobuf::util::JsonPrintOptions&)':
external/protobuf/src/google/protobuf/util/json_util.cc:85:47: error: 'const struct google::protobuf::util::JsonPrintOptions' has no member named 'always_print_enums_as_ints'
   proto_source.set_use_ints_for_enums(options.always_print_enums_as_ints);
                                               ^
Target //tensorflow/tools/pip_package:build_pip_package failed to build

如果我从源代码构建protobuf 3.3然后尝试从源代码构建TensorFlow 1.1,我会收到以下错误:

ERROR: <snip>/.cache/bazel/_bazel_daniel/041a78b467f26d47aee0fcd68c1f3624/external/protobuf/BUILD:73:1: C++ compilation of rule '@protobuf//:protobuf_lite' failed: gcc failed: error executing command /usr/bin/gcc -U_FORTIFY_SOURCE -fstack-protector -Wall -B/usr/bin -B/usr/bin -Wunused-but-set-parameter -Wno-free-nonheap-object -fno-omit-frame-pointer -g0 -O2 '-D_FORTIFY_SOURCE=1' -DNDEBUG ... (remaining 45 argument(s) skipped): com.google.devtools.build.lib.shell.BadExitStatusException: Process exited with status 1.
external/protobuf/src/google/protobuf/arenastring.cc:41:6: error: redefinition of 'void google::protobuf::internal::ArenaStringPtr::AssignWithDefault(const string*, google::protobuf::internal::ArenaStringPtr)'
 void ArenaStringPtr::AssignWithDefault(const ::std::string* default_value,
      ^
In file included from external/protobuf/src/google/protobuf/arenastring.cc:34:0:
<snip>/source/protobuf/protobuf-3.3.0/inst/include/google/protobuf/arenastring.h:316:13: note: 'void google::protobuf::internal::ArenaStringPtr::AssignWithDefault(const string*, google::protobuf::internal::ArenaStringPtr)' previously defined here
 inline void ArenaStringPtr::AssignWithDefault(const ::std::string* default_value,
             ^
Target //tensorflow/tools/pip_package:build_pip_package failed to build

0 个答案:

没有答案
相关问题