Hello Caffe is a library for deeplearning. When trying to build that library under Ubuntu 15.04, the compilation fails with the message:

:~/App/caffe$ make all

PROTOC src/caffe/proto/caffe.proto
CXX .build_release/src/caffe/proto/caffe.pb.cc
CXX src/caffe/layer_factory.cpp
In file included from ./include/caffe/common_layers.hpp:10:0,
                 from ./include/caffe/vision_layers.hpp:10,
                 from src/caffe/layer_factory.cpp:6:
./include/caffe/data_layers.hpp:9:18: fatal error: hdf5.h: Aucun fichier ou dossier de ce type
 #include "hdf5.h"
                  ^
compilation terminated.
Makefile:512: recipe for target '.build_release/src/caffe/layer_factory.o' failed
make: *** [.build_release/src/caffe/layer_factory.o] Error 1

The building failure seems to be Ubuntu specific. I have checked the different dependencies. I tried different workaround: writing the path of hdf5.h directly in the Makefile.config, building hdf5 from source...

Thanks for advices

share|improve this question
    
Please edit you question to actually contain the entire question, thanks. – Seth Jun 1 '15 at 2:38
1  
For those seeking an answer to this problem, the parallel discussion on the Caffe mailing list has solutions: groups.google.com/forum/#!topic/caffe-users/cdyqjNpoFRY – Ibrahim Jul 1 '15 at 23:46

install libhdf5-dev

add patch to libhdf5 in Makefile.config.

example: INCLUDE_DIRS := $(PYTHON_INCLUDE) /usr/local/include /usr/include/hdf5/serial/

share|improve this answer
    
+1 Found this searching and it fixed the issue. @Jean-Pat, please consider accepting this answer if it solved your problem. – David Etler Jul 11 '15 at 13:54
1  
This fixes the missing include but the compile just fails later because it can't find the libs. – Alistair Buxton Jul 19 '15 at 11:33
    
@Alistair Buxton: I have made an addition to the answer, in order to show how to fix this issue, if it persists, even after updating the Makefile.config. – Codetoffel Oct 2 '16 at 8:37
    
Works for me. Thanks – khan Dec 18 '17 at 1:30

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.