Caffe didn't see hdf5.h when compiling
What is the version of your Ubuntu install? Try this. In your Makefile.config
try to append /usr/include/hdf5/serial/
to INCLUDE_DIRS
:
--- INCLUDE_DIRS := $(PYTHON_INCLUDE) /usr/local/include+++ INCLUDE_DIRS := $(PYTHON_INCLUDE) /usr/local/include /usr/include/hdf5/serial/
and rename hdf5_hl
and hdf5
to hdf5_serial_hl
and hdf5_serial
in the Makefile
:
--- LIBRARIES += glog gflags protobuf boost_system boost_filesystem m hdf5_hl hdf5+++ LIBRARIES += glog gflags protobuf boost_system boost_filesystem m hdf5_serial_hl hdf5_serial
More about the bug fix here.
This solution worked for me on the Ubuntu16.04LTS
sudo apt-get install libhdf5-10sudo apt-get install libhdf5-serial-devsudo apt-get install libhdf5-devsudo apt-get install libhdf5-cpp-11find /usr -iname "*hdf5.h*"/usr/include/hdf5/serial/hdf5.hexport CPATH="/usr/include/hdf5/serial/"
Another case I've experienced with:
I was using Ubuntu 14.04 and installing hdf5-1.10.0.
I found hdf5.h
was located in /usr/local/hdf5/include
. Thus, I modified Makefile.config
file by adding that location to INCLUDE_DIRS
.
# Whatever else you find you need goes here.INCLUDE_DIRS := $(PYTHON_INCLUDE) /usr/local/include \ /usr/local/hdf5/include
I didn't rename anything in Makefile
. It worked fine.