caffe cmake matlab,编译caffe时候抛出的错误

编译caffe时候抛出的错误

我在安装ubuntu14.04上安装了cuda7.5,cudnn4.0等,使用起来都挺好的,没什么问题,最近,把21天实战caffe上面第五天的以来库都装完之后,准备装matcaffe,先装了matlab2015b,发现只支持gcc4.7,而ubuntu自带gcc4.8,然后我把4.7安上了,就在感觉快要大功告成之时,编译caffe,爆出错误和操作过程如下:

这里用了两种编译方法,一种直接在caffe根目录下编译,一种先建立build目录再在build目录下编译,结果都不行:

第一种:

prlab@prlab-All-Series:~$ ls

blob_demo.cpp  cuda-workspace    matlab                   公共的  图片  音乐

build          examples.desktop  NVIDIA_CUDA-7.5_Samples  模板    文档  桌面

caffe          local_install     tensorflow               视频    下载

prlab@prlab-All-Series:~$ cd caffe

prlab@prlab-All-Series:~/caffe$ ls

caffe.cloc       CONTRIBUTORS.md  docs        LICENSE          models     src

cmake            data             examples    Makefile         python     tools

CMakeLists.txt   distribute       include     Makefile.config  README.md

CONTRIBUTING.md  docker           INSTALL.md  matlab           scripts

prlab@prlab-All-Series:~/caffe$ make

报错:

CXX/LD -o .build_release/tools/upgrade_net_proto_text.bin

/usr/bin/ld: warning: libboost_system.so.1.56.0, needed by .build_release/lib/libcaffe.so, not found (try using -rpath or -rpath-link)

/usr/bin/ld: warning: libboost_thread.so.1.56.0, needed by .build_release/lib/libcaffe.so, not found (try using -rpath or -rpath-link)

/usr/bin/ld: warning: libopenblas.so.0, needed by .build_release/lib/libcaffe.so, not found (try using -rpath or -rpath-link)

.build_release/lib/libcaffe.so:对‘cv::imread(cv::String const&, int)’未定义的引用

.build_release/lib/libcaffe.so:对‘cv::imencode(cv::String const&, cv::_InputArray const&, std::vector >&, std::vector > const&)’未定义的引用

.build_release/lib/libcaffe.so:对‘cv::imdecode(cv::_InputArray const&, int)’未定义的引用

collect2: 错误: ld 返回 1

make: *** [.build_release/tools/upgrade_net_proto_text.bin] 错误 1

--------------------------------------------------------------------------------------------------------------

第二种:

prlab@prlab-All-Series:~/caffe$ mkdir build

prlab@prlab-All-Series:~/caffe$ cd build

prlab@prlab-All-Series:~/caffe/build$ ls

prlab@prlab-All-Series:~/caffe/build$ cmake -DBLAS=open ..

-- The C compiler identification is GNU 4.7.3

-- The CXX compiler identification is GNU 4.7.3

-- Check for working C compiler: /usr/bin/cc

-- Check for working C compiler: /usr/bin/cc -- works

-- Detecting C compiler ABI info

-- Detecting C compiler ABI info - done

-- Check for working CXX compiler: /usr/bin/c++

-- Check for working CXX compiler: /usr/bin/c++ -- works

-- Detecting CXX compiler ABI info

-- Detecting CXX compiler ABI info - done

-- Boost version: 1.54.0

-- Found the following Boost libraries:

--   system

--   thread

--   filesystem

-- Looking for include file pthread.h

-- Looking for include file pthread.h - found

-- Looking for pthread_create

-- Looking for pthread_create - not found

-- Looking for pthread_create in pthreads

-- Looking for pthread_create in pthreads - not found

-- Looking for pthread_create in pthread

-- Looking for pthread_create in pthread - found

-- Found Threads: TRUE

-- Found GFlags: /usr/include

-- Found gflags  (include: /usr/include, library: /usr/lib/x86_64-linux-gnu/libgflags.so)

-- Found Glog: /usr/include

-- Found glog    (include: /usr/include, library: /usr/lib/x86_64-linux-gnu/libglog.so)

-- Found PROTOBUF: /usr/lib/x86_64-linux-gnu/libprotobuf.so

-- Found PROTOBUF Compiler: /usr/bin/protoc

-- Found HDF5: /usr/lib/x86_64-linux-gnu/libhdf5_hl.so;/usr/lib/x86_64-linux-gnu/libhdf5.so

-- Found LMDB: /usr/include

-- Found lmdb    (include: /usr/include, library: /usr/lib/x86_64-linux-gnu/liblmdb.so)

-- Found LevelDB: /usr/include

