caffe: make 后错误 undefined reference to H5LT*****

Created on 14 Mar 2018  ·  3Comments  ·  Source: BVLC/caffe

已经安装了hdf5包,并且配置了路径,为什么出现如下错误???
./lib/libcaffe.so.1.0.0-rc3: undefined reference to H5LTget_dataset_ndims' ../lib/libcaffe.so.1.0.0-rc3: undefined reference toH5LTread_dataset_int'
../lib/libcaffe.so.1.0.0-rc3: undefined reference to H5LTfind_dataset' ../lib/libcaffe.so.1.0.0-rc3: undefined reference toH5LTmake_dataset_double'
../lib/libcaffe.so.1.0.0-rc3: undefined reference to H5LTmake_dataset_int' ../lib/libcaffe.so.1.0.0-rc3: undefined reference toH5LTread_dataset_float'
../lib/libcaffe.so.1.0.0-rc3: undefined reference to H5LTmake_dataset_float' ../lib/libcaffe.so.1.0.0-rc3: undefined reference toH5LTget_dataset_info'
../lib/libcaffe.so.1.0.0-rc3: undefined reference to H5LTread_dataset_string' ../lib/libcaffe.so.1.0.0-rc3: undefined reference toH5LTread_dataset_double'
../lib/libcaffe.so.1.0.0-rc3: undefined reference to `H5LTmake_dataset_string'
collect2: ld 返回 1
make[2]: * [tools/convert_imageset] 错误 1
make[1]:
[tools/CMakeFiles/convert_imageset.dir/all] 错误 2
make: *
* [all] 错误 2

Steps to reproduce

If you are having difficulty building Caffe or training a model, please ask the caffe-users mailing list. If you are reporting a build error that seems to be due to a bug in Caffe, please attach your build configuration (either Makefile.config or CMakeCache.txt) and the output of the make (or cmake) command.

Most helpful comment

I met a similar problem and solved it by modifying the file /cmake/Dependencies.cmake as following,

---[ HDF5
find_package(HDF5 COMPONENTS HL REQUIRED)
include_directories(SYSTEM ${HDF5_INCLUDE_DIRS} ${HDF5_HL_INCLUDE_DIR})
list(APPEND Caffe_LINKER_LIBS ${HDF5_LIBRARIES})
list(APPEND Caffe_LINKER_LIBS ${HDF5_HL_LIBRARIES}) #added

All 3 comments

This looks like a duplicate of #3224 which has already been resolved. How is your problem different from that one?

I met a similar problem and solved it by modifying the file /cmake/Dependencies.cmake as following,

---[ HDF5
find_package(HDF5 COMPONENTS HL REQUIRED)
include_directories(SYSTEM ${HDF5_INCLUDE_DIRS} ${HDF5_HL_INCLUDE_DIR})
list(APPEND Caffe_LINKER_LIBS ${HDF5_LIBRARIES})
list(APPEND Caffe_LINKER_LIBS ${HDF5_HL_LIBRARIES}) #added

Closing, assuming the given answer helped. If not, please reopen and provide further details, especially how the suggested solution failed.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

prathmeshrmadhu picture prathmeshrmadhu  ·  3Comments

vladislavdonchev picture vladislavdonchev  ·  3Comments

kelvinxu picture kelvinxu  ·  3Comments

OpenHero picture OpenHero  ·  3Comments

LarsHH picture LarsHH  ·  3Comments