Hello,
I just install caffe on Ubuntu 16.04. There were some steps beyond what was described in the instructions, and I thought I'd post here in case it was helpful for others. This was the set of additional apt packages needed:
libprotobuf-dev libleveldb-dev libsnappy-dev libopencv-dev libhdf5-serial-dev protobuf-compiler
libboost-all-dev libatlas-base-dev libopenblas-dev libgflags-dev libhdf5-dev liblmdb-dev
Looking at my logs, I also installed libgoogle-glog-dev from Ubuntu 16.10 in the process, but I think that was for an additional package on top of caffe, and not caffe itself.
In addition, in Makefile.config, I needed to change:
< CPU_ONLY := 1
---
> # CPU_ONLY := 1
94,95c94,95
< INCLUDE_DIRS := $(PYTHON_INCLUDE) /usr/local/include /usr/include/hdf5/serial/
< LIBRARY_DIRS := $(PYTHON_LIB) /usr/local/lib /usr/lib /usr/lib/x86_64-linux-gnu /usr/lib/x86_64-linux-gnu/hdf5/serial
---
> INCLUDE_DIRS := $(PYTHON_INCLUDE) /usr/local/include
> LIBRARY_DIRS := $(PYTHON_LIB) /usr/local/lib /usr/libObviously, many people will not want to change
CPU_ONLY. I'm also not sure whether I needed to add both additional library directories. I added the first. It didn't work. I added the second. It did. Both had what looked like files relevant to errors I saw.
In addition, I needed to include the library dependencies for OpenCV in the
Makefile itself (error was: "undefined reference to cv::imread(std::string const&, int)" and solution was found at
https://stackoverflow.com/questions/25476466/error-undefined-reference-to-cvimreadstdstring-const-int)
< LIBRARIES += opencv_core opencv_highgui opencv_imgproc opencv_shape opencv_stitching opencv_objdetect opencv_superres opencv_videostab opencv_calib3d opencv_features2d opencv_highgui opencv_videoio opencv_imgcodecs opencv_video opencv_photo opencv_ml opencv_imgproc opencv_flann opencv_viz opencv_core opencv_hal
---
> LIBRARIES += opencv_core opencv_highgui opencv_imgproc
I'm not using caffe itself, but a package which depends on it (at least for the next day or two; I may need to dive deeper depending on what performance I see), so I have not done a complete test of whether things work beyond the caffe command not crashing on the command line and the tool I am using working.
This post is purely intended to be informational for future developers so they might have a complete list of changes needed to make caffe build. No response required.
Piotr