Caffe: make all: undefined reference error

Created on 20 Oct 2015  路  9Comments  路  Source: BVLC/caffe

Scanning dependencies of target caffe.bin
[ 89%] Building CXX object tools/CMakeFiles/caffe.bin.dir/caffe.cpp.o
Linking CXX executable caffe
../lib/libcaffe.so: undefined reference to H5LTget_dataset_ndims' ../lib/libcaffe.so: undefined reference toH5Fcreate'
../lib/libcaffe.so: undefined reference to H5LTread_dataset_int' ../lib/libcaffe.so: undefined reference toH5Fclose'
../lib/libcaffe.so: undefined reference to H5Gclose' ../lib/libcaffe.so: undefined reference toH5check_version'
../lib/libcaffe.so: undefined reference to H5LTfind_dataset' ../lib/libcaffe.so: undefined reference toH5Lget_name_by_idx'
../lib/libcaffe.so: undefined reference to H5Lexists' ../lib/libcaffe.so: undefined reference toH5Gcreate2'
../lib/libcaffe.so: undefined reference to H5LTmake_dataset_double' ../lib/libcaffe.so: undefined reference toH5LTmake_dataset_int'
../lib/libcaffe.so: undefined reference to H5LTread_dataset_float' ../lib/libcaffe.so: undefined reference toH5LTmake_dataset_float'
../lib/libcaffe.so: undefined reference to H5LTget_dataset_info' ../lib/libcaffe.so: undefined reference toH5LTread_dataset_string'
../lib/libcaffe.so: undefined reference to H5Gget_info' ../lib/libcaffe.so: undefined reference toH5Gopen2'
../lib/libcaffe.so: undefined reference to H5LTread_dataset_double' ../lib/libcaffe.so: undefined reference toH5Fopen'
../lib/libcaffe.so: undefined reference to `H5LTmake_dataset_string'
collect2: error: ld returned 1 exit status
tools/CMakeFiles/caffe.bin.dir/build.make:111: recipe for target 'tools/caffe' failed
make[2]: ** [tools/caffe] Error 1
CMakeFiles/Makefile2:406: recipe for target 'tools/CMakeFiles/caffe.bin.dir/all' failed
make[1]: *
* [tools/CMakeFiles/caffe.bin.dir/all] Error 2
Makefile:117: recipe for target 'all' failed
make: *** [all] Error 2

Most helpful comment

This is still a code issue and not a "usage/installation" one. Please reopen.

All 9 comments

Fixed it by
$ sudo cp /usr/lib/x86_64-linux-gnu/hdf5/serial/libhdf5.so /usr/local/lib/libhdf5.so
$ sudo cp /usr/lib/x86_64-linux-gnu/hdf5/serial/libhdf5_hl.so /usr/local/lib/libhdf5_hl.so
$ make

Closing this resolved usage/installation issue.

From https://github.com/BVLC/caffe/blob/master/CONTRIBUTING.md:

_Please do not post usage, installation, or modeling questions, or other requests for help to Issues._
Use the caffe-users list instead. This helps developers maintain a clear, uncluttered, and efficient view of the state of Caffe.

This is still a code issue and not a "usage/installation" one. Please reopen.

Hi, I edited the dependencies.cmake file with the edits you gave, but when I run makepkg the file gets overwritten again. How do I stop this?

@kwotsin: run makepkg -so (install deps & extract sources), patch sources, then run makepkg -ei (do not extract sources, build & install).

@longjon Hi, I have copied two files to the /usr/local/lib, but cannot solve this issue. Is there anything I have to pay attention to? Thank you so much.

Did you apply the patch from PR ( https://github.com/BVLC/caffe/pull/4516 ), @bragilee ?

well...it doesn't work on me,
and I 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

Was this page helpful?
0 / 5 - 0 ratings

Related issues

kelvinxu picture kelvinxu  路  3Comments

FreakTheMighty picture FreakTheMighty  路  3Comments

weather319 picture weather319  路  3Comments

vladislavdonchev picture vladislavdonchev  路  3Comments

malreddysid picture malreddysid  路  3Comments