cannot find -lhdf5_serial_h

1,176 views
Skip to first unread message

Martin Plantinga

unread,
Aug 15, 2017, 10:45:34 AM8/15/17
to Caffe Users
Hi, I'm trying to build Caffe in Ubuntu 16.04.

After typing make all the installation stops because of an lhdf5_serial_h error (see below).

Does somebody know how to solve this error?

root@ad6930cabe:/workspace/py-faster-rcnn/caffe-fast-rcnn# make all
PROTOC src/caffe/proto/caffe.proto
CXX .build_release/src/caffe/proto/caffe.pb.cc
CXX src/caffe/util/db_lmdb.cpp
CXX src/caffe/util/im2col.cpp
CXX src/caffe/util/signal_handler.cpp
CXX src/caffe/util/blocking_queue.cpp

CXX src/caffe/layers/batch_norm_layer.cpp
CXX src/caffe/layers/sigmoid_cross_entropy_loss_layer.cpp
CXX src/caffe/layers/argmax_layer.cpp
CXX src/caffe/data_transformer.cpp
CXX src/caffe/syncedmem.cpp
AR -o .build_release/lib/libcaffe.a
LD -o .build_release/lib/libcaffe.so.1.0.0-rc3
/usr/bin/ld: cannot find -lhdf5_serial_h
collect2: error: ld returned 1 exit status
Makefile:554: recipe for target '.build_release/lib/libcaffe.so.1.0.0-rc3' failed
make: *** [.build_release/lib/libcaffe.so.1.0.0-rc3] Error 1

miaoq...@gmail.com

unread,
Feb 14, 2018, 3:26:57 PM2/14/18
to Caffe Users
Do you know how to solve it now?

在 2017年8月15日星期二 UTC-4上午10:45:34,Martin Plantinga写道:

Martin Plantinga

unread,
Feb 15, 2018, 4:01:34 AM2/15/18
to Caffe Users
Install the following dependencies:

sudo apt-get install libprotobuf-dev libleveldb-dev libsnappy-dev libopencv-dev libhdf5-serial-dev protobuf-compiler


In the Makefile.config make sure the paths to the INCLUDE_DIRS and LIBRARY_DIRS are set correctly. These paths are found by looking for hdf5 in the /usr/include and /usr/lib directories respectively:

cd /usr/include && find -name hdf5

cd /usr/lib && find -name hdf5


These are for example:

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/hdf5/serial

Message has been deleted

miaoq...@gmail.com

unread,
Feb 15, 2018, 10:14:01 PM2/15/18
to Caffe Users
I follow your instruction, but the error still exist when i make.

在 2018年2月15日星期四 UTC-5上午4:01:34,Martin Plantinga写道:

Martin Plantinga

unread,
Feb 16, 2018, 4:25:08 AM2/16/18
to Caffe Users
Can you be a bit more explicit?

What is the output you get when:
1. typing: cd /usr/include && find -name hdf5
2. typing: cd /usr/lib && find -name hdf5
3. typing: make all

Also:
How does your Makefile.config look like?
Reply all
Reply to author
Forward
0 new messages