-- Found LevelDB (include: /usr/include, library: /usr/lib/x86_64-linux-gnu/libleveldb.so)

-- Found Snappy: /usr/include

-- Found Snappy  (include: /usr/include, library: /usr/lib/libsnappy.so)

-- CUDA detected: 7.5

-- Found cuDNN: ver. 4.0.7 found (include: /usr/local/cuda/include, library: /usr/local/cuda/lib64/libcudnn.so)

-- Added CUDA NVCC flags for: sm_61

-- OpenCV found (/usr/local/share/OpenCV)

-- Found OpenBLAS libraries: /usr/lib/libopenblas.so

-- Found OpenBLAS include: /usr/include

-- Found PythonInterp: /usr/bin/python2.7 (found suitable version "2.7.6", minimum required is "2.7")

-- Found PythonLibs: /usr/lib/x86_64-linux-gnu/libpython2.7.so (found suitable version "2.7.6", minimum required is "2.7")

Traceback (most recent call last):

File "", line 1, in

ImportError: No module named numpy

-- Could NOT find NumPy (missing:  NUMPY_INCLUDE_DIR NUMPY_VERSION) (Required is at least version "1.7.1")

-- Boost version: 1.54.0

-- Found the following Boost libraries:

--   python

-- Could NOT find Doxygen (missing:  DOXYGEN_EXECUTABLE)

-- Python interface is disabled or not all required dependencies found. Building without it...

-- Found Git: /usr/bin/git (found version "1.9.1")

--

-- ******************* Caffe Configuration Summary *******************

-- General:

--   Version           :   1.0.0-rc3

--   Git               :   rc3-222-g375003a-dirty

--   System            :   Linux

--   C++ compiler      :   /usr/bin/c++

--   Release CXX flags :   -O3 -DNDEBUG -fPIC -Wall -Wno-sign-compare -Wno-uninitialized

--   Debug CXX flags   :   -g -fPIC -Wall -Wno-sign-compare -Wno-uninitialized

--   Build type        :   Release

--

--   BUILD_SHARED_LIBS :   ON

--   BUILD_python      :   ON

--   BUILD_matlab      :   OFF

--   BUILD_docs        :   ON

--   CPU_ONLY          :   OFF

--   USE_OPENCV        :   ON

--   USE_LEVELDB       :   ON

--   USE_LMDB          :   ON

--   ALLOW_LMDB_NOLOCK :   OFF

--

-- Dependencies:

--   BLAS              :   Yes (open)

--   Boost             :   Yes (ver. 1.54)

--   glog              :   Yes

--   gflags            :   Yes

--   protobuf          :   Yes (ver. 2.5.0)

--   lmdb              :   Yes (ver. 0.9.10)

--   LevelDB           :   Yes (ver. 1.15)

--   Snappy            :   Yes (ver. 1.1.0)

--   OpenCV            :   Yes (ver. 3.0.0)

--   CUDA              :   Yes (ver. 7.5)

--

-- NVIDIA CUDA:

--   Target GPU(s)     :   Auto

--   GPU arch(s)       :   sm_61

--   cuDNN             :   Yes (ver. 4.0.7)

--

-- Documentaion:

--   Doxygen           :   No

--   config_file       :

--

-- Install:

--   Install path      :   /home/prlab/caffe/build/install

--

-- Configuring done

-- Generating done

-- Build files have been written to: /home/prlab/caffe/build

prlab@prlab-All-Series:~/caffe/build$ make all

报错:

[  0%] Running C++/Python protocol buffer compiler on /home/prlab/caffe/src/caffe/proto/caffe.proto

Scanning dependencies of target proto

[  0%] Building CXX object src/caffe/CMakeFiles/proto.dir/__/__/include/caffe/proto/caffe.pb.cc.o

Linking CXX static library ../../lib/libproto.a

[  0%] Built target proto

[  0%] Building NVCC (Device) object src/caffe/CMakeFiles/cuda_compile.dir/layers/./cuda_compile_generated_eltwise_layer.cu.o

nvcc fatal   : Unsupported gpu architecture 'compute_61'

CMake Error at cuda_compile_generated_eltwise_layer.cu.o.cmake:206 (message):

Error generating

/home/prlab/caffe/build/src/caffe/CMakeFiles/cuda_compile.dir/layers/./cuda_compile_generated_eltwise_layer.cu.o

make[2]: *** [src/caffe/CMakeFiles/cuda_compile.dir/layers/./cuda_compile_generated_eltwise_layer.cu.o] 错误 1

make[1]: *** [src/caffe/CMakeFiles/caffe.dir/all] 错误 2

make: *** [all] 错误 2

求解决办法!!

没有找到相关结果

已邀请:

与内容相关的链接

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值