Ubuntu14.04编译caffe问题记录

前端之家收集整理的这篇文章主要介绍了Ubuntu14.04编译caffe问题记录前端之家小编觉得挺不错的,现在分享给大家,也给大家做个参考。
http://blog.sina.com.cn/s/blog_721a75e50102wfig.html
问题一:libunwind.so.8: undefinedreference
//usr/lib/x86_64-linux-gnu/libunwind.so.8: undefined referenceto `lzma_index_end@XZ_5.0'
//usr/lib/x86_64-linux-gnu/libunwind.so.8: undefined referenceto `lzma_index_size@XZ_5.0'
//usr/lib/x86_64-linux-gnu/libunwind.so.8: undefined referenceto `lzma_index_buffer_decode@XZ_5.0'
//usr/lib/x86_64-linux-gnu/libunwind.so.8: undefined referenceto `lzma_stream_footer_decode@XZ_5.0'
//usr/lib/x86_64-linux-gnu/libunwind.so.8: undefined referenceto `lzma_stream_buffer_decode@XZ_5.0'
//usr/lib/x86_64-linux-gnu/libunwind.so.8: undefined referenceto `lzma_index_uncompressed_size@XZ_5.0'
1.
ldconfig -p | grep lzma
liblzma.so.5(libc6,x86-64) => /lib/x86_64-linux-gnu/liblzma.so.5
liblzma.so.5 (libc6)=> /lib/i386-linux-gnu/liblzma.so.5
liblzma.so(libc6,x86-64) => /usr/lib/x86_64-linux-gnu/liblzma.so
2.
export LD_LIBRARY_PATH=/lib/x86_64-linux-gnu/

问题二:
libcudart.so.7.5: cannot open shared object file: No such fileor directory
exportLD_LIBRARY_PATH=/usr/local/cuda/lib64:$LD_LIBRARY_PATH
问题三:
libhdf5_hl.so.10: cannot open shared object file: No such fileor directory
我用anaconda2
exportLD_LIBRARY_PATH=/path/to/your/anaconda2/lib:$LD_LIBRARY_PATH
我的是
exportLD_LIBRARY_PATH=/home/k/anaconda2/lib:$LD_LIBRARY_PATH

问题四:
fatal error: caffe/proto/caffe.pb.h: No such file or directory #include "caffe/proto/caffe.pb.h"
# In the directory you installed Caffe to
protoc src/caffe/proto/caffe.proto --cpp_out=.
mkdir include/caffe/proto
mv src/caffe/proto/caffe.pb.h include/caffe/proto
问题五:
error whileloading shared libraries: libprotoc.so.9: cannot open shared objectfile: No such file or directory
exportLD_LIBRARY_PATH=/usr/local/lib/

