caff 编译问题

来源:互联网 发布:苏联:邮票外国淘宝:::: 编辑:程序博客网 时间:2024/05/22 00:31


[root@slave1 caffe-master]# make

LD -o .build_release/lib/libcaffe.so
/usr/bin/ld: /usr/local/lib/libgflags.a(gflags.cc.o): relocation R_X86_64_32S against `.rodata' can not be used when making a shared object; recompile with -fPIC
/usr/local/lib/libgflags.a: could not read symbols: Bad value
collect2: ld returned 1 exit status

make: *** [.build_release/lib/libcaffe.so] Error 1

装最新的github上gflags版本,只有ccmake的安装方式,没有./configure的安装方式,虽然指定fPIC参数,仍然报错。

export CXXFLAGS="-fPIC" && cmake .. && make VERBOSE=1
后找到之前实验室的老版本,2.0版本,里面提供的是./configure的安装方法,不需要指定参数,直接执行下列代码,就不报错了。

./configuremakemake install

[root@slave1 caffe-master]# make

LD -o .build_release/lib/libcaffe.so
/usr/bin/ld: /usr/local/lib/libgflags.a(gflags.cc.o): relocation R_X86_64_32S against `.rodata' can not be used when making a shared object; recompile with -fPIC
/usr/local/lib/libgflags.a: could not read symbols: Bad value
collect2: ld returned 1 exit status

make: *** [.build_release/lib/libcaffe.so] Error 1

装最新的github上gflags版本,只有ccmake的安装方式,没有./configure的安装方式,虽然指定fPIC参数,仍然报错。

export CXXFLAGS="-fPIC" && cmake .. && make VERBOSE=1
后找到之前实验室的老版本,2.0版本,里面提供的是./configure的安装方法,不需要指定参数,直接执行下列代码,就不报错了。

./configuremakemake install

0 0