caffe能否移植到arm平台( 六 )


* 解压: * 编译:make TARGET=ARMV7 HOSTCC=gcc CC=arm-hisiv500-linux-gcc CROSS=1 CROSS_SUFFIX=arm-hisiv500-linux- NO_LAPACKE=1 NO_SHARED=1 BINARY=32 NOFORTRAN=1 libs * 安装:make PREFIX=/home/shunzhi/software/OpenBLAS-0.2.19/install install
3.移植结果:
shunzhi@ubuntu:~/software/OpenBLAS-0.2.19/install$ tree.├── bin├── include│ ├── cblas.h│ ├── f77blas.h│ ├── lapacke_config.h│ ├── lapacke.h│ ├── lapacke_mangling.h│ ├── lapacke_utils.h│ └── openblas_config.h└── lib ├── cmake │ └── openblas ├── libopenblas.a -\u0026gt; libopenblas_armv7p-r0.2.19.a └── libopenblas_armv7p-r0.2.19.a
5 directories, 9 files
九.caffe的移植
1.移植环境
* Ubuntu16.04 + arm-hisiv500-linux- * caffe下载地址:https://github.com/BVLC/caffe/releases
2.移植步骤:
* 修改Makefile
1)LIBRARIES += glog gflags protobuf boost_system boost_filesystem m hdf5_hl hdf52)BLAS ?= open3)LIBRARIES += opencv_core opencv_highgui opencv_imgproc opencv_imgcodecs4)COMMON_FLAGS += -mcpu=cortex-a17.cortex-a7 -mfloat-abi=softfp -mfpu=neon-vfpv4 -mno-unaligned-access -fno-aggressive-loop-optimizations5)USE_PKG_CONFIG ?= 1 (解决opencv库链接的问题)
* 修改Makefile.config
1)CPU_ONLY := 1 2)OPENCV_VERSION := 3 # 3)CUSTOM_CXX := arm-hisiv500-linux-g++ 4)BLAS := open 5)INCLUDE_DIRS := $(PYTHON_INCLUDE) /opt/hisi-linux/x86-arm/arm-hisiv500-linux/target/usr/local/include /opt/hisi-linux/x86-arm/arm-hisiv500-linux/target/usr/include /usr/local/include96 LIBRARY_DIRS := $(PYTHON_LIB) /opt/hisi-linux/x86-arm/arm-hisiv500-linux/target/usr/local/lib /opt/hisi-linux/x86-arm/arm-hisiv500-linux/target/usr/lib 6)#PYTHON_LIB := /usr/lib 7)USE_PKG_CONFIG := 1
移植问题汇总:
1.问题描述:
/opt/hisi-linux/x86-arm/arm-hisiv500-linux/target/usr/local/lib/libboost_filesystem.so: warning: the use of OBSOLESCENT `utime\u0026#39; is discouraged, use `utimes\u0026#39;/opt/hisi-linux/x86-arm/arm-hisiv500-linux/bin/../lib/gcc/arm-hisiv500-linux-uclibcgnueabi/4.9.4/../../../../arm-hisiv500-linux-uclibcgnueabi/bin/ld: warning: ../../lib/libopencv_video.so, needed by /opt/hisi-linux/x86-arm/arm-hisiv500-linux/target/usr/local/lib/libopencv_shape.so, not found (try using -rpath or -rpath-link)/opt/hisi-linux/x86-arm/arm-hisiv500-linux/bin/../lib/gcc/arm-hisiv500-linux-uclibcgnueabi/4.9.4/../../../../arm-hisiv500-linux-uclibcgnueabi/bin/ld: warning: ../../lib/libopencv_imgproc.so, needed by /opt/hisi-linux/x86-arm/arm-hisiv500-linux/target/usr/local/lib/libopencv_shape.so, not found (try using -rpath or -rpath-link)/opt/hisi-linux/x86-arm/arm-hisiv500-linux/bin/../lib/gcc/arm-hisiv500-linux-uclibcgnueabi/4.9.4/../../../../arm-hisiv500-linux-uclibcgnueabi/bin/ld: warning: ../../lib/libopencv_core.so, needed by /opt/hisi-linux/x86-arm/arm-hisiv500-linux/target/usr/local/lib/libopencv_shape.so, not found (try using -rpath or -rpath-link)/opt/hisi-linux/x86-arm/arm-hisiv500-linux/bin/../lib/gcc/arm-hisiv500-linux-uclibcgnueabi/4.9.4/../../../../arm-hisiv500-linux-uclibcgnueabi/bin/ld: warning: ../../lib/libopencv_objdetect.so, needed by /opt/hisi-linux/x86-arm/arm-hisiv500-linux/target/usr/local/lib/libopencv_stitching.so, not found (try using -rpath or -rpath-link)/opt/hisi-linux/x86-arm/arm-hisiv500-linux/bin/../lib/gcc/arm-hisiv500-linux-uclibcgnueabi/4.9.4/../../../../arm-hisiv500-linux-uclibcgnueabi/bin/ld: warning: ../../lib/libopencv_calib3d.so, needed by /opt/hisi-linux/x86-arm/arm-hisiv500-linux/target/usr/local/lib/libopencv_stitching.so, not found (try using -rpath or -rpath-link)/opt/hisi-linux/x86-arm/arm-hisiv500-linux/bin/../lib/gcc/arm-hisiv500-linux-uclibcgnueabi/4.9.4/../../../../arm-hisiv500-linux-uclibcgnueabi/bin/ld: warning: ../../lib/libopencv_features2d.so, needed by /opt/hisi-linux/x86-arm/arm-hisiv500-linux/target/usr/local/lib/libopencv_stitching.so, not found (try using -rpath or -rpath-link)/opt/hisi-linux/x86-arm/arm-hisiv500-linux/bin/../lib/gcc/arm-hisiv500-linux-uclibcgnueabi/4.9.4/../../../../arm-hisiv500-linux-uclibcgnueabi/bin/ld: warning: ../../lib/libopencv_flann.so, needed by /opt/hisi-linux/x86-arm/arm-hisiv500-linux/target/usr/local/lib/libopencv_stitching.so, not found (try using -rpath or -rpath-link)/opt/hisi-linux/x86-arm/arm-hisiv500-linux/bin/../lib/gcc/arm-hisiv500-linux-uclibcgnueabi/4.9.4/../../../../arm-hisiv500-linux-uclibcgnueabi/bin/ld: warning: ../../lib/libopencv_ml.so, needed by /opt/hisi-linux/x86-arm/arm-hisiv500-linux/target/usr/local/lib/libopencv_stitching.so, not found (try using -rpath or -rpath-link)/opt/hisi-linux/x86-arm/arm-hisiv500-linux/bin/../lib/gcc/arm-hisiv500-linux-uclibcgnueabi/4.9.4/../../../../arm-hisiv500-linux-uclibcgnueabi/bin/ld: warning: ../../lib/libopencv_highgui.so, needed by /opt/hisi-linux/x86-arm/arm-hisiv500-linux/target/usr/local/lib/libopencv_stitching.so, not found (try using -rpath or -rpath-link)/opt/hisi-linux/x86-arm/arm-hisiv500-linux/bin/../lib/gcc/arm-hisiv500-linux-uclibcgnueabi/4.9.4/../../../../arm-hisiv500-linux-uclibcgnueabi/bin/ld: warning: ../../lib/libopencv_videoio.so, needed by /opt/hisi-linux/x86-arm/arm-hisiv500-linux/target/usr/local/lib/libopencv_stitching.so, not found (try using -rpath or -rpath-link)/opt/hisi-linux/x86-arm/arm-hisiv500-linux/bin/../lib/gcc/arm-hisiv500-linux-uclibcgnueabi/4.9.4/../../../../arm-hisiv500-linux-uclibcgnueabi/bin/ld: warning: ../../lib/libopencv_imgcodecs.so, needed by /opt/hisi-linux/x86-arm/arm-hisiv500-linux/target/usr/local/lib/libopencv_stitching.so, not found (try using -rpath or -rpath-link)/opt/hisi-linux/x86-arm/arm-hisiv500-linux/bin/../lib/gcc/arm-hisiv500-linux-uclibcgnueabi/4.9.4/../../../../arm-hisiv500-linux-uclibcgnueabi/bin/ld: warning: ../../lib/libopencv_photo.so, needed by /opt/hisi-linux/x86-arm/arm-hisiv500-linux/target/usr/local/lib/libopencv_videostab.so, not found (try using -rpath or -rpath-link)CXX tools/convert_imageset.cppCXX/LD -o .build_release/tools/convert_imageset.bin


推荐阅读