修复孤立的libhdf5.so和libhdf5_hl.so库会导致Caffe编译错误

问题描述 投票:0回答:1

在我的/ usr / lib / x86_64-linux-gnu目录中有两个红色的库,

 libhdf5.so and libhdf5_hl.so

我的理解是这些是孤立的符号链接。我删除了它们但现在需要创建新的符号链接。我找到了这些文件

/usr/lib/x86_64-linux-gnu/hdf5/serial/libhdf5_hl.so

/usr/lib/x86_64-linux-gnu/hdf5/serial/libhdf5.so

所以我制作了新的符号链接,现在它们都是蓝绿色的。

但是我在编译CAFFE时遇到了这些错误

src/caffe/net.cpp:774:7: error: there are no arguments to ‘H5Fis_hdf5’ that depend on a template parameter, so a declaration of ‘H5Fis_hdf5’ must be available [-fpermissive]
   if (H5Fis_hdf5(trained_filename.c_str())) {
       ^~~~~~~~~~
src/caffe/net.cpp:774:7: note: (if you use ‘-fpermissive’, G++ will accept your code, but allowing the use of an undeclared name is deprecated)
src/caffe/net.cpp: In instantiation of ‘void caffe::Net<Dtype>::CopyTrainedLayersFrom(const string&) [with Dtype = float; std::__cxx11::string = std::__cxx11::basic_string<char>]’:
src/caffe/net.cpp:992:1:   required from here
src/caffe/net.cpp:774:17: error: ‘H5Fis_hdf5’ was not declared in this scope
   if (H5Fis_hdf5(trained_filename.c_str())) {
       ~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~
src/caffe/net.cpp: In instantiation of ‘void caffe::Net<Dtype>::CopyTrainedLayersFrom(const string&) [with Dtype = double; std::__cxx11::string = std::__cxx11::basic_string<char>]’:
src/caffe/net.cpp:992:1:   required from here
src/caffe/net.cpp:774:17: error: ‘H5Fis_hdf5’ was not declared in this scope
Makefile:611: recipe for target '.build_release/src/caffe/net.o' failed
make: *** [.build_release/src/caffe/net.o] Error 1
make: *** Waiting for unfinished jobs....

我是否通过符号链接错误的文件?

compiler-errors caffe hdf5
1个回答
1
投票

不,它与图书馆没有任何关系,因为你还没有进入链接阶段。您的错误是由于编译失败。请参阅this issue,也许它会有所帮助。

© www.soinside.com 2019 - 2024. All rights reserved.