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

2023-05-16

编译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

求解决办法!!

没有找到相关结果

已邀请:

与内容相关的链接

本文内容由网友自发贡献,版权归原作者所有,本站不承担相应法律责任。如您发现有涉嫌抄袭侵权的内容,请联系:hwhale#tublm.com(使用前将#替换为@)

caffe cmake matlab,编译caffe时候抛出的错误 的相关文章

  • 如何指定CMAKE外部项目的编译器?

    我使用ExternalProject Add 包含一个外部项目 我想要的是能够做到 cmake DCMAKE CXX COMPILER
  • 使用cmake交叉编译gRPC

    我正在尝试使用 cmake 交叉编译 gRPC 我实际上做到了 不幸的是 我的方法涉及在 CMakeLists txt 内部进行修改 问题是 当我尝试编译 gRPC 时 它使用的是他刚刚编译的 protobuffer 它无法在 x86 计算
  • Matlab:保存后翻转图例顺序和图例重叠图

    我正在尝试根据以下内容反转我的图例条目顺序matlab条形图中图例颜色的逆序 https stackoverflow com questions 31178005 reverse ordering of legend colors in m
  • VS 2010 和 CMake:“rc”未被识别为内部或外部命令

    我正在尝试使用 VS 2010 和 CMake 在 Windows 10 Home 上构建一个项目 我收到以下错误 zutil c lib nologo out zlib lib adler32 obj compress obj crc32
  • 为什么旋转 3D 点云后顶点法线会翻转?

    我有两个人脸 3D 点云样本 蓝色点云表示目标面 红色点云表示模板 下图显示目标面和模板面在不同方向上对齐 目标面大致沿 x 轴 模板面大致沿 y 轴 Figure 1 The region around the nose is displ
  • 如何在cmake中将构建类型更改为Release模式?

    我正在尝试以发布模式构建一个项目 默认情况下它是在调试模式下构建的 我正在设置变量CMAKE BUILD TYPE到 释放 CMakeLists txt 但它仍在调试模式下构建项目 当我在 CMake 命令中传递 Release 作为构建类
  • Matlab 字段名索引[重复]

    这个问题在这里已经有答案了 所以我有一个包含多个表的元胞数组 我试图访问表的第一个列名称 c table1 table2 table3 以下两行都给了我错误 fieldnames c 1 1 fieldnames c 1 1 Error i
  • 如何找到在matlab中重复的矩阵的每一行的索引?

    我想找到矩阵中所有有重复项的行的索引 例如 A 1 2 3 4 1 2 3 4 2 3 4 5 1 2 3 4 6 5 4 3 要返回的向量将是 1 2 4 很多类似的问题建议使用unique函数 我已经尝试过 但我能得到的最接近我想要的功
  • Clion如何将文件添加到项目中

    这看起来真的很基本 如何将文件添加到项目中而无需手动编辑CMakeLists txt 例如另一个目录中的源文件 CLion 解析CMakeLists txt并使用它生成项目视图 但我相信将文件添加到项目的唯一方法是编辑CMakeLists
  • 如何在 Matlab 中将数组打印到 .txt 文件?

    我才刚刚开始学习Matlab 所以这个问题可能非常基本 我有一个变量 a 2 3 3 422 6 121 9 4 55 我希望将值输出到 txt 文件 如下所示 2 3 3 422 6 121 9 4 55 我怎样才能做到这一点 fid f
  • 将 cmake 与 nmake x64 一起使用

    我使用 cmake 生成 NMake 文件 一切正常 我使用 x64 工具集 没有 Visual Studio 只有 SDK 因此我输入 nmake 但它生成 x86 构建而不是 x64 构建 你知道为什么吗 以及如何强制 nmake 以
  • Matlab 和 Python 中的优化算法(dog-leg trust-region)

    我正在尝试使用 Matlab 和 Python 中的狗腿信赖域算法求解一组非线性方程 在Matlab中有fsolve https www mathworks com help optim ug fsolve html其中此算法是默认算法 而
  • 我可以安装共享导入库吗?

    我有一个外部项目和一个导入的共享库 include 目录和 implib 都可以正常工作 但尝试安装共享库 dll 失败并出现以下错误 install TARGETS given target my shared lib which doe
  • 如何在 CMake 中运行基本的“add_custom_command”

    我只是想启动并运行一个基本的 CMake 示例 它可以运行一些基本的命令行命令 我已经研究这个有一段时间了 但没有任何运气 我完全用错了吗 任何和所有的意见将不胜感激 cmake minimum required VERSION 3 0 a
  • matlab中类库的全局变量

    我有一些matlab声明的类 我如何声明所有类中都可见的常量 例如 这些常量可以是在所有类的方法中使用的物理常量 首先想到的是使用全局变量 还有更好的办法吗 最好在单独的文件中声明这些常量 包含常量的类是执行此操作的一种很好的干净方法 请参
  • 根据caffe中的“badness”缩放损失值

    我想根据训练期间 当前预测 与 正确标签 的接近 远近来缩放每个图像的损失值 例如 如果正确的标签是 猫 而网络认为它是 狗 那么惩罚 损失 应该小于网络认为它是 汽车 的情况 我正在做的方式如下 1 我定义了标签之间距离的矩阵 2 将该矩
  • matlab中的排列函数是如何工作的

    这是一个有点愚蠢的问题 但我似乎无法弄清楚排列在 matlab 中是如何工作的 以文档为例 A 1 2 3 4 permute A 2 1 ans 1 3 2 4 到底是怎么回事 这如何告诉 matlab 3 和 2 需要交换 哇 这是我迄
  • 如何将 OpenCV 的测试框架与 CMake 结合使用?

    好像 OpenCV 有一个测试框架 https github com Itseez opencv tree ef91d7e8830c36785f0b6fdbf2045da48413dd76 modules ts include opencv
  • 如何在放置颜色条后保持子图大小不变

    假设我们有一个 1 2 子图 我们在其中绘制了一些图形 如下所示 subplot 1 2 1 surf peaks 20 subplot 1 2 2 surf peaks 20 然后我们要添加一个颜色条 colorbar 我不希望结果中的正
  • 在matlab中绘制给定区域内(两个圆之间)的向量场

    我想在 Matlab 中绘制下面的向量场 u cos x x 0 y y 0 v sin x x 0 y y 0 我可以在网格中轻松完成 例如 x 和 y 方向从 2 到 2 x 0 2 y 0 1 x y meshgrid 2 0 2 2

随机推荐