问题六: undefined reference to`caffe::db::GetDB(std::string const&)'
collect2: error: ld returned 1 exitstatus
make: ***[.build_release/tools/extract_features.bin] Error 1
make: *** Waiting for unfinishedjobs....
.build_release/tools/compute_image_mean.o: In function`main':
compute_image_mean.cpp:(.text.startup+0x1b0): undefined referenceto `caffe::db::GetDB(std::string const&)'
make: ***[.build_release/tools/compute_image_mean.bin] Error 1
.build_release/tools/convert_imageset.o: In function `main':
convert_imageset.cpp:(.text.startup+0x625): undefined reference to`caffe::db::GetDB(std::string const&)'
make: ***[.build_release/tools/convert_imageset.bin] Error 1

解决方法清除/usr/lib/libcaffe.so或清除/usr/local/lib/libcaffe.so
问题七:
lib/libcaffe.so: undefined referenceto `cudnnSetLRNDescriptor'
lib/libcaffe.so: undefined referenceto `cudnnGetConvolutionBackw ardDataWorkspaceSize'
lib/libcaffe.so: undefined referenceto `cudnnSetFilter4dDescript or'
lib/libcaffe.so: undefined referenceto `cudnnGetConvolutionForwa rdAlgorithm'
lib/libcaffe.so: undefined referenceto `cudnnConvolutionBackward Data_v3'
lib/libcaffe.so: undefined referenceto `cudnnGetConvolutionBackw ardFilterWorkspaceSize'
lib/libcaffe.so: undefined referenceto `cudnnCreateConvolutionDe scriptor'
lib/libcaffe.so: undefined referenceto `cudnnDestroyConvolutionD escriptor'
lib/libcaffe.so: undefined referenceto `cudnnSoftmaxBackward'
lib/libcaffe.so: undefined referenceto `cudnnConvolutionForward'
lib/libcaffe.so: undefined referenceto `cudnnLRNCrossChannelBack ward'
lib/libcaffe.so: undefined referenceto `curandGenerateUniform'
lib/libcaffe.so: undefined referenceto `cudnnPoolingBackward'
lib/libcaffe.so: undefined referenceto `cudnnCreateTensorDescrip tor'
lib/libcaffe.so: undefined referenceto `cublasDdot_v2'
lib/libcaffe.so: undefined referenceto `curandGenerateUniformDou ble'
lib/libcaffe.so: undefined referenceto `cudnnCreatePoolingDescri ptor'
lib/libcaffe.so: undefined referenceto `cudnnDestroyFilterDescri ptor'
lib/libcaffe.so: undefined referenceto `cudnnActivationBackward'
lib/libcaffe.so: undefined referenceto `cudnnDestroyTensorDescri ptor'
lib/libcaffe.so: undefined referenceto `cublasDaxpy_v2'
lib/libcaffe.so: undefined referenceto `cudnnCreateLRNDescriptor '
lib/libcaffe.so: undefined referenceto `curandCreateGenerator'
lib/libcaffe.so: undefined referenceto `cudnnGetConvolutionForwa rdWorkspaceSize'
lib/libcaffe.so: undefined referenceto `cublasDscal_v2'
lib/libcaffe.so: undefined referenceto `cublasScopy_v2'
lib/libcaffe.so: undefined referenceto `cudnnAddTensor'
lib/libcaffe.so: undefined referenceto `cudnnDestroyPoolingDescr iptor'
lib/libcaffe.so: undefined referenceto `cudnnSoftmaxForward'
lib/libcaffe.so: undefined referenceto `cudnnActivationForward'
lib/libcaffe.so: undefined referenceto `cudnnPoolingForward'
lib/libcaffe.so: undefined referenceto `cublasSgemv_v2'
lib/libcaffe.so: undefined referenceto `cudnnSetTensor4dDescript orEx'
lib/libcaffe.so: undefined referenceto `curandSetPseudoRandomGen eratorSeed'
lib/libcaffe.so: undefined referenceto `cublasSdot_v2'
lib/libcaffe.so: undefined referenceto `cudnnSetPooling2dDescrip tor'
lib/libcaffe.so: undefined referenceto `curandDestroyGenerator'
lib/libcaffe.so: undefined referenceto `cudnnConvolutionBackward Bias'
lib/libcaffe.so: undefined referenceto `cublasDcopy_v2'
lib/libcaffe.so: undefined referenceto `cudnnGetConvolutionBackw ardFilterAlgorithm'
lib/libcaffe.so: undefined referenceto `cublasDestroy_v2'
lib/libcaffe.so: undefined referenceto `curandGenerateNormalDoub le'
lib/libcaffe.so: undefined referenceto `cublasSgemm_v2'
lib/libcaffe.so: undefined referenceto `cudnnCreateFilterDescrip tor'
lib/libcaffe.so: undefined referenceto `cublasDgemv_v2'
lib/libcaffe.so: undefined referenceto `cublasDasum_v2'
lib/libcaffe.so: undefined referenceto `cudnnSetStream'
lib/libcaffe.so: undefined referenceto `cudnnLRNCrossChannelForw ard'
lib/libcaffe.so: undefined referenceto `cudnnConvolutionBackward Filter_v3'
lib/libcaffe.so: undefined referenceto `curandSetGeneratorOffset '
lib/libcaffe.so: undefined referenceto `cublasSaxpy_v2'
lib/libcaffe.so: undefined referenceto `cudnnDestroy'
lib/libcaffe.so: undefined referenceto `cublasDgemm_v2'
lib/libcaffe.so: undefined referenceto `curandGenerate'
lib/libcaffe.so: undefined referenceto `cublasSscal_v2'
lib/libcaffe.so: undefined referenceto `cudnnSetConvolution2dDes criptor'
lib/libcaffe.so: undefined referenceto `cublasSasum_v2'
lib/libcaffe.so: undefined referenceto `cublasCreate_v2'
lib/libcaffe.so: undefined referenceto `curandGenerateNormal'
lib/libcaffe.so: undefined referenceto `cudnnGetConvolutionBackw ardDataAlgorithm'
lib/libcaffe.so: undefined referenceto `cudnnDivisiveNormalizati onBackward'
lib/libcaffe.so: undefined referenceto `cudnnDivisiveNormalizati onForward'
lib/libcaffe.so: undefined referenceto `cudnnCreate'
exportLD_LIBRARY_PATH=/usr/local/cuda/lib64:$LD_LIBRARY_PATH

问题七:
make pycaffe错误:
CXX/LD -o python/caffe/_caffe.so python/caffe/_caffe.cpp
python/caffe/_caffe.cpp:1:52: fatal error: Python.h: No suchfile or directory
#include //NOLINT(build/include_alpha)
^
compilation terminated.
make: *** [python/caffe/_caffe.so] Error 1
Makefile.config中anaconda路径不对
问题八:
如果发现编译的时候没有找到cudnn相关的头文件,那么有可能是用了低版本的cudnn,特别是cudnnv4,下载cudnnv5和新版caffe然后把include和lib分别放到cuda响应的include和lib64上然后重新编译。
问题九:
undefined symbol: _ZN5caffe13CuDNNLCNLayerI fED1Ev
找不到libcaffe相关库文件
export LD_LIBRARY_PATH到你编译后使用的libcaffe.so所在位置

猜你在找的Ubuntu相关文章