可以任意编译label.wave.cc文件



Linux 16.04

TensorFlow v2.3版

在TensorFlow中,我需要编译label_wav.cc文件。文件位置为tensorflow/examples/speech_commands/label_wav.cc

我得到这些错误:

/usr/local/include/tf/tensorflow/core/protobuf/config.pb.h:6451:21: error: ‘struct google::protobuf::internal::ArenaStringPtr’ has no member named ‘UnsafeArenaRelease’
return to_tensor_.UnsafeArenaRelease(&::google::protobuf::internal::GetEmptyS
^
/usr/local/include/tf/tensorflow/core/protobuf/config.pb.h: In member function ‘void tensorflow::TensorConnection::unsafe_arena_set_allocated_to_tensor(std::__cxx11::string*)’:
/usr/local/include/tf/tensorflow/core/protobuf/config.pb.h:6462:14: error: ‘struct google::protobuf::internal::ArenaStringPtr’ has no member named ‘UnsafeArenaSetAllocated’
to_tensor_.UnsafeArenaSetAllocated(&::google::protobuf::internal::GetEmptyStr
^
/usr/local/include/tf/tensorflow/core/protobuf/config.pb.h: In member function ‘int tensorflow::CallableOptions::feed_devices_size() const’:
/usr/local/include/tf/tensorflow/core/protobuf/config.pb.h:6779:24: error: request for member ‘size’ in ‘((const tensorflow::CallableOptions*)this)->tensorflow::CallableOptions::feed_devices_’, which is of non-class type ‘const int’
return feed_devices_.size();
^
/usr/local/include/tf/tensorflow/core/protobuf/config.pb.h: In member function ‘void tensorflow::CallableOptions::clear_feed_devices()’:
/usr/local/include/tf/tensorflow/core/protobuf/config.pb.h:6782:17: error: request for member ‘Clear’ in ‘((tensorflow::CallableOptions*)this)->tensorflow::CallableOptions::feed_devices_’, which is of non-class type ‘int’
feed_devices_.Clear();
^
/usr/local/include/tf/tensorflow/core/protobuf/config.pb.h: In member function ‘const google::protobuf::Map<std::__cxx11::basic_string<char>, std::__cxx11::basic_string<char> >& tensorflow::CallableOptions::feed_devices() const’:
/usr/local/include/tf/tensorflow/core/protobuf/config.pb.h:6787:24: error: request for member ‘GetMap’ in ‘((const tensorflow::CallableOptions*)this)->tensorflow::CallableOptions::feed_devices_’, which is of non-class type ‘const int’
return feed_devices_.GetMap();
^
/usr/local/include/tf/tensorflow/core/protobuf/config.pb.h: In member function ‘google::protobuf::Map<std::__cxx11::basic_string<char>, std::__cxx11::basic_string<char> >* tensorflow::CallableOptions::mutable_feed_devices()’:
/usr/local/include/tf/tensorflow/core/protobuf/config.pb.h:6792:24: error: request for member ‘MutableMap’ in ‘((tensorflow::CallableOptions*)this)->tensorflow::CallableOptions::feed_devices_’, which is of non-class type ‘int’
return feed_devices_.MutableMap();
^
/usr/local/include/tf/tensorflow/core/protobuf/config.pb.h: In member function ‘int tensorflow::CallableOptions::fetch_devices_size() const’:
/usr/local/include/tf/tensorflow/core/protobuf/config.pb.h:6797:25: error: request for member ‘size’ in ‘((const tensorflow::CallableOptions*)this)->tensorflow::CallableOptions::fetch_devices_’, which is of non-class type ‘const int’
return fetch_devices_.size();
^
/usr/local/include/tf/tensorflow/core/protobuf/config.pb.h: In member function ‘void tensorflow::CallableOptions::clear_fetch_devices()’:
/usr/local/include/tf/tensorflow/core/protobuf/config.pb.h:6800:18: error: request for member ‘Clear’ in ‘((tensorflow::CallableOptions*)this)->tensorflow::CallableOptions::fetch_devices_’, which is of non-class type ‘int’
fetch_devices_.Clear();
^
/usr/local/include/tf/tensorflow/core/protobuf/config.pb.h: In member function ‘const google::protobuf::Map<std::__cxx11::basic_string<char>, std::__cxx11::basic_string<char> >& tensorflow::CallableOptions::fetch_devices() const’:
/usr/local/include/tf/tensorflow/core/protobuf/config.pb.h:6805:25: error: request for member ‘GetMap’ in ‘((const tensorflow::CallableOptions*)this)->tensorflow::CallableOptions::fetch_devices_’, which is of non-class type ‘const int’
return fetch_devices_.GetMap();
^
/usr/local/include/tf/tensorflow/core/protobuf/config.pb.h: In member function ‘google::protobuf::Map<std::__cxx11::basic_string<char>, std::__cxx11::basic_string<char> >* tensorflow::CallableOptions::mutable_fetch_devices()’:
/usr/local/include/tf/tensorflow/core/protobuf/config.pb.h:6810:25: error: request for member ‘MutableMap’ in ‘((tensorflow::CallableOptions*)this)->tensorflow::CallableOptions::fetch_devices_’, which is of non-class type ‘int’
return fetch_devices_.MutableMap();
^
CMakeFiles/speech_recog.dir/build.make:62: recipe for target 'CMakeFiles/speech_recog.dir/label_wav.cc.o' failed
make[2]: *** [CMakeFiles/speech_recog.dir/label_wav.cc.o] Error 1
CMakeFiles/Makefile2:67: recipe for target 'CMakeFiles/speech_recog.dir/all' failed
make[1]: *** [CMakeFiles/speech_recog.dir/all] Error 2
Makefile:83: recipe for target 'all' failed
make: *** [all] Error 2

现在得到这些错误

扫描目标speech_recog的依赖项[50%]正在构建CXX对象CMakeFiles/speech_recog.dir/label_wav.cc.o[50%]链接CXX可执行程序speech_recogCMakeFiles/speech_recog.dir/label_wav.cc.o:在函数tensorflow::Status tensorflow::errors::NotFound<char const*, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >, char const*>(char const*, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >, char const*)': label_wav.cc:(.text._ZN10tensorflow6errors8NotFoundIJPKcNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEES3_EEENS_6StatusEDpT_[_ZN10tensorflow6errors8NotFoundIJPKcNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEES3_EEENS_6StatusEDpT_]+0xe5): undefined reference to中tensorflow::Status::StatusCMakeFiles/speech_recog.dir/label_wav.cc.o:在函数main': label_wav.cc:(.text.startup+0x1219): undefined reference to中tensorflow::TensorShapeBasetensorflow::TensorShape::TensorShapeBase(absl::Span('label.wav.cc:(.text.startup+0x1f55(:未定义对tensorflow::TensorShapeBase<tensorflow::TensorShape>::TensorShapeBase(absl::Span<long long const>)' label_wav.cc:(.text.startup+0x1fa8): undefined reference totensorflow的引用:TensorShapeBasetensorflow:TensorShape:TensorShapeBase(absl::Span('collect2:错误:ld返回1退出状态CMakeFiles/speech_recog.dir/build.make:114:目标"speech_recog"的配方失败make[2]:***[speech_recog]错误1CMakeFiles/Makefile2:67:目标"CMakeFiles/speech_recog.dir/all"的配方失败make[1]:***[CMakeFiles/speech_recog.dir/all]错误2Makefile:83:目标"all"的配方失败make:***[all]错误2

相关内容

  • 没有找到相关文章

最新更新