DeepSort icon indicating copy to clipboard operation
DeepSort copied to clipboard

some problem with libtensorflow_cc.so

Open aimhabo opened this issue 7 years ago • 1 comments

Hello, I get tensorflow by 'git clone -b r1.9 --recurse-submodules

https://github.com/tensorflow/tensorflow'. and then './configure' with all N, only yes for cuda(9.0/7.1.2). and then 'bazel build --config=monolithic //tensorflow:libtensorflow_cc.so'.

In this situation, compiler says that "cannot find XXX.pb.h" in project DeepSort. 2018-07-12 16-08-52

so I generate them by 'protoc *.proto --cpp_out=./', 'protoc */*.proto --cpp_out=./', ''protoc */*/*.proto --cpp_out=./'' and so on. Then recompiling libtensorflow_cc.so

now the bazeling of libtensorflow_cc.so failed... it says that lots of private-member variable doesn't exist in those files, generated by protoc.

~/tensorflow $ bazel build --config=monolithic --config=cuda -c opt --verbose_failures //tensorflow:libtensorflow_cc.so WARNING: The following configs were expanded more than once: [cuda]. For repeatable flags, repeats are counted twice and may lead to unexpected behavior. INFO: Analysed target //tensorflow:libtensorflow_cc.so (0 packages loaded). INFO: Found 1 target... INFO: From ProtoCompile tensorflow/core/grappler/costs/op_performance_data.pb.cc: bazel-out/k8-opt/genfiles/external/protobuf_archive/src: warning: directory does not exist. bazel-out/k8-opt/genfiles/external/protobuf_archive/src: warning: directory does not exist. INFO: From ProtoCompile tensorflow/core/example/example.pb.cc: bazel-out/k8-opt/genfiles/external/protobuf_archive/src: warning: directory does not exist. ERROR: /home/aimhabo/tensorflow/tensorflow/core/BUILD:221:1: C++ compilation of rule '//tensorflow/core:protos_all_cc_impl' failed (Exit 1): crosstool_wrapper_driver_is_not_gcc failed: error executing command (cd /home/aimhabo/.cache/bazel/bazel_aimhabo/94b6a27f9d9a278b4559106953d7303d/execroot/org_tensorflow && exec env - LD_LIBRARY_PATH=/usr/local/cuda/lib64:/usr/local/cuda/extras/CUPTI/lib64:/home/aimhabo/nonmine-craft/distro/install/lib: PATH=/home/aimhabo/bin:/usr/local/cuda/bin:/home/aimhabo/nonmine-craft/distro/install/bin:/home/aimhabo/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/local/games:/snap/bin PWD=/proc/self/cwd external/local_config_cuda/crosstool/clang/bin/crosstool_wrapper_driver_is_not_gcc -U_FORTIFY_SOURCE '-D_FORTIFY_SOURCE=1' -fstack-protector -fPIE -Wall -Wunused-but-set-parameter -Wno-free-nonheap-object -fno-omit-frame-pointer -g0 -O2 -DNDEBUG -ffunction-sections -fdata-sections '-std=c++11' -MD -MF bazel-out/host/bin/tensorflow/core/objs/protos_all_cc_impl/tensorflow/core/framework/iterator.pb.d '-frandom-seed=bazel-out/host/bin/tensorflow/core/objs/protos_all_cc_impl/tensorflow/core/framework/iterator.pb.o' -iquote . -iquote bazel-out/host/genfiles -iquote external/protobuf_archive -iquote bazel-out/host/genfiles/external/protobuf_archive -iquote external/bazel_tools -iquote bazel-out/host/genfiles/external/bazel_tools -isystem external/protobuf_archive/src -isystem bazel-out/host/genfiles/external/protobuf_archive/src -isystem bazel-out/host/bin/external/protobuf_archive/src -g0 -DGEMMLOWP_ALLOW_SLOW_SCALAR_FALLBACK -g0 -Wno-unknown-warning-option -Wno-unused-but-set-variable -Wno-sign-compare -no-canonical-prefixes -Wno-builtin-macro-redefined '-D__DATE="redacted"' '-D__TIMESTAMP_="redacted"' '-D__TIME__="redacted"' -fno-canonical-system-headers -c bazel-out/host/genfiles/tensorflow/core/framework/iterator.pb.cc -o bazel-out/host/bin/tensorflow/core/_objs/protos_all_cc_impl/tensorflow/core/framework/iterator.pb.o) In file included from bazel-out/host/genfiles/tensorflow/core/framework/iterator.pb.cc:4:0: ./tensorflow/core/framework/iterator.pb.h:12:2: error: #error This file was generated by a newer version of protoc which is #error This file was generated by a newer version of protoc which is ^ ./tensorflow/core/framework/iterator.pb.h:13:2: error: #error incompatible with your Protocol Buffer headers. Please update #error incompatible with your Protocol Buffer headers. Please update ^ ./tensorflow/core/framework/iterator.pb.h:14:2: error: #error your headers. #error your headers. ^ In file included from bazel-out/host/genfiles/tensorflow/core/framework/iterator.pb.cc:4:0: ./tensorflow/core/framework/iterator.pb.h:215:41: error: 'CachedSize' in namespace 'google::protobuf::internal' does not name a type mutable ::google::protobuf::internal::CachedSize cached_size; ^ ./tensorflow/core/framework/iterator.pb.h: In member function 'virtual tensorflow::IteratorStateMetadata* tensorflow::IteratorStateMetadata::New() const': ./tensorflow/core/framework/iterator.pb.h:114:12: error: 'CreateMaybeMessage' was not declared in this scope return CreateMaybeMessage(NULL); ^ ./tensorflow/core/framework/iterator.pb.h:114:52: error: expected primary-expression before '>' token return CreateMaybeMessage(NULL); ^ ./tensorflow/core/framework/iterator.pb.h: In member function 'virtual tensorflow::IteratorStateMetadata* tensorflow::IteratorStateMetadata::New(google::protobuf::Arena*) const': ./tensorflow/core/framework/iterator.pb.h:118:12: error: 'CreateMaybeMessage' was not declared in this scope return CreateMaybeMessage(arena); ^ ./tensorflow/core/framework/iterator.pb.h:118:52: error: expected primary-expression before '>' token return CreateMaybeMessage(arena); ^ ./tensorflow/core/framework/iterator.pb.h: In member function 'virtual int tensorflow::IteratorStateMetadata::GetCachedSize() const': ./tensorflow/core/framework/iterator.pb.h:134:44: error: 'cached_size' was not declared in this scope int GetCachedSize() const final { return cached_size.Get(); } ^ bazel-out/host/genfiles/tensorflow/core/framework/iterator.pb.cc: In function 'void protobuf_tensorflow_2fcore_2fframework_2fiterator_2eproto::AddDescriptorsImpl()': bazel-out/host/genfiles/tensorflow/core/framework/iterator.pb.cc:90:16: error: 'InitDefaults' was not declared in this scope InitDefaults(); ^ bazel-out/host/genfiles/tensorflow/core/framework/iterator.pb.cc: In copy constructor 'tensorflow::IteratorStateMetadata::IteratorStateMetadata(const tensorflow::IteratorStateMetadata&)': bazel-out/host/genfiles/tensorflow/core/framework/iterator.pb.cc:147:7: error: class 'tensorflow::IteratorStateMetadata' does not have any field named 'cached_size' cached_size(0) { ^ bazel-out/host/genfiles/tensorflow/core/framework/iterator.pb.cc: In member function 'void tensorflow::IteratorStateMetadata::SharedCtor()': bazel-out/host/genfiles/tensorflow/core/framework/iterator.pb.cc:159:3: error: 'cached_size' was not declared in this scope cached_size = 0; ^ bazel-out/host/genfiles/tensorflow/core/framework/iterator.pb.cc: In member function 'virtual void tensorflow::IteratorStateMetadata::SetCachedSize(int) const': bazel-out/host/genfiles/tensorflow/core/framework/iterator.pb.cc:180:3: error: 'cached_size' was not declared in this scope cached_size = size; ^ bazel-out/host/genfiles/tensorflow/core/framework/iterator.pb.cc: In member function 'virtual size_t tensorflow::IteratorStateMetadata::ByteSizeLong() const': bazel-out/host/genfiles/tensorflow/core/framework/iterator.pb.cc:363:3: error: 'cached_size' was not declared in this scope cached_size = cached_size; ^ bazel-out/host/genfiles/tensorflow/core/framework/iterator.pb.cc: In member function 'void tensorflow::IteratorStateMetadata::InternalSwap(tensorflow::IteratorStateMetadata*)': bazel-out/host/genfiles/tensorflow/core/framework/iterator.pb.cc:438:8: error: 'cached_size' was not declared in this scope swap(cached_size, other->cached_size); ^ bazel-out/host/genfiles/tensorflow/core/framework/iterator.pb.cc:438:30: error: 'class tensorflow::IteratorStateMetadata' has no member named 'cached_size' swap(cached_size, other->cached_size); ^ At global scope: cc1plus: warning: unrecognized command line option '-Wno-unknown-warning-option' Target //tensorflow:libtensorflow_cc.so failed to build INFO: Elapsed time: 3.442s, Critical Path: 2.25s INFO: 4 processes, local. FAILED: Build did NOT complete successfully

Have you solved this problem? Or any inspiration for this problem

aimhabo avatar Jul 12 '18 07:07 aimhabo

I met the same problem as you, and I haven't solved yet. :(

bitzy avatar Jul 12 '18 08:07 bitzy