tiny-dnn
tiny-dnn copied to clipboard
how do I get caffe_converter.bin compiled
So after generating cc from protoc, how do I compile below two files. Compile tiny_dnn/io/caffe/caffe.pb.cc and examples/caffe_converter/caffe_converter.cpp and link them.
I saw few ppl raised this question , they have closed it mentioning resolved it.
I guess if someone helps with one line command to get the converter bin, can save few ppl time.
Thanks
I get error when I compile .o generated,
g++ -std=c++14 -I/home/user01/tinynn/tiny-dnn/ -o caffe_converterbn caffe.pb.o caffe_converter.cpp -lprotobuf -lpthread 2>&1 | tee build.log
): undefined reference to `google::protobuf::Arena::AddListNode(void*, void (*)(void*))'
caffe.pb.o: In function `google::protobuf::internal::GenericTypeHandler<caffe::ParamSpec>::New(google::protobuf::Arena*)':
caffe.pb.cc:(.text._ZN6google8protobuf8internal18GenericTypeHandlerIN5caffe9ParamSpecEE3NewEPNS0_5ArenaE[_ZN6google8protobuf8internal18GenericTypeHandlerIN5caffe9ParamSpecEE3NewEPNS0_5ArenaE]+0x63): undefined reference to `google::protobuf::Arena::AllocateAligned(std::type_info const*, unsigned long)'
caffe.pb.cc:(.text._ZN6google8protobuf8internal18GenericTypeHandlerIN5caffe9ParamSpecEE3NewEPNS0_5ArenaE[_ZN6google8protobuf8internal18GenericTypeHandlerIN5caffe9ParamSpecEE3NewEPNS0_5ArenaE]+0xb2): undefined reference to `google::protobuf::Arena::AddListNode(void*, void (*)(void*))'
caffe.pb.o: In function `google::protobuf::internal::GenericTypeHandler<caffe::NetStateRule>::New(google::protobuf::Arena*)':
caffe.pb.cc:(.text._ZN6google8protobuf8internal18GenericTypeHandlerIN5caffe12NetStateRuleEE3NewEPNS0_5ArenaE[_ZN6google8protobuf8internal18GenericTypeHandlerIN5caffe12NetStateRuleEE3NewEPNS0_5ArenaE]+0x63): undefined reference to `google::protobuf::Arena::AllocateAligned(std::type_info const*, unsigned long)'
caffe.pb.cc:(.text._ZN6google8protobuf8internal18GenericTypeHandlerIN5caffe12NetStateRuleEE3NewEPNS0_5ArenaE[_ZN6google8protobuf8internal18GenericTypeHandlerIN5caffe12NetStateRuleEE3NewEPNS0_5ArenaE]+0xb2): undefined reference to `google::protobuf::Arena::AddListNode(void*, void (*)(void*))'
caffe.pb.o: In function `google::protobuf::internal::GenericTypeHandler<caffe::FillerParameter>::New(google::protobuf::Arena*)':
caffe.pb.cc:(.text._ZN6google8protobuf8internal18GenericTypeHandlerIN5caffe15FillerParameterEE3NewEPNS0_5ArenaE[_ZN6google8protobuf8internal18GenericTypeHandlerIN5caffe15FillerParameterEE3NewEPNS0_5ArenaE]+0x63): undefined reference to `google::protobuf::Arena::AllocateAligned(std::type_info const*, unsigned long)'
caffe.pb.cc:(.text._ZN6google8protobuf8internal18GenericTypeHandlerIN5caffe15FillerParameterEE3NewEPNS0_5ArenaE[_ZN6google8protobuf8internal18GenericTypeHandlerIN5caffe15FillerParameterEE3NewEPNS0_5ArenaE]+0xb2): undefined reference to `google::protobuf::Arena::AddListNode(void*, void (*)(void*))'
caffe.pb.o:(.rodata._ZTVN5caffe14PReLUParameterE[_ZTVN5caffe14PReLUParameterE]+0xb0): undefined reference to `google::protobuf::Message::SpaceUsedLong() const'
caffe.pb.o:(.rodata._ZTVN5caffe16V0LayerParameterE[_ZTVN5caffe16V0LayerParameterE]+0xb0): undefined reference to `google::protobuf::Message::SpaceUsedLong() const'
caffe.pb.o:(.rodata._ZTVN5caffe16V1LayerParameterE[_ZTVN5caffe16V1LayerParameterE]+0xb0): undefined reference to `google::protobuf::Message::SpaceUsedLong() const'
caffe.pb.o:(.rodata._ZTVN5caffe12SPPParameterE[_ZTVN5caffe12SPPParameterE]+0xb0): undefined reference to `google::protobuf::Message::SpaceUsedLong() const'
caffe.pb.o:(.rodata._ZTVN5caffe19WindowDataParameterE[_ZTVN5caffe19WindowDataParameterE]+0xb0): undefined reference to `google::protobuf::Message::SpaceUsedLong() const'
caffe.pb.o:(.rodata._ZTVN5caffe18ThresholdParameterE[_ZTVN5caffe18ThresholdParameterE]+0xb0): more undefined references to `google::protobuf::Message::SpaceUsedLong() const' follow
Does it has anything to do with protobuf version,
Thanks
I think maybe this helps: https://github.com/tiny-dnn/tiny-dnn/issues/162