gpt4 book ai didi

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

转载 作者:行者123 更新时间:2023-12-02 10:53:30 25 4
gpt4 key购买 nike

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

 libhdf5.so and libhdf5_hl.so

我的理解是这些是孤立的符号链接(symbolic link)。我删除了它们,但现在需要制作新的。
我确实找到了这些文件
/usr/lib/x86_64-linux-gnu/hdf5/serial/libhdf5_hl.so

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

所以我做了新的符号链接(symbolic link),现在它们是蓝绿色的。

但是我在编译 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....

那么我是否符号链接(symbolic link)了错误的文件?

最佳答案

不,它与库无关,因为您还没有进入链接阶段。您的错误是由于编译失败。见 this issue ,也许会有所帮助。

关于compiler-errors - 修复孤立的 libhdf5.so 和 libhdf5_hl.so 库导致 Caffe 编译错误,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/55428531/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com