Problem compiling

934 views
Skip to first unread message

Laura

unread,
Apr 22, 2015, 1:14:21 PM4/22/15
to caffe...@googlegroups.com
Hello, I'm trying to test a trained bvlc_caffenet_full_conv.prototxt to retrieve a "heatmap" of the likely location for my only trained class.
I've used this example, translated into C++, to transfer my training from the regular net to the fully convolutional and seems to work just fine since I can properly load the net with the training data and run forward on an image.

To retrieve the data I based my code on this sample posted here on this post. I know the code is outdated and several methods have been deprecated so they have been replaced with the proper methods to be used.
The problem appears when I try to retrieve the convolution result and convert it into a cv::Mat via a Datum.
When running Datum::clear_data() I get the following:

/usr/bin/ld: main.o: undefined reference to symbol '_ZN6google8protobuf8internal12kEmptyStringE'

//usr/lib/x86_64-linux-gnu/libprotobuf.so.8: error adding symbols: DSO missing from command line

collect2: error: ld returned 1 exit status


Which I believe means it can't find google::protobuf::internal::EmptyString() or something like that. Thinking that maybe it was a mostly trivial step I comment that like but when reaching datum::float_data() in DatumToCvMat I end up getting

/usr/bin/ld: main.o: undefined reference to symbol '_ZN6google8protobuf8internal11LogFinisheraSERNS1_10LogMessageE'

//usr/lib/x86_64-linux-gnu/libprotobuf.so.8: error adding symbols: DSO missing from command line

collect2: error: ld returned 1 exit status


Meaning there is something wrong with google::protobuf::internal::LogFinisher::LogMessage or something similar

The code is being compiled on ubuntu 14 without GPU, I didn't get any problems building caffe and haven't had any problems with it until now. Any idea on how may I fix this? I think it might be a missing package or some build flag I'm missing but I'm completely at a loss.

Thank you in advance for any help you can provide.

Laura

unread,
Apr 23, 2015, 9:37:03 AM4/23/15
to caffe...@googlegroups.com
 I found the problem, the linker needed this flags:
`pkg-config --libs protobuf`

Sorry for the noise.

Nikiforos Pittaras

unread,
Apr 23, 2015, 10:28:13 AM4/23/15
to caffe...@googlegroups.com
Don't forget to mark as complete.
Message has been deleted

Dheeraj Peri

unread,
Jun 21, 2017, 4:33:58 PM6/21/17
to Caffe Users
Hi Laura,

I'm facing a similar issue. I'm trying to do a make file to build the executables.

/usr/bin/ld: warning: libprotobuf.so.9, needed by /opt/lib-packages/caffe/build/lib/libcaffe.so, may conflict with libprotobuf.so.13
/usr/bin/ld: /home/peri044/Alaris/obj/dualImageDB/DebugLinux/dualImageDB.o: undefined reference to symbol '_ZNK6google8protobuf11MessageLite17SerializeToStringEPNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE'
//usr/lib/x86_64-linux-gnu/libprotobuf.so.9: error adding symbols: DSO missing from command line

Could you please tell me where and how to add the 'pkg-config --libs protobuf' flags which you were talking about?

Thanks
Reply all
Reply to author
Forward
0 new messages