Hi,
I had no issues when compiling both py-faster-rcnn/lib and caffe-fast-rcnn. I've been able to successfully compile using CMake and the Makefile.config method. After making sure my PATH and PYTHONPATH vars were updated properly, I tried to run the demo...
$ python tools/demo.py
[libprotobuf ERROR google/protobuf/descriptor_database.cc:57] File already exists in database: caffe.proto
[libprotobuf FATAL google/protobuf/descriptor.cc:1018] CHECK failed: generated_database_->Add(encoded_file_descriptor, size):
terminate called after throwing an instance of 'google::protobuf::FatalException'
what(): CHECK failed: generated_database_->Add(encoded_file_descriptor, size):
Aborted
I've come across BVLC/caffe#1917 but wasn't sure how to approach fixing the "issue" - it seems like it was fixed in a subsequent version of caffe.
Any ideas?
So, I uninstalled the libprotobuf installed through apt (on debian jessie). I then compiled protobuf using https://github.com/google/protobuf. The only added instructions to that installation are to configure like this: ./configure --disable-shared CPPFLAGS="-fPIC" (that's an upper-case i, not a lower case L).
After the make and make install, I was able to compile using the CMake method just fine. The caffe tools all work...
The final thing I had to do was re-compile OpenCV, since it also relied on the original shared version of libprotobuf... This was only an issue when running the python codes...
The thing I'm mostly unsure about is why, on the same machine/OS, the master branch of BVLC/caffe worked just fine before this.
Feel free to reach out if you land here and are wrestling with the same issue.
I have the same issue with Caffe2.
@paulinder thanks, it works!
@paulinder is there a more detailed way of how u compiled the protobuf, thanks!
Most helpful comment
So, I uninstalled the libprotobuf installed through apt (on debian jessie). I then compiled protobuf using https://github.com/google/protobuf. The only added instructions to that installation are to configure like this:
./configure --disable-shared CPPFLAGS="-fPIC"(that's an upper-case i, not a lower case L).After the
makeandmake install, I was able to compile using the CMake method just fine. The caffe tools all work...The final thing I had to do was re-compile OpenCV, since it also relied on the original shared version of libprotobuf... This was only an issue when running the python codes...
The thing I'm mostly unsure about is why, on the same machine/OS, the master branch of BVLC/caffe worked just fine before this.
Feel free to reach out if you land here and are wrestling with the same issue.