Bug 1、./include/caffe/util/hdf5.hpp:6:18: fatal error: hdf5.h: No such file or directory
(2)在Makefile修改LIBRARIES,将”hdf5_hl“ 和”hdf5“分别修改为”hdf5_serial_hl“和 ”hdf5_serial“。 (Faster -RCNN 可以忽略)
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
Bug 2、.build_release/lib/libcaffe.so: undefined reference to cv::imread(cv::String const&, int)' .build_release/lib
Solution:在Makefile中的LIBRARIES中添加“opencv_imgcodecs”。
LIBRARIES += glog gflags protobuf leveldb snappy \
lmdb boost_system hdf5_serial_hl hdf5_serial m \
opencv_core opencv_highgui opencv_imgproc opencv_imgcodecs
注意:此时,如果继续使用make -j8 && make pycaffe(make all 会导致运行demo.py报错)命令行,会出现相同情况的bug。所以你需要删除在build中的所有文件(命令:rm -rf ./build/*),然后执行make -j8 && make pycaffe命令行,就没问题了。
Solution:(1)在Makefile.config修改INCLUDE_DIRS和LIBRARY_DIRS,分别添加” /usr/include/hdf5/serial/“和”/usr/lib/x86_64-linux-gnu /usr/lib/x86_64-linux-gnu/hdf5/serial“;
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
(2)在Makefile修改LIBRARIES,将”hdf5_hl“ 和”hdf5“分别修改为”hdf5_serial_hl“和 ”hdf5_serial“。 (Faster -RCNN 可以忽略)
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
Bug 2、.build_release/lib/libcaffe.so: undefined reference to cv::imread(cv::String const&, int)' .build_release/lib
Solution:在Makefile中的LIBRARIES中添加“opencv_imgcodecs”。
LIBRARIES += glog gflags protobuf leveldb snappy \
lmdb boost_system hdf5_serial_hl hdf5_serial m \
opencv_core opencv_highgui opencv_imgproc opencv_imgcodecs
注意:此时,如果继续使用make -j8 && make pycaffe(make all 会导致运行demo.py报错)命令行,会出现相同情况的bug。所以你需要删除在build中的所有文件(命令:rm -rf ./build/*),然后执行make -j8 && make pycaffe命令行,就没问题了。