Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

make all: undefined reference error #3224

Closed
ProgmasterX opened this issue Oct 20, 2015 · 9 comments
Closed

make all: undefined reference error #3224

ProgmasterX opened this issue Oct 20, 2015 · 9 comments

Comments

@ProgmasterX
Copy link

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

@ProgmasterX
Copy link
Author

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

@longjon
Copy link
Contributor

longjon commented Nov 5, 2015

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.

@longjon longjon closed this as completed Nov 5, 2015
@intelfx
Copy link
Contributor

intelfx commented Jul 25, 2016

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

intelfx added a commit to intelfx/caffe that referenced this issue Jul 25, 2016
@kwotsin
Copy link

kwotsin commented Jul 31, 2016

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?

@intelfx
Copy link
Contributor

intelfx commented Jul 31, 2016

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

intelfx added a commit to intelfx/caffe that referenced this issue Jul 31, 2016
ZengpanFan pushed a commit to foursquare/caffe that referenced this issue Aug 26, 2016
fxbit pushed a commit to Yodigram/caffe that referenced this issue Sep 1, 2016
@bragilee
Copy link

@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.

Cysu pushed a commit to Cysu/caffe that referenced this issue Oct 17, 2016
zouxiaochuan pushed a commit to zouxiaochuan/caffe that referenced this issue Oct 24, 2016
Cysu pushed a commit to Cysu/caffe that referenced this issue Oct 27, 2016
@jakirkham
Copy link

Did you apply the patch from PR ( #4516 ), @bragilee ?

gyunt pushed a commit to gyunt/caffe-rc3-mac that referenced this issue Dec 21, 2016
zouxiaochuan pushed a commit to zouxiaochuan/caffe that referenced this issue Feb 15, 2017
zouxiaochuan pushed a commit to zouxiaochuan/caffe that referenced this issue Feb 15, 2017
debjeetmaj pushed a commit to debjeetmaj/caffe that referenced this issue Apr 16, 2017
acmiyaguchi pushed a commit to acmiyaguchi/caffe that referenced this issue Nov 13, 2017
volgy pushed a commit to Fazecast/caffe that referenced this issue Jan 17, 2018
@Abdul-Mukit
Copy link

Abdul-Mukit commented Sep 25, 2018

I followed Fazecast@942d22d
provided above. It seems to work.

@ghost
Copy link

ghost commented Nov 19, 2019

well...it doesn't work on me,
and I solved it by modifying the file <your_caffe_root>/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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

7 participants