无法建立起来

时间:2018-01-23 12:45:17

标签: makefile caffe hdf5

我正在尝试为我的一些实验获取自定义版本的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`

1 个答案:

答案 0 :(得分:0)

似乎早期版本的caffe干扰了这个自定义构建。从头开始重新安装所有东西(caffe,cuDNN)...