【发布时间】:2018-07-02 07:06:29
【问题描述】:
我正在尝试让自定义版本的 caffe (the one here) 为我的一些实验工作。当我在所需文件中进行这些更改并在 caffe 根目录中执行 make all 时,我得到以下信息:
ubuntu@ip-172-31-18-244:~/caffe$ make all -j4
LD -o .build_release/lib/libcaffe.so.1.0.0-rc3
/usr/bin/ld: /usr/lib/x86_64-linux-gnu/hdf5/serial/libhdf5_hl.a(H5LT.o): relocation R_X86_64_32S against `.text' can not be used when making a shared object; recompile with -fPIC
/usr/lib/x86_64-linux-gnu/hdf5/serial/libhdf5_hl.a: error adding symbols: Bad value
collect2: error: ld returned 1 exit status
Makefile:555: recipe for target '.build_release/lib/libcaffe.so.1.0.0-rc3' failed
make: *** [.build_release/lib/libcaffe.so.1.0.0-rc3] Error 1
知道为什么会发生这种情况吗?
我查看了similar issues,但不确定如何在这种情况下应用它。
我有 CUDA 版本 8.0.61 和 cuDNN 6.21(同一存储库的 the master branch 在其上完美运行)。
编辑: 对于安装中出现的各种(标准 caffe 安装)错误,我不得不进行以下更改:
sudo ln -s libhdf5_serial.so.10.1.0 libhdf5.so
sudo ln -s libhdf5_serial_hl.so.10.0.2 libhdf5_hl.so
Makefile.config 内部:
INCLUDE_DIRS := $(PYTHON_INCLUDE) /usr/local/include /usr/include/hdf5/serial/ and
LIBRARY_DIRS := $(PYTHON_LIB) /usr/local/lib /usr/lib /usr/lib/x86_64-linux-gnu/hdf5/serial/
和
export LD_LIBRARY_PATH=/usr/local/cuda-8.0/lib64:$LD_LIBRARY_PATH
export PATH=/usr/local/cuda-8.0/bin:$PATH`
【问题讨论】:
-
由于某种原因,您似乎试图链接到
libhdf5的静态 版本,而不是链接到动态 版本..您是否正确安装了所有先决条件? -
我已经在我的 Ubuntu 14.04 系统上通过
apt-get安装了libhdf5-serial-dev和libhdf5-dev。我还必须按照上面编辑中的说明进行一些更改。 -
所以你设法解决了你的问题?如果是这样,请考虑将解决方案作为答案发布,而不是编辑原始问题
-
不,不。我刚刚更新了这个问题,以反映我在解决这个特定问题的过程中必须解决的其他一些错误。我补充说,如果有人发现其中一个步骤(直接或间接)导致了这个问